diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-06-04 13:29:25 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-06-04 13:29:25 +0300 |
commit | e1189d0e2ee47539edc68c3532e0a5ce64d5dcd1 (patch) | |
tree | 48ee3e5fa3fb970d7c25eea79fd4e5eec2171d94 /indra/llui/llaccordionctrl.h | |
parent | f41d06012b53c7fe65ec1347364a2228b2992dc7 (diff) |
EXT-7368 FIXED Implemented new "empty_accordion_text" textbox to show help text when there are no visible tabs in accordion.
* Textbox always fit whole accordion.
* This text is updated with search_term (in link to open Search floater) when new filter substring is passed to accordion.
* Accordion is notified by its tabs when their visibility is changed.
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/486/
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llaccordionctrl.h')
-rw-r--r-- | indra/llui/llaccordionctrl.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index a029201c90..2f483eafb2 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -34,6 +34,7 @@ #define LL_ACCORDIONCTRL_H #include "llpanel.h" +#include "lltextbox.h" #include "llscrollbar.h" #include <vector> @@ -64,10 +65,12 @@ public: accordion tabs are responsible for scrolling their content. *NOTE fit_parent works best when combined with single_expansion. Accordion view should implement getRequiredRect() and provide valid height*/ + Optional<LLTextBox::Params> empty_accordion_text; Params() : single_expansion("single_expansion",false) , fit_parent("fit_parent", false) + , empty_accordion_text("empty_accordion_text") {}; }; @@ -105,7 +108,15 @@ public: void reset (); + /** + * Sets filter substring as a search_term for help text when there are no any visible tabs. + */ + void setFilterSubString(const std::string& filter_string); + private: + void initNoTabsWidget(const LLTextBox::Params& tb_params); + void updateNoTabsHelpTextVisibility(); + void arrangeSinge(); void arrangeMultiple(); @@ -131,6 +142,8 @@ private: bool mAutoScrolling; F32 mAutoScrollRate; LLAccordionCtrlTab* mSelectedTab; + LLTextBox* mNoVisibleTabsHelpText; + std::string mNoVisibleTabsOrigString; }; |