diff options
author | graham linden <graham@lindenlab.com> | 2013-03-11 14:26:33 -0700 |
---|---|---|
committer | graham linden <graham@lindenlab.com> | 2013-03-11 14:26:33 -0700 |
commit | d4b3c23da11dd963915d078b169ac9ac0cf7b7bf (patch) | |
tree | 2fb1148a7593872d2599754fe0bf87204314bf6a /indra/llui/llmenubutton.h | |
parent | 85af4c7b7169a0ea38aad5d3759fd36b8ff021f4 (diff) | |
parent | d348deb7049cbaef7c228000525c7ee5a265464c (diff) |
Merged lindenlab/viewer-development into default
Diffstat (limited to 'indra/llui/llmenubutton.h')
-rw-r--r-- | indra/llui/llmenubutton.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index e2396e7fb2..67ec1983b3 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -34,6 +34,8 @@ class LLToggleableMenu; class LLMenuButton : public LLButton { + LOG_CLASS(LLMenuButton); + public: typedef enum e_menu_position { @@ -53,7 +55,7 @@ public: { // filename for it's toggleable menu Optional<std::string> menu_filename; - Optional<EMenuPosition> position; + Optional<EMenuPosition, MenuPositions> position; Params(); }; @@ -68,13 +70,15 @@ public: void hideMenu(); LLToggleableMenu* getMenu(); - void setMenu(LLToggleableMenu* menu, EMenuPosition position = MP_TOP_LEFT); + void setMenu(const std::string& menu_filename, EMenuPosition position = MP_TOP_LEFT); + void setMenu(LLToggleableMenu* menu, EMenuPosition position = MP_TOP_LEFT, bool take_ownership = false); void setMenuPosition(EMenuPosition position) { mMenuPosition = position; } protected: friend class LLUICtrlFactory; LLMenuButton(const Params&); + ~LLMenuButton(); void toggleMenu(); void updateMenuOrigin(); @@ -82,11 +86,14 @@ protected: void onMenuVisibilityChange(const LLSD& param); private: + void cleanup(); + LLHandle<LLView> mMenuHandle; bool mIsMenuShown; EMenuPosition mMenuPosition; S32 mX; S32 mY; + bool mOwnMenu; // true if we manage the menu lifetime }; |