summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbar.h
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-09-23 15:20:25 -0700
committerMerov Linden <merov@lindenlab.com>2011-09-23 15:20:25 -0700
commite42a9ec70c0e5fc98282c98358039445d0d68b84 (patch)
tree555cc9b4023e5eef6e2e019eb392a1267b378de3 /indra/llui/lltoolbar.h
parent1bcf6882c5faa94385f045e1c591da96408bb032 (diff)
parent53a8e1299305a4acad83f52401679c86485fcf51 (diff)
EXP-1207 : pull from viewer-experience-fui
Diffstat (limited to 'indra/llui/lltoolbar.h')
-rw-r--r--indra/llui/lltoolbar.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 3a593e42d9..85cd6d5170 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -33,6 +33,9 @@
#include "llbutton.h"
+class LLCommand;
+
+
class LLToolBarButton : public LLButton
{
public:
@@ -50,6 +53,8 @@ namespace LLToolBarEnums
{
BTNTYPE_ICONS_ONLY = 0,
BTNTYPE_ICONS_WITH_TEXT,
+
+ BTNTYPE_COUNT
};
enum SideType
@@ -93,8 +98,8 @@ public:
button_icon_and_text;
Optional<bool> wrap;
- Optional<S32> min_width,
- max_width;
+ Optional<S32> min_button_width,
+ max_button_width;
// get rid of this
Multiple<LLToolBarButton::Params> buttons;
@@ -107,16 +112,16 @@ public:
void draw();
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ bool addCommand(LLCommand * command);
+
protected:
friend class LLUICtrlFactory;
LLToolBar(const Params&);
void initFromParams(const Params&);
- void addButton(LLToolBarButton* buttonp);
- void updateLayout();
private:
- void addRow();
+ void updateLayoutAsNeeded();
std::list<LLToolBarButton*> mButtons;
LLToolBarEnums::ButtonType mButtonType;
@@ -125,13 +130,14 @@ private:
LLLayoutPanel* mCenterPanel;
LLToolBarEnums::SideType mSideType;
- std::vector<LLLayoutStack*> mStacks;
bool mWrap;
bool mNeedsLayout;
- S32 mMinWidth,
- mMaxWidth;
+ S32 mMinButtonWidth,
+ mMaxButtonWidth;
LLUIImagePtr mBackgroundImage;
+
+ LLToolBarButton::Params mButtonParams[LLToolBarEnums::BTNTYPE_COUNT];
};