summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryitemslist.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventoryitemslist.h')
-rw-r--r--indra/newview/llinventoryitemslist.h44
1 files changed, 41 insertions, 3 deletions
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index bc04eb6f5b..0dd6f53be7 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -42,6 +42,7 @@
// newview
#include "llflatlistview.h"
+#include "llviewerinventory.h"
class LLIconCtrl;
class LLTextBox;
@@ -120,6 +121,21 @@ public:
/* Removes item highlight */
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
+ /** Get the name of a corresponding inventory item */
+ const std::string& getItemName() const { return mItem->getName(); }
+
+ /** Get the asset type of a corresponding inventory item */
+ LLAssetType::EType getType() const { return mItem->getType(); }
+
+ /** Get the wearable type of a corresponding inventory item */
+ LLWearableType::EType getWearableType() const { return mItem->getWearableType(); }
+
+ /** Get the description of a corresponding inventory item */
+ const std::string& getDescription() const { return mItem->getDescription(); }
+
+ /** Get the associated inventory item */
+ LLViewerInventoryItem* getItem() const { return mItem; }
+
virtual ~LLPanelInventoryListItemBase(){}
protected:
@@ -163,6 +179,9 @@ protected:
/** Set item title - inventory item name usually */
void setTitle(const std::string& title, const std::string& highlit_text);
+ // force not showing link icon on item's icon
+ bool mForceNoLinksOnIcons;
+
private:
/** reshape left side widgets
@@ -208,14 +227,29 @@ 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();
+ /**
+ * Sets the flag indicating that the list needs to be refreshed even if it is
+ * not currently visible.
+ */
+ void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; }
+
+ /**
+ * 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;
@@ -225,7 +259,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();
@@ -245,6 +279,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 mForceRefresh;
+
+ commit_signal_t mRefreshCompleteSignal;
};
#endif //LL_LLINVENTORYITEMSLIST_H