aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llmenugl.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llmenugl.h79
1 files changed, 77 insertions, 2 deletions
diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h
index 77e2b31..c4a0043 100644
--- a/linden/indra/llui/llmenugl.h
+++ b/linden/indra/llui/llmenugl.h
@@ -41,6 +41,7 @@
41#include "llview.h" 41#include "llview.h"
42 42
43class LLMenuItemGL; 43class LLMenuItemGL;
44class LLMenuHolderGL;
44 45
45extern S32 MENU_BAR_HEIGHT; 46extern S32 MENU_BAR_HEIGHT;
46extern S32 MENU_BAR_WIDTH; 47extern S32 MENU_BAR_WIDTH;
@@ -163,6 +164,7 @@ public:
163 164
164 // LLView Functionality 165 // LLView Functionality
165 virtual BOOL handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ); 166 virtual BOOL handleKeyHere( KEY key, MASK mask, BOOL called_from_parent );
167 virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
166 virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ); 168 virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
167 virtual void draw( void ); 169 virtual void draw( void );
168 170
@@ -441,6 +443,7 @@ public:
441 443
442 static void setDefaultBackgroundColor( const LLColor4& color ); 444 static void setDefaultBackgroundColor( const LLColor4& color );
443 void setBackgroundColor( const LLColor4& color ); 445 void setBackgroundColor( const LLColor4& color );
446 LLColor4 getBackgroundColor();
444 void setBackgroundVisible( BOOL b ) { mBgVisible = b; } 447 void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
445 void setCanTearOff(BOOL tear_off, LLViewHandle parent_floater_handle = LLViewHandle::sDeadHandle); 448 void setCanTearOff(BOOL tear_off, LLViewHandle parent_floater_handle = LLViewHandle::sDeadHandle);
446 449
@@ -523,7 +526,8 @@ public:
523 static BOOL getKeyboardMode() { return sKeyboardMode; } 526 static BOOL getKeyboardMode() { return sKeyboardMode; }
524 527
525 static void onFocusLost(LLView* old_focus); 528 static void onFocusLost(LLView* old_focus);
526 static LLView *sDefaultMenuContainer; 529
530 static LLMenuHolderGL* sMenuContainer;
527 531
528protected: 532protected:
529 void createSpilloverBranch(); 533 void createSpilloverBranch();
@@ -558,6 +562,75 @@ protected:
558 KEY mJumpKey; 562 KEY mJumpKey;
559}; 563};
560 564
565
566
567//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
568// Class LLMenuItemBranchGL
569//
570// The LLMenuItemBranchGL represents a menu item that has a
571// sub-menu. This is used to make cascading menus.
572//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
573
574class LLMenuItemBranchGL : public LLMenuItemGL
575{
576protected:
577 LLMenuGL* mBranch;
578
579public:
580 LLMenuItemBranchGL( const LLString& name, const LLString& label, LLMenuGL* branch,
581 KEY key = KEY_NONE, MASK mask = MASK_NONE );
582 virtual LLXMLNodePtr getXML(bool save_children = true) const;
583
584 virtual LLView* getChildByName(const LLString& name, BOOL recurse) const;
585
586 virtual LLString getType() const { return "menu"; }
587
588 virtual EWidgetType getWidgetType() const;
589 virtual LLString getWidgetTag() const;
590
591 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
592
593 virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
594
595 // check if we've used these accelerators already
596 virtual BOOL addToAcceleratorList(std::list <LLKeyBinding*> *listp);
597
598 // called to rebuild the draw label
599 virtual void buildDrawLabel( void );
600
601 // doIt() - do the primary funcationality of the menu item.
602 virtual void doIt( void );
603
604 virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
605 virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
606
607 // set the hover status (called by it's menu) and if the object is
608 // active. This is used for behavior transfer.
609 virtual void setHighlight( BOOL highlight );
610
611 virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
612
613 virtual BOOL isActive() const;
614
615 virtual BOOL isOpen() const;
616
617 LLMenuGL *getBranch() const { return mBranch; }
618
619 virtual void updateBranchParent( LLView* parentp );
620
621 // LLView Functionality
622 virtual void onVisibilityChange( BOOL curVisibilityIn );
623
624 virtual void draw();
625
626 virtual void setEnabledSubMenus(BOOL enabled);
627
628 virtual void openMenu();
629};
630
631
632
633
561//----------------------------------------------------------------------------- 634//-----------------------------------------------------------------------------
562// class LLPieMenu 635// class LLPieMenu
563// A circular menu of items, icons, etc. 636// A circular menu of items, icons, etc.
@@ -698,8 +771,10 @@ public:
698 virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); 771 virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
699 virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); 772 virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
700 773
774 virtual const LLRect getMenuRect() const;
775 virtual BOOL hasVisibleMenu() const;
776
701 static void setActivatedItem(LLMenuItemGL* item); 777 static void setActivatedItem(LLMenuItemGL* item);
702 BOOL hasVisibleMenu();
703 778
704protected: 779protected:
705 static LLViewHandle sItemLastSelectedHandle; 780 static LLViewHandle sItemLastSelectedHandle;