diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-05-13 19:31:50 +0300 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-05-13 19:31:50 +0300 |
commit | a9680462828d99cb482cdb235f14d6bd3c87bc9c (patch) | |
tree | 67d6a4f5cb9ed3b7ac38b6e2f1e4137901f8d51e /indra/llui/llaccordionctrltab.cpp | |
parent | 90940d0b065d18b1dfaa178ee294b4d47ff96e2a (diff) |
EXT-7158 FIXED Implemented filter in "My Outfits" tab.
- Added accordion tab title highlighting setter and title getter.
- Added filtered tabs title highlighting.
- Tabs which don't pass filter are hidden.
- Added applying filter on list refresh event to avoid refreshing list on every filter change.
- Moved part of LLTextUtil to llui/lluitextutil to reuse code in llaccordionctrltab.
- Fixed passing list size to mRefreshCompleteSignal.
- Added list refresh callback to LLInventoryItemsList for checking tab visibility without re-applying filter sub-string.
Committed to proceed with dependent tasks.
If there are any comments/suggestions related to text utils this part of code may be changed without requiring much effort.
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/363/
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llaccordionctrltab.cpp')
-rw-r--r-- | indra/llui/llaccordionctrltab.cpp | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 596da782ce..0db2dca615 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -32,12 +32,13 @@ #include "linden_common.h" -#include "lluictrl.h" -#include "llscrollbar.h" #include "llaccordionctrltab.h" -#include "lllocalcliprect.h" +#include "lllocalcliprect.h" +#include "llscrollbar.h" #include "lltextbox.h" +#include "lluictrl.h" +#include "lluitextutil.h" static const std::string DD_BUTTON_NAME = "dd_button"; static const std::string DD_TEXTBOX_NAME = "dd_textbox"; @@ -72,7 +73,8 @@ public: virtual BOOL postBuild(); - void setTitle(const std::string& title); + std::string getTitle(); + void setTitle(const std::string& title, const std::string& hl); virtual void onMouseEnter(S32 x, S32 y, MASK mask); virtual void onMouseLeave(S32 x, S32 y, MASK mask); @@ -146,10 +148,28 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::postBuild() return TRUE; } -void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& title) +std::string LLAccordionCtrlTab::LLAccordionCtrlTabHeader::getTitle() { if(mHeaderTextbox) - mHeaderTextbox->setText(title); + { + return mHeaderTextbox->getText(); + } + else + { + return LLStringUtil::null; + } +} + +void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& title, const std::string& hl) +{ + if(mHeaderTextbox) + { + LLTextUtil::textboxSetHighlightedVal( + mHeaderTextbox, + LLStyle::Params(), + title, + hl); + } } void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() @@ -436,12 +456,25 @@ void LLAccordionCtrlTab::setAccordionView(LLView* panel) addChild(panel,0); } -void LLAccordionCtrlTab::setTitle(const std::string& title) +std::string LLAccordionCtrlTab::getTitle() +{ + LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); + if (header) + { + return header->getTitle(); + } + else + { + return LLStringUtil::null; + } +} + +void LLAccordionCtrlTab::setTitle(const std::string& title, const std::string& hl) { LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); if (header) { - header->setTitle(title); + header->setTitle(title, hl); } } @@ -903,5 +936,3 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask) } return LLUICtrl::handleToolTip(x, y, mask); } - - |