diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-10-24 16:49:00 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-10-24 16:49:00 -0700 |
commit | 8d6e7fa02c0d5cd18f91ac6862079ff4fa0719d4 (patch) | |
tree | 333d111003980ee354d8bb401648debffd0c6409 /indra/newview/lltoolbarview.h | |
parent | 28fc98dea3b65e986c0fd8ffa71a81d2db7fb700 (diff) |
* Fixed destination guide floater to display on login based on per account
"DisplayDestinationsOnInitialRun" setting or initial agent SL login.
* Added toolbar enumeration for toolbar view so queries for commands can now
indicate where the command currently is on the left, right or bottom toolbars.
* Updated toybox toolbar button tooltips to indicate where the command currently
resides in the view.
* Added unused function to allow toolbar buttons to be changed to flash
indefinitely.
Reviewed by Richard.
Diffstat (limited to 'indra/newview/lltoolbarview.h')
-rw-r--r-- | indra/newview/lltoolbarview.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index ea14e471cd..3dc8954abe 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -39,6 +39,19 @@ class LLUICtrlFactory; class LLToolBarView : public LLUICtrl { public: + typedef enum + { + TOOLBAR_NONE = 0, + TOOLBAR_LEFT, + TOOLBAR_RIGHT, + TOOLBAR_BOTTOM, + + TOOLBAR_COUNT, + + TOOLBAR_FIRST = TOOLBAR_LEFT, + TOOLBAR_LAST = TOOLBAR_BOTTOM, + } EToolBarLocation; + // Xui structure of the toolbar panel struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> {}; @@ -52,6 +65,7 @@ public: { Mandatory<LLToolBarEnums::ButtonType> button_display_mode; Multiple<LLCommandId::Params> commands; + Toolbar(); }; struct ToolbarSet : public LLInitParam::Block<ToolbarSet> @@ -59,6 +73,7 @@ public: Optional<Toolbar> left_toolbar, right_toolbar, bottom_toolbar; + ToolbarSet(); }; @@ -66,9 +81,16 @@ public: virtual ~LLToolBarView(); virtual BOOL postBuild(); virtual void draw(); + // Toolbar view interface with the rest of the world - // Checks if the commandId is being used somewhere in one of the toolbars - bool hasCommand(const LLCommandId& commandId) const; + // Checks if the commandId is being used somewhere in one of the toolbars, returns EToolBarLocation + S32 hasCommand(const LLCommandId& commandId) const; + S32 addCommand(const LLCommandId& commandId, EToolBarLocation toolbar, int rank = LLToolBar::RANK_NONE); + S32 removeCommand(const LLCommandId& commandId, int& rank); // Sets the rank the removed command was at, RANK_NONE if not found + S32 enableCommand(const LLCommandId& commandId, bool enabled); + S32 stopCommandInProgress(const LLCommandId& commandId); + S32 flashCommand(const LLCommandId& commandId, bool flash); + // Loads the toolbars from the existing user or default settings bool loadToolbars(bool force_default = false); // return false if load fails @@ -76,10 +98,10 @@ public: static bool loadDefaultToolbars(); - static void startDragTool(S32 x, S32 y, LLToolBarButton* button); + static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton); static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); - static void resetDragTool(LLToolBarButton* button); + static void resetDragTool(LLToolBarButton* toolbarButton); bool isModified() const; @@ -91,15 +113,13 @@ protected: private: void saveToolbars() const; - bool addCommand(const LLCommandId& commandId, LLToolBar* toolbar); + bool addCommandInternal(const LLCommandId& commandId, LLToolBar* toolbar); void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const; static void onToolBarButtonAdded(LLView* button); // Pointers to the toolbars handled by the toolbar view - LLToolBar* mToolbarLeft; - LLToolBar* mToolbarRight; - LLToolBar* mToolbarBottom; + LLToolBar* mToolbars[TOOLBAR_COUNT]; bool mToolbarsLoaded; bool mDragStarted; |