diff options
author | Merov Linden <merov@lindenlab.com> | 2010-10-20 20:50:20 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2010-10-20 20:50:20 -0700 |
commit | f38d21fe60945d71f8740f6aba58b40d4a722d58 (patch) | |
tree | 5622ef17bb53f05027881914622463ac1426eb14 /indra/llui/llmenubutton.h | |
parent | 9652de51ce5a64136b66c04461b12005568bd5f1 (diff) | |
parent | c12c60df4a28b3cb91870ae0666eb6b3422ff96b (diff) |
STORM-263 : merge to viewer-development
Diffstat (limited to 'indra/llui/llmenubutton.h')
-rw-r--r-- | indra/llui/llmenubutton.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index 81ca0e047c..81c3592b16 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -42,22 +42,40 @@ public: Optional<std::string> menu_filename; Params(); - }; + }; + + typedef enum e_menu_position + { + MP_TOP_LEFT, + MP_BOTTOM_LEFT + } EMenuPosition; - void toggleMenu(); + boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb ); + /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); + void hideMenu(); + LLMenuGL* getMenu() { return mMenu; } + void setMenu(LLMenuGL* menu, EMenuPosition position = MP_TOP_LEFT); + + void setMenuPosition(EMenuPosition position) { mMenuPosition = position; } protected: friend class LLUICtrlFactory; LLMenuButton(const Params&); + void toggleMenu(); + void updateMenuOrigin(); + private: - LLMenuGL* mMenu; - bool mMenuVisibleLastFrame; + LLMenuGL* mMenu; + bool mMenuVisibleLastFrame; + EMenuPosition mMenuPosition; + S32 mX; + S32 mY; }; |