summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-01 17:44:44 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-01 17:44:44 +0000
commitf05df68656d2abdc38d86cd6746398fa90eb8614 (patch)
tree95f389551a7132b86dd96ff7c55b92674ee16756 /indra/newview/llavatarlist.h
parent090977608d3d4e1d6d26689064910221c66f6084 (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1868 https://svn.aws.productengine.com/secondlife/pe/stable-2@1876 -> viewer-2.0.0-3
* Bugs: EXT-1111 EXT-915 EXT-1131 EXT-1200 EXT-1202 EXT-1201 EXT-1205 EXT-1212 EXT-1173 EXT-1229 EXT-1218 EXT-1164 EXT-996 EXT-821 EXT-1030 EXT-1031 EXT-816 * Major Bugs: EXT-1142 (timeout during login due to processing group IMs) * Changes: EXT-1216 (minimize message well)
Diffstat (limited to 'indra/newview/llavatarlist.h')
-rw-r--r--indra/newview/llavatarlist.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index 8d79e073d2..ec801645fe 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -37,10 +37,22 @@
#include "llavatarlistitem.h"
+/**
+ * Generic list of avatars.
+ *
+ * Updates itself when it's dirty, using optional name filter.
+ * To initiate update, modify the UUID list and call setDirty().
+ *
+ * @see getIDs()
+ * @see setDirty()
+ * @see setNameFilter()
+ */
class LLAvatarList : public LLFlatListView
{
LOG_CLASS(LLAvatarList);
public:
+ typedef std::vector<LLUUID> uuid_vector_t;
+
struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
{
Optional<S32> volume_column_width;
@@ -51,14 +63,19 @@ public:
LLAvatarList(const Params&);
virtual ~LLAvatarList() {}
- BOOL update(const std::vector<LLUUID>& all_buddies,
- const std::string& name_filter = LLStringUtil::null);
+ virtual void draw(); // from LLView
+
+ void setNameFilter(const std::string& filter);
+ void setDirty(bool val = true) { mDirty = val; }
+ uuid_vector_t& getIDs() { return mIDs; }
void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; }
void sortByName();
protected:
+ void refresh();
+
void addNewItem(const LLUUID& id, const std::string& name, BOOL is_bold, EAddPosition pos = ADD_BOTTOM);
void computeDifference(
const std::vector<LLUUID>& vnew,
@@ -68,6 +85,10 @@ protected:
private:
bool mOnlineGoFirst;
+ bool mDirty;
+
+ std::string mNameFilter;
+ uuid_vector_t mIDs;
LLAvatarListItem::ContextMenu* mContextMenu;
};