aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterfriends.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/llfloaterfriends.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/llfloaterfriends.h')
-rw-r--r--linden/indra/newview/llfloaterfriends.h143
1 files changed, 143 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterfriends.h b/linden/indra/newview/llfloaterfriends.h
new file mode 100644
index 0000000..236ac34
--- /dev/null
+++ b/linden/indra/newview/llfloaterfriends.h
@@ -0,0 +1,143 @@
1/**
2 * @file llfloaterfriends.h
3 * @author Phoenix
4 * @date 2005-01-13
5 * @brief Declaration of class for displaying the local agent's friends.
6 *
7 * Copyright (c) 2005-2007, Linden Research, Inc.
8 *
9 * The source code in this file ("Source Code") is provided by Linden Lab
10 * to you under the terms of the GNU General Public License, version 2.0
11 * ("GPL"), unless you have obtained a separate licensing agreement
12 * ("Other License"), formally executed by you and Linden Lab. Terms of
13 * the GPL can be found in doc/GPL-license.txt in this distribution, or
14 * online at http://secondlife.com/developers/opensource/gplv2
15 *
16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlife.com/developers/opensource/flossexception
20 *
21 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above,
23 * and agree to abide by those obligations.
24 *
25 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
26 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27 * COMPLETENESS OR PERFORMANCE.
28 */
29
30#ifndef LL_LLFLOATERFRIENDS_H
31#define LL_LLFLOATERFRIENDS_H
32
33#include "llfloater.h"
34#include "llstring.h"
35#include "lluuid.h"
36#include "lltimer.h"
37
38class LLFriendObserver;
39
40
41/**
42 * @class LLFloaterFriends
43 * @brief An instance of this class is used for displaying your friends
44 * and gives you quick access to all agents which a user relationship.
45 *
46 * @sa LLFloater
47 */
48class LLFloaterFriends : public LLFloater, public LLEventTimer
49{
50public:
51 virtual ~LLFloaterFriends();
52
53 /**
54 * @brief This method either creates or brings to the front the
55 * current instantiation of this floater. There is only once since
56 * you can currently only look at your local friends.
57 */
58 static void show(void* ignored = NULL);
59
60 virtual void tick();
61
62 /**
63 * @brief This method is called in response to the LLAvatarTracker
64 * sending out a changed() message.
65 */
66 void updateFriends(U32 changed_mask);
67
68 virtual BOOL postBuild();
69
70 static BOOL visible(void* unused = NULL);
71
72 // Toggles visibility of floater
73 static void toggle(void* unused = NULL);
74
75 static void requestFriendship(const LLUUID& target_id, const LLString& target_name);
76
77private:
78
79 enum FRIENDS_COLUMN_ORDER
80 {
81 LIST_ONLINE_STATUS,
82 LIST_FRIEND_NAME,
83 LIST_VISIBLE_ONLINE,
84 LIST_VISIBLE_MAP,
85 LIST_EDIT_MINE,
86 LIST_EDIT_THEIRS
87 };
88
89 // protected members
90 LLFloaterFriends();
91
92 void reloadNames();
93 void refreshNames();
94 void refreshUI();
95 void refreshRightsChangeList(U8 state);
96 void applyRightsToFriends(S32 flag, BOOL value);
97 void updateMenuState(S32 flag, BOOL value);
98 S32 getMenuState() { return mMenuState; }
99 void addFriend(const std::string& name, const LLUUID& agent_id);
100
101 // return LLUUID::null if nothing is selected
102 static LLDynamicArray<LLUUID> getSelectedIDs();
103
104 // callback methods
105 static void onSelectName(LLUICtrl* ctrl, void* user_data);
106 static void callbackAddFriend(S32 option, void* user_data);
107 static void onPickAvatar(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* user_data);
108 static void onMaximumSelect(void* user_data);
109
110 static void onClickIM(void* user_data);
111 static void onClickProfile(void* user_data);
112 static void onClickAddFriend(void* user_data);
113 static void onClickRemove(void* user_data);
114
115 static void onClickOfferTeleport(void* user_data);
116 static void onClickPay(void* user_data);
117
118 static void onClickClose(void* user_data);
119
120 static void onClickOnlineStatus(LLUICtrl* ctrl, void* user_data);
121 static void onClickMapStatus(LLUICtrl* ctrl, void* user_data);
122 static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
123
124 static void handleRemove(S32 option, void* user_data);
125 static void handleModifyRights(S32 option, void* user_data);
126
127private:
128 // static data
129 static LLFloaterFriends* sInstance;
130
131 // member data
132 LLFriendObserver* mObserver;
133 LLUUID mAddFriendID;
134 LLString mAddFriendName;
135 LLScrollListCtrl* mFriendsList;
136 S32 mMenuState;
137 BOOL mShowMaxSelectWarning;
138 BOOL mAllowRightsChange;
139 S32 mNumRightsChanged;
140};
141
142
143#endif // LL_LLFLOATERFRIENDS_H