diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-09-21 18:48:39 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-09-21 18:48:39 -0700 |
commit | 7e308b551c7fde9178e354dba005a5b35f793245 (patch) | |
tree | 76117996ab01ccabce4810badebad6a2d468d002 /indra/llui/lltoolbar.h | |
parent | f72115059e7b1450e221a8006d2030ac35767b5a (diff) |
EXP-1239 WIP make toolbars wrap when there is not enough room
initial pass at wrapping
Diffstat (limited to 'indra/llui/lltoolbar.h')
-rw-r--r-- | indra/llui/lltoolbar.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index 60a848a6e3..3a593e42d9 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -87,14 +87,25 @@ public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { Mandatory<LLToolBarEnums::ButtonType> button_display_mode; - Multiple<LLToolBarButton::Params> buttons; Mandatory<LLToolBarEnums::SideType> side; + Optional<LLToolBarButton::Params> button_icon, + button_icon_and_text; + + Optional<bool> wrap; + Optional<S32> min_width, + max_width; + // get rid of this + Multiple<LLToolBarButton::Params> buttons; + + Optional<LLUIImage*> background_image; + Params(); }; // virtuals void draw(); + void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); protected: friend class LLUICtrlFactory; @@ -105,10 +116,22 @@ protected: void updateLayout(); private: + void addRow(); + std::list<LLToolBarButton*> mButtons; LLToolBarEnums::ButtonType mButtonType; + LLLayoutStack* mCenteringStack; + LLLayoutStack* mWrapStack; + LLLayoutPanel* mCenterPanel; LLToolBarEnums::SideType mSideType; - LLLayoutStack* mStack; + + std::vector<LLLayoutStack*> mStacks; + bool mWrap; + bool mNeedsLayout; + S32 mMinWidth, + mMaxWidth; + + LLUIImagePtr mBackgroundImage; }; |