summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderviewitem.h')
-rw-r--r--indra/newview/llfolderviewitem.h42
1 files changed, 29 insertions, 13 deletions
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index fc941510ab..dac0c3032c 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -66,6 +66,7 @@ public:
// Returns true if order has changed
bool updateSort(U32 order);
U32 getSort() { return mSortOrder; }
+ bool isByDate() { return mByDate; }
bool operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b);
private:
@@ -94,7 +95,7 @@ public:
Optional<LLUIImage*> icon_open; // used for folders
Optional<LLUIImage*> icon_overlay; // for links
Optional<LLFolderView*> root;
- Optional<LLFolderViewEventListener*> listener;
+ Mandatory<LLFolderViewEventListener*> listener;
Optional<LLUIImage*> folder_arrow_image;
Optional<S32> folder_indentation; // pixels
@@ -135,7 +136,7 @@ protected:
std::string mSearchableLabel;
S32 mLabelWidth;
bool mLabelWidthDirty;
- time_t mCreationDate;
+ mutable time_t mCreationDate;
LLFolderViewFolder* mParentFolder;
LLFolderViewEventListener* mListener;
BOOL mIsCurSelection;
@@ -157,7 +158,6 @@ protected:
BOOL mDragAndDropTarget;
BOOL mIsLoading;
LLTimer mTimeSinceRequestStart;
- bool mHidden;
bool mShowLoadStatus;
// helper function to change the selection from the root.
@@ -167,13 +167,17 @@ protected:
void extendSelectionFromRoot(LLFolderViewItem* selection);
// this is an internal method used for adding items to folders. A
- // no-op at this leve, but reimplemented in derived classes.
+ // no-op at this level, but reimplemented in derived classes.
virtual BOOL addItem(LLFolderViewItem*) { return FALSE; }
virtual BOOL addFolder(LLFolderViewFolder*) { return FALSE; }
static LLFontGL* getLabelFontForStyle(U8 style);
+ virtual void setCreationDate(time_t creation_date_utc) const { mCreationDate = creation_date_utc; }
+
public:
+ BOOL postBuild();
+
// This function clears the currently selected item, and records
// the specified selected item appropriately for display and use
// in the UI. If open is TRUE, then folders are opened up along
@@ -202,11 +206,6 @@ public:
virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
virtual S32 getItemHeight();
- // Hide the folder from the UI, such as if you want to hide the root
- // folder in an inventory panel.
- void setHidden(bool hidden) { mHidden = hidden; }
- bool getHidden() const { return mHidden; }
-
// applies filters to control visibility of inventory items
virtual void filter( LLInventoryFilter& filter);
@@ -231,7 +230,7 @@ public:
void deselectItem();
// this method is used to select this element
- void selectItem();
+ virtual void selectItem();
// gets multiple-element selection
virtual std::set<LLUUID> getSelectionList() const;
@@ -329,6 +328,8 @@ public:
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return NULL; }
+
// virtual void handleDropped();
virtual void draw();
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
@@ -366,6 +367,9 @@ public:
UNKNOWN, TRASH, NOT_TRASH
} ETrash;
+ typedef std::list<LLFolderViewItem*> items_t;
+ typedef std::list<LLFolderViewFolder*> folders_t;
+
private:
S32 mNumDescendantsSelected;
@@ -374,8 +378,6 @@ public: // Accessed needed by LLFolderViewItem
S32 numSelected(void) const { return mNumDescendantsSelected + (isSelected() ? 1 : 0); }
protected:
- typedef std::list<LLFolderViewItem*> items_t;
- typedef std::list<LLFolderViewFolder*> folders_t;
items_t mItems;
folders_t mFolders;
LLInventorySort mSortFunction;
@@ -392,6 +394,8 @@ protected:
S32 mCompletedFilterGeneration;
S32 mMostFilteredDescendantGeneration;
bool mNeedsSort;
+ bool mPassedFolderFilter;
+
public:
typedef enum e_recurse_type
{
@@ -425,13 +429,21 @@ public:
virtual void setCompletedFilterGeneration(S32 generation, BOOL recurse_up);
virtual S32 getCompletedFilterGeneration() { return mCompletedFilterGeneration; }
- BOOL hasFilteredDescendants(S32 filter_generation) { return mMostFilteredDescendantGeneration >= filter_generation; }
+ BOOL hasFilteredDescendants(S32 filter_generation);
BOOL hasFilteredDescendants();
// applies filters to control visibility of inventory items
virtual void filter( LLInventoryFilter& filter);
virtual void setFiltered(BOOL filtered, S32 filter_generation);
+ virtual BOOL getFiltered();
+ virtual BOOL getFiltered(S32 filter_generation);
+
virtual void dirtyFilter();
+
+ // folder-specific filtering (filter status propagates top down instead of bottom up)
+ void filterFolder(LLInventoryFilter& filter);
+ void setFilteredFolder(bool filtered, S32 filter_generation);
+ bool getFilteredFolder(S32 filter_generation);
// Passes selection information on to children and record
// selection information if necessary.
@@ -537,6 +549,10 @@ public:
time_t getCreationDate() const;
bool isTrash() const;
S32 getNumSelectedDescendants(void) const { return mNumDescendantsSelected; }
+
+ folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); }
+ folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); }
+ folders_t::size_type getFoldersCount() const { return mFolders.size(); }
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~