aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatergroups.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llfloatergroups.h
parentREADME.txt (diff)
downloadmeta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llfloatergroups.h')
-rw-r--r--linden/indra/newview/llfloatergroups.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h
new file mode 100644
index 0000000..ed382f0
--- /dev/null
+++ b/linden/indra/newview/llfloatergroups.h
@@ -0,0 +1,129 @@
1/**
2 * @file llfloatergroups.h
3 * @brief LLFloaterGroups class definition
4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 *
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28/*
29 * Shown from Edit -> Groups...
30 * Shows the agent's groups and allows the edit window to be invoked.
31 * Also overloaded to allow picking of a single group for assigning
32 * objects and land to groups.
33 */
34
35#ifndef LL_LLFLOATERGROUPS_H
36#define LL_LLFLOATERGROUPS_H
37
38//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39// Class llfloatergroups
40//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41
42#include "lluuid.h"
43#include "llmap.h"
44#include "llevent.h"
45#include "llfloater.h"
46
47class LLUICtrl;
48class LLTextBox;
49class LLScrollListCtrl;
50class LLButton;
51
52class LLFloaterGroups : public LLFloater
53{
54public:
55 //LLEventListener
56 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
57
58 enum EGroupDialog
59 {
60 AGENT_GROUPS,
61 CHOOSE_ONE
62 };
63 // Call this with an agent id and AGENT_GROUPS for an agent's
64 // groups, otherwise, call with an object id and SET_OBJECT_GROUP
65 // when modifying an object.
66 static LLFloaterGroups* show(const LLUUID& id, EGroupDialog type);
67
68 // Return the instance requested if it already exists. Otherwise,
69 // return NULL.
70 static LLFloaterGroups* getInstance(const LLUUID& id);
71
72 // clear the group list, and get a fresh set of info.
73 void reset();
74
75 void setOkCallback( void (*callback)(LLUUID, void*),
76 void* userdata);
77
78 EGroupDialog getType() const { return mType; }
79
80protected:
81 // initialize based on the type
82 BOOL postBuild();
83
84 // highlight_id is a group id to highlight
85 void initAgentGroups(const LLUUID& highlight_id);
86 void enableButtons();
87
88 static void onBtnCreate(void* userdata);
89 static void onBtnActivate(void* userdata);
90 static void onBtnInfo(void* userdata);
91 static void onBtnLeave(void* userdata);
92 static void onBtnSearch(void* userdata);
93 static void onBtnVote(void* userdata);
94 static void onBtnOK(void* userdata);
95 static void onBtnCancel(void* userdata);
96 static void onGroupList(LLUICtrl* ctrl, void* userdata);
97 static void onDoubleClickGroup(void* userdata);
98
99 void create();
100 void activate();
101 void info();
102 void leave();
103 void search();
104 void callVote();
105 void ok();
106 void highlightGroupList(LLUICtrl*);
107
108 static void callbackLeaveGroup(S32 option, void* userdata);
109
110protected:
111 LLUUID mID;
112
113 EGroupDialog mType;
114
115 void (*mOKCallback)(LLUUID id, void* userdata);
116 void* mCallbackUserdata;
117
118protected:
119 static LLMap<const LLUUID, LLFloaterGroups*> sInstances;
120
121public:
122 // do not call these directly
123 LLFloaterGroups(const std::string& name, const LLRect& rect, const std::string& title,
124 const LLUUID& id);
125 virtual ~LLFloaterGroups();
126};
127
128
129#endif // LL_LLFLOATERGROUPS_H