diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-05 20:37:28 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-05 20:37:28 +0300 |
commit | 177c1f80bc132fdad4e46009b074c0609454332f (patch) | |
tree | a184f4a786b3e21de24bb554de258924778538b0 /indra/llui/llmenubutton.h | |
parent | 69cf10a1e9b969a1c87473a8b153281dc60e7b56 (diff) |
CHUI-78 WIP Enabled LLMenuButton to manage its menu's lifetime.
Diffstat (limited to 'indra/llui/llmenubutton.h')
-rw-r--r-- | indra/llui/llmenubutton.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index 84e63911a3..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 { @@ -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 }; |