diff options
author | Don Kjer <don@lindenlab.com> | 2013-03-13 08:46:59 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2013-03-13 08:46:59 +0000 |
commit | 662d67e3b5f1cbf5e894f0e4af37a31faacd67e3 (patch) | |
tree | 93af533d9c1e9c027c5abc56a5de4ee207591b23 /indra/llui/llmenubutton.h | |
parent | f945415210f0e18c2c6d941fda6b7d45cb0f06f1 (diff) | |
parent | 0ebcdce82bffae18459ed541f05906f625ef47e2 (diff) |
Merging LLCURL::Responder changes with CHUI changes. Fixed gcc 4.6 compile failures
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 }; |