00001 00032 /* 00033 * Shown from Edit -> Groups... 00034 * Shows the agent's groups and allows the edit window to be invoked. 00035 * Also overloaded to allow picking of a single group for assigning 00036 * objects and land to groups. 00037 */ 00038 00039 #ifndef LL_LLFLOATERGROUPS_H 00040 #define LL_LLFLOATERGROUPS_H 00041 00042 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00043 // Class llfloatergroups 00044 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00045 00046 #include "lluuid.h" 00047 #include "llfloater.h" 00048 #include <map> 00049 00050 class LLUICtrl; 00051 class LLTextBox; 00052 class LLScrollListCtrl; 00053 class LLButton; 00054 class LLFloaterGroupPicker; 00055 00056 class LLFloaterGroupPicker : public LLFloater, public LLUIInstanceMgr<LLFloaterGroupPicker> 00057 { 00058 friend class LLUIInstanceMgr<LLFloaterGroupPicker>; 00059 public: 00060 ~LLFloaterGroupPicker(); 00061 void setSelectCallback( void (*callback)(LLUUID, void*), 00062 void* userdata); 00063 void setPowersMask(U64 powers_mask); 00064 BOOL postBuild(); 00065 00066 protected: 00067 LLFloaterGroupPicker(const LLSD& seed); 00068 void ok(); 00069 static LLFloaterGroupPicker* findInstance(const LLSD& seed); 00070 static LLFloaterGroupPicker* createInstance(const LLSD& seed); 00071 static void onBtnOK(void* userdata); 00072 static void onBtnCancel(void* userdata); 00073 00074 protected: 00075 LLUUID mID; 00076 U64 mPowersMask; 00077 void (*mSelectCallback)(LLUUID id, void* userdata); 00078 void* mCallbackUserdata; 00079 00080 typedef std::map<const LLUUID, LLFloaterGroupPicker*> instance_map_t; 00081 static instance_map_t sInstances; 00082 }; 00083 00084 class LLPanelGroups : public LLPanel 00085 { 00086 public: 00087 LLPanelGroups(); 00088 virtual ~LLPanelGroups(); 00089 00090 //LLEventListener 00091 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); 00092 00093 // clear the group list, and get a fresh set of info. 00094 void reset(); 00095 00096 protected: 00097 // initialize based on the type 00098 BOOL postBuild(); 00099 00100 // highlight_id is a group id to highlight 00101 void enableButtons(); 00102 00103 static void onGroupList(LLUICtrl* ctrl, void* userdata); 00104 static void onBtnCreate(void* userdata); 00105 static void onBtnActivate(void* userdata); 00106 static void onBtnInfo(void* userdata); 00107 static void onBtnIM(void* userdata); 00108 static void onBtnLeave(void* userdata); 00109 static void onBtnSearch(void* userdata); 00110 static void onBtnVote(void* userdata); 00111 static void onDoubleClickGroup(void* userdata); 00112 00113 void create(); 00114 void activate(); 00115 void info(); 00116 void startIM(); 00117 void leave(); 00118 void search(); 00119 void callVote(); 00120 00121 static void callbackLeaveGroup(S32 option, void* userdata); 00122 00123 }; 00124 00125 00126 #endif // LL_LLFLOATERGROUPS_H