aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatergroups.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/llfloatergroups.h
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/newview/llfloatergroups.h')
-rw-r--r--linden/indra/newview/llfloatergroups.h79
1 files changed, 35 insertions, 44 deletions
diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h
index 9c51d2f..ed5b8b2 100644
--- a/linden/indra/newview/llfloatergroups.h
+++ b/linden/indra/newview/llfloatergroups.h
@@ -41,89 +41,80 @@
41//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 41//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42 42
43#include "lluuid.h" 43#include "lluuid.h"
44#include "llmap.h"
45#include "llevent.h"
46#include "llfloater.h" 44#include "llfloater.h"
45#include <map>
47 46
48class LLUICtrl; 47class LLUICtrl;
49class LLTextBox; 48class LLTextBox;
50class LLScrollListCtrl; 49class LLScrollListCtrl;
51class LLButton; 50class LLButton;
51class LLFloaterGroupPicker;
52 52
53class LLFloaterGroups : public LLFloater 53class LLFloaterGroupPicker : public LLFloater, public LLUIInstanceMgr<LLFloaterGroupPicker>
54{ 54{
55 friend class LLUIInstanceMgr<LLFloaterGroupPicker>;
55public: 56public:
57 ~LLFloaterGroupPicker();
58 void setSelectCallback( void (*callback)(LLUUID, void*),
59 void* userdata);
60 BOOL postBuild();
61
62protected:
63 LLFloaterGroupPicker(const LLSD& seed);
64 void ok();
65 static LLFloaterGroupPicker* findInstance(const LLSD& seed);
66 static LLFloaterGroupPicker* createInstance(const LLSD& seed);
67 static void onBtnOK(void* userdata);
68 static void onBtnCancel(void* userdata);
69
70protected:
71 LLUUID mID;
72 void (*mSelectCallback)(LLUUID id, void* userdata);
73 void* mCallbackUserdata;
74
75 typedef std::map<const LLUUID, LLFloaterGroupPicker*> instance_map_t;
76 static instance_map_t sInstances;
77};
78
79class LLPanelGroups : public LLPanel
80{
81public:
82 LLPanelGroups();
83 virtual ~LLPanelGroups();
84
56 //LLEventListener 85 //LLEventListener
57 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); 86 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
58 87
59 enum EGroupDialog
60 {
61 AGENT_GROUPS,
62 CHOOSE_ONE
63 };
64 // Call this with an agent id and AGENT_GROUPS for an agent's
65 // groups, otherwise, call with an object id and SET_OBJECT_GROUP
66 // when modifying an object.
67 static LLFloaterGroups* show(const LLUUID& id, EGroupDialog type);
68
69 // Return the instance requested if it already exists. Otherwise,
70 // return NULL.
71 static LLFloaterGroups* getInstance(const LLUUID& id);
72
73 // clear the group list, and get a fresh set of info. 88 // clear the group list, and get a fresh set of info.
74 void reset(); 89 void reset();
75 90
76 void setOkCallback( void (*callback)(LLUUID, void*),
77 void* userdata);
78
79 EGroupDialog getType() const { return mType; }
80
81protected: 91protected:
82 // initialize based on the type 92 // initialize based on the type
83 BOOL postBuild(); 93 BOOL postBuild();
84 94
85 // highlight_id is a group id to highlight 95 // highlight_id is a group id to highlight
86 void initAgentGroups(const LLUUID& highlight_id);
87 void enableButtons(); 96 void enableButtons();
88 97
98 static void onGroupList(LLUICtrl* ctrl, void* userdata);
89 static void onBtnCreate(void* userdata); 99 static void onBtnCreate(void* userdata);
90 static void onBtnActivate(void* userdata); 100 static void onBtnActivate(void* userdata);
91 static void onBtnInfo(void* userdata); 101 static void onBtnInfo(void* userdata);
102 static void onBtnIM(void* userdata);
92 static void onBtnLeave(void* userdata); 103 static void onBtnLeave(void* userdata);
93 static void onBtnSearch(void* userdata); 104 static void onBtnSearch(void* userdata);
94 static void onBtnVote(void* userdata); 105 static void onBtnVote(void* userdata);
95 static void onBtnOK(void* userdata);
96 static void onBtnCancel(void* userdata);
97 static void onGroupList(LLUICtrl* ctrl, void* userdata);
98 static void onDoubleClickGroup(void* userdata); 106 static void onDoubleClickGroup(void* userdata);
99 107
100 void create(); 108 void create();
101 void activate(); 109 void activate();
102 void info(); 110 void info();
111 void startIM();
103 void leave(); 112 void leave();
104 void search(); 113 void search();
105 void callVote(); 114 void callVote();
106 void ok();
107 void highlightGroupList(LLUICtrl*);
108 115
109 static void callbackLeaveGroup(S32 option, void* userdata); 116 static void callbackLeaveGroup(S32 option, void* userdata);
110 117
111protected:
112 LLUUID mID;
113
114 EGroupDialog mType;
115
116 void (*mOKCallback)(LLUUID id, void* userdata);
117 void* mCallbackUserdata;
118
119protected:
120 static LLMap<const LLUUID, LLFloaterGroups*> sInstances;
121
122public:
123 // do not call these directly
124 LLFloaterGroups(const std::string& name, const LLRect& rect, const std::string& title,
125 const LLUUID& id);
126 virtual ~LLFloaterGroups();
127}; 118};
128 119
129 120