diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-09-30 16:58:09 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-09-30 16:58:09 -0700 |
commit | 0991a8a870b9cfee57a76f45f4f5ee1c5eb6d4cd (patch) | |
tree | 2c503e2bec1398185e41875b3c357e5afb126c2b /indra/llui/lltoolbar.h | |
parent | 6fe4815217a11a36aa2e2b1d8b040eff007bb631 (diff) | |
parent | 09e179b2381a4db03309839babae664feb9b0886 (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-fui
Diffstat (limited to 'indra/llui/lltoolbar.h')
-rw-r--r-- | indra/llui/lltoolbar.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index 03b1756988..0bb95f4e9c 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -42,7 +42,15 @@ public: { }; - LLToolBarButton(const Params& p) : LLButton(p) {} + LLToolBarButton(const Params& p); + + BOOL handleMouseDown(S32 x, S32 y, MASK mask); + BOOL handleHover(S32 x, S32 y, MASK mask); + void setCommandId(const LLCommandId& id) { mId = id; } +private: + LLCommandId mId; + S32 mMouseDownX; + S32 mMouseDownY; }; @@ -124,6 +132,8 @@ public: bool hasCommand(const LLCommandId& commandId) const; bool enableCommand(const LLCommandId& commandId, bool enabled); + LLToolBarButton* createButton(const LLCommandId& id); + protected: friend class LLUICtrlFactory; LLToolBar(const Params&); @@ -142,7 +152,6 @@ private: void createContextMenu(); void updateLayoutAsNeeded(); void createButtons(); - void createButton(const LLCommandId& id); void resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth); BOOL isSettingChecked(const LLSD& userdata); void onSettingEnable(const LLSD& userdata); @@ -151,6 +160,9 @@ private: std::list<LLToolBarButton*> mButtons; command_id_list_t mButtonCommands; + typedef std::map<LLCommandId, LLToolBarButton*> command_id_map; + command_id_map mButtonMap; + LLToolBarEnums::ButtonType mButtonType; LLLayoutStack* mCenteringStack; LLLayoutStack* mWrapStack; |