summaryrefslogtreecommitdiff
path: root/indra/llui/llflatlistview.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llflatlistview.h')
-rw-r--r--indra/llui/llflatlistview.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index f4e0426f15..50d06fbc94 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -105,6 +105,9 @@ public:
/** don't allow to deselect all selected items (for mouse events on items only) */
Optional<bool> keep_one_selected;
+ /** try to keep selection visible after reshape */
+ Optional<bool> keep_selection_visible_on_reshape;
+
/** padding between items */
Optional<U32> item_pad;
@@ -114,6 +117,9 @@ public:
Params();
};
+ // disable traversal when finding widget to hand focus off to
+ /*virtual*/ BOOL canFocusChildren() const { return FALSE; }
+
/**
* Connects callback to signal called when Return key is pressed.
*/
@@ -146,19 +152,19 @@ public:
* Remove specified item
* @return true if the item was removed, false otherwise
*/
- virtual bool removeItem(LLPanel* item);
+ virtual bool removeItem(LLPanel* item, bool rearrange = true);
/**
* Remove an item specified by value
* @return true if the item was removed, false otherwise
*/
- virtual bool removeItemByValue(const LLSD& value);
+ virtual bool removeItemByValue(const LLSD& value, bool rearrange = true);
/**
* Remove an item specified by uuid
* @return true if the item was removed, false otherwise
*/
- virtual bool removeItemByUUID(const LLUUID& uuid);
+ virtual bool removeItemByUUID(const LLUUID& uuid, bool rearrange = true);
/**
* Get an item by value
@@ -259,6 +265,7 @@ public:
void setAllowSelection(bool can_select) { mAllowSelection = can_select; }
/** Sets flag whether onCommit should be fired if selection was changed */
+ // FIXME: this should really be a separate signal, since "Commit" implies explicit user action, and selection changes can happen more indirectly.
void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; }
/** Get number of selected items in the list */
@@ -346,7 +353,7 @@ protected:
virtual bool isSelected(item_pair_t* item_pair) const;
- virtual bool removeItemPair(item_pair_t* item_pair);
+ virtual bool removeItemPair(item_pair_t* item_pair, bool rearrange);
/**
* Notify parent about changed size of internal controls with "size_changes" action
@@ -412,6 +419,8 @@ private:
bool mIsConsecutiveSelection;
+ bool mKeepSelectionVisibleOnReshape;
+
/** All pairs of the list */
pairs_list_t mItemPairs;
@@ -465,6 +474,10 @@ public:
void setNoItemsMsg(const std::string& msg) { mNoItemsMsg = msg; }
void setNoFilteredItemsMsg(const std::string& msg) { mNoFilteredItemsMsg = msg; }
+ bool getForceShowingUnmatchedItems();
+
+ void setForceShowingUnmatchedItems(bool show);
+
/**
* Sets up new filter string and filters the list.
*/
@@ -476,6 +489,11 @@ public:
*/
void filterItems();
+ /**
+ * Returns true if last call of filterItems() found at least one matching item
+ */
+ bool hasMatchedItems();
+
protected:
LLFlatListViewEx(const Params& p);
@@ -491,6 +509,14 @@ private:
std::string mNoFilteredItemsMsg;
std::string mNoItemsMsg;
std::string mFilterSubString;
+ /**
+ * Show list items that don't match current filter
+ */
+ bool mForceShowingUnmatchedItems;
+ /**
+ * True if last call of filterItems() found at least one matching item
+ */
+ bool mHasMatchedItems;
};
#endif