summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryitemslist.h
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-05-13 19:31:50 +0300
committerSergei Litovchuk <slitovchuk@productengine.com>2010-05-13 19:31:50 +0300
commita9680462828d99cb482cdb235f14d6bd3c87bc9c (patch)
tree67d6a4f5cb9ed3b7ac38b6e2f1e4137901f8d51e /indra/newview/llinventoryitemslist.h
parent90940d0b065d18b1dfaa178ee294b4d47ff96e2a (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/newview/llinventoryitemslist.h')
-rw-r--r--indra/newview/llinventoryitemslist.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 6e74330df2..60cccc0f4f 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -212,14 +212,23 @@ public:
void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array);
+ boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
+
/**
- * Let list know items need to be refreshed in next draw()
+ * Let list know items need to be refreshed in next doIdle()
*/
void setNeedsRefresh(bool needs_refresh){ mNeedsRefresh = needs_refresh; }
bool getNeedsRefresh(){ return mNeedsRefresh; }
- /*virtual*/ void draw();
+ /**
+ * Idle routine used to refresh the list regardless of the current list
+ * visibility, unlike draw() which is called only for the visible list.
+ * This is needed for example to filter items of the list hidden by closed
+ * accordion tab.
+ */
+ void doIdle(); // Real idle routine
+ static void idle(void* user_data); // static glue to doIdle()
protected:
friend class LLUICtrlFactory;
@@ -229,7 +238,7 @@ protected:
/**
* Refreshes list items, adds new items and removes deleted items.
- * Called from draw() until all new items are added, ,
+ * Called from doIdle() until all new items are added,
* maximum 50 items can be added during single call.
*/
void refresh();
@@ -249,6 +258,10 @@ private:
uuid_vec_t mIDs; // IDs of items that were added in refreshList().
// Will be used in refresh() to determine added and removed ids
bool mNeedsRefresh;
+
+ bool mPrevVisibility;
+
+ commit_signal_t mRefreshCompleteSignal;
};
#endif //LL_LLINVENTORYITEMSLIST_H