diff options
author | Oz Linden <oz@lindenlab.com> | 2013-03-18 14:30:57 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-03-18 14:30:57 -0400 |
commit | ed7785bf97a601448ba2da5fb2f19ea2861454c5 (patch) | |
tree | 17e8d9ccf28ae30c5029ecea7e0ab8bed0fe3926 /indra/llui/llmenubutton.h | |
parent | c8533650b4779040c5e196f9ff156e3454edc9c8 (diff) | |
parent | bf95c1cae7a84d1a97dacd8ea7f1b6af8be067a9 (diff) |
merge up to 3.5.0-beta3 (chui)
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 }; |