diff options
Diffstat (limited to 'indra/newview/llgrouplist.h')
-rw-r--r-- | indra/newview/llgrouplist.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 8dbc13997c..f3ac676edd 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -37,6 +37,8 @@ #include "llflatlistview.h" #include "llpanel.h" #include "llpointer.h" +#include "llstyle.h" +#include "llgroupmgr.h" /** * Auto-updating list of agent groups. @@ -51,6 +53,15 @@ class LLGroupList: public LLFlatListView, public LLOldEvents::LLSimpleListener public: struct Params : public LLInitParam::Block<Params, LLFlatListView::Params> { + /** + * Contains a message for empty list when user is not a member of any group + */ + Optional<std::string> no_groups_msg; + + /** + * Contains a message for empty list when all groups don't match passed filter + */ + Optional<std::string> no_filtered_groups_msg; Params(); }; @@ -58,6 +69,7 @@ public: virtual ~LLGroupList(); virtual void draw(); // from LLView + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); // from LLView void setNameFilter(const std::string& filter); void toggleIcons(); @@ -66,12 +78,19 @@ public: private: void setDirty(bool val = true) { mDirty = val; } void refresh(); - void addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, BOOL is_bold, EAddPosition pos = ADD_BOTTOM); + void addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, EAddPosition pos = ADD_BOTTOM); bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); // called on agent group list changes + bool onContextMenuItemClick(const LLSD& userdata); + bool onContextMenuItemEnable(const LLSD& userdata); + + LLHandle<LLView> mContextMenuHandle; + bool mShowIcons; bool mDirty; std::string mNameFilter; + std::string mNoFilteredGroupsMsg; + std::string mNoGroupsMsg; }; class LLButton; @@ -79,9 +98,11 @@ class LLIconCtrl; class LLTextBox; class LLGroupListItem : public LLPanel + , public LLGroupMgrObserver { public: LLGroupListItem(); + ~LLGroupListItem(); /*virtual*/ BOOL postBuild(); /*virtual*/ void setValue(const LLSD& value); void onMouseEnter(S32 x, S32 y, MASK mask); @@ -90,11 +111,12 @@ public: const LLUUID& getGroupID() const { return mGroupID; } const std::string& getGroupName() const { return mGroupName; } - void setName(const std::string& name); + void setName(const std::string& name, const std::string& highlight = LLStringUtil::null); void setGroupID(const LLUUID& group_id); void setGroupIconID(const LLUUID& group_icon_id); void setGroupIconVisible(bool visible); + virtual void changed(LLGroupChange gc); private: void setActive(bool active); void onInfoBtnClick(); @@ -106,6 +128,7 @@ private: LLButton* mInfoBtn; std::string mGroupName; + LLStyle::Params mGroupNameStyle; static S32 sIconWidth; // icon width + padding }; |