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.h46
1 files changed, 27 insertions, 19 deletions
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index e2f94a2b63..3c7592046a 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -114,6 +114,7 @@ public:
static const S32 ICON_PAD = 2;
static const S32 ICON_WIDTH = 16;
static const S32 TEXT_PAD = 1;
+ static const S32 TEXT_PAD_RIGHT = 4;
static const S32 ARROW_SIZE = 12;
static const S32 MAX_FOLDER_ITEM_OVERLAP = 2;
// animation parameters
@@ -122,6 +123,8 @@ public:
// Mostly for debugging printout purposes.
const std::string& getSearchableLabel() { return mSearchableLabel; }
+
+ BOOL isLoading() const { return mIsLoading; }
private:
BOOL mIsSelected;
@@ -136,7 +139,7 @@ protected:
std::string mSearchableLabel;
S32 mLabelWidth;
bool mLabelWidthDirty;
- mutable time_t mCreationDate;
+ time_t mCreationDate;
LLFolderViewFolder* mParentFolder;
LLFolderViewEventListener* mListener;
BOOL mIsCurSelection;
@@ -159,13 +162,11 @@ protected:
BOOL mIsLoading;
LLTimer mTimeSinceRequestStart;
bool mShowLoadStatus;
+ bool mIsMouseOverTitle;
// helper function to change the selection from the root.
void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected);
- // helper function to change the selection from the root.
- void extendSelectionFromRoot(LLFolderViewItem* selection);
-
// this is an internal method used for adding items to folders. A
// no-op at this level, but reimplemented in derived classes.
virtual BOOL addItem(LLFolderViewItem*) { return FALSE; }
@@ -173,6 +174,8 @@ protected:
static LLFontGL* getLabelFontForStyle(U8 style);
+ virtual void setCreationDate(time_t creation_date_utc) { mCreationDate = creation_date_utc; }
+
public:
BOOL postBuild();
@@ -221,14 +224,11 @@ public:
// Returns TRUE if the selection state of this item was changed.
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
- // this method is used to group select items
- virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items) { }
-
// this method is used to deselect this element
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;
@@ -264,7 +264,7 @@ public:
// This method returns the actual name of the thing being
// viewed. This method will ask the viewed object itself.
- std::string getName( void ) const;
+ const std::string& getName( void ) const;
const std::string& getSearchableLabel( void ) const;
@@ -304,7 +304,8 @@ public:
BOOL isDescendantOf( const LLFolderViewFolder* potential_ancestor );
S32 getIndentation() { return mIndentation; }
- virtual BOOL potentiallyVisible(); // do we know for a fact that this item has been filtered out?
+ virtual BOOL potentiallyVisible(); // do we know for a fact that this item won't be displayed?
+ virtual BOOL potentiallyFiltered(); // do we know for a fact that this item has been filtered out?
virtual BOOL getFiltered();
virtual BOOL getFiltered(S32 filter_generation);
@@ -326,6 +327,10 @@ public:
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual void onMouseLeave(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,13 +371,6 @@ public:
typedef std::list<LLFolderViewItem*> items_t;
typedef std::list<LLFolderViewFolder*> folders_t;
-private:
- S32 mNumDescendantsSelected;
-
-public: // Accessed needed by LLFolderViewItem
- void recursiveIncrementNumDescendantsSelected(S32 increment);
- S32 numSelected(void) const { return mNumDescendantsSelected + (isSelected() ? 1 : 0); }
-
protected:
items_t mItems;
folders_t mFolders;
@@ -454,7 +452,7 @@ public:
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
// this method is used to group select items
- virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
+ void extendSelectionTo(LLFolderViewItem* selection);
// Returns true is this object and all of its children can be removed.
virtual BOOL isRemovable();
@@ -540,15 +538,25 @@ public:
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg);
+ BOOL handleDragAndDropToThisFolder(MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
virtual void draw();
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(); }
+
+ items_t::const_iterator getItemsBegin() const { return mItems.begin(); }
+ items_t::const_iterator getItemsEnd() const { return mItems.end(); }
+ items_t::size_type getItemsCount() const { return mItems.size(); }
+ LLFolderViewFolder* getCommonAncestor(LLFolderViewItem* item_a, LLFolderViewItem* item_b, bool& reverse);
+ void gatherChildRangeExclusive(LLFolderViewItem* start, LLFolderViewItem* end, bool reverse, std::vector<LLFolderViewItem*>& items);
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~