summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbarview.h
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-09-27 14:58:20 -0700
committerMerov Linden <merov@lindenlab.com>2011-09-27 14:58:20 -0700
commit0e4f226b56cb2dea1e8d5e9f1267a16c302bb5a9 (patch)
treed3f8361917943ff801e38c5bc42c3c66c441546d /indra/llui/lltoolbarview.h
parentcc56958452b8c10e1de176edb1924179ad04768a (diff)
EXP-1211 : Read toolbar default settings from toolbars.xml, no saving of settings done yet.
Diffstat (limited to 'indra/llui/lltoolbarview.h')
-rw-r--r--indra/llui/lltoolbarview.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/indra/llui/lltoolbarview.h b/indra/llui/lltoolbarview.h
index 2e7885f391..0f16b89ecc 100644
--- a/indra/llui/lltoolbarview.h
+++ b/indra/llui/lltoolbarview.h
@@ -39,18 +39,36 @@ class LLUICtrlFactory;
class LLToolBarView : public LLUICtrl
{
public:
+ // Xui structure of the toolbar panel
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> {};
+
+ // Note: valid children for LLToolBarView are stored in this registry
+ typedef LLDefaultChildRegistry child_registry_t;
- virtual ~LLToolBarView();
- /*virtual*/ BOOL postBuild();
+ // Xml structure of the toolbars.xml setting
+ // Those live in a toolbars.xml found in app_settings (for the default) and in
+ // the user folder for the user specific (saved) settings
+ struct Toolbar : public LLInitParam::Block<Toolbar>
+ {
+ Multiple<LLCommandId::Params> commands;
+ Toolbar();
+ };
+ struct ToolbarSet : public LLInitParam::Block<ToolbarSet>
+ {
+ Optional<Toolbar> left_toolbar,
+ right_toolbar,
+ bottom_toolbar;
+ ToolbarSet();
+ };
+ // Derived methods
+ virtual ~LLToolBarView();
+ virtual BOOL postBuild();
virtual void draw();
+ // Toolbar view interface with the rest of the world
bool hasCommand(const LLCommandId& commandId) const;
- // valid children for LLToolBarView are stored in this registry
- typedef LLDefaultChildRegistry child_registry_t;
-
protected:
friend class LLUICtrlFactory;
LLToolBarView(const Params&);
@@ -58,6 +76,10 @@ protected:
void initFromParams(const Params&);
private:
+ // Loads the toolbars from the existing user or default settings
+ bool load(); // return false if load fails
+
+ // Pointers to the toolbars handled by the toolbar view
LLToolBar* mToolbarLeft;
LLToolBar* mToolbarRight;
LLToolBar* mToolbarBottom;