diff options
author | Jacek Antonelli | 2009-10-29 02:03:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-10-29 02:45:02 -0500 |
commit | 5969412f5e9342955c79b57a10d3d6f987a06d1c (patch) | |
tree | 0eecf3faa609ae2b371641a6ed55de457a0698f9 /linden/indra/newview/panelradar.h | |
parent | Moved radar XML to panel_radar.xml and cleaned it up. (diff) | |
download | meta-impy-5969412f5e9342955c79b57a10d3d6f987a06d1c.zip meta-impy-5969412f5e9342955c79b57a10d3d6f987a06d1c.tar.gz meta-impy-5969412f5e9342955c79b57a10d3d6f987a06d1c.tar.bz2 meta-impy-5969412f5e9342955c79b57a10d3d6f987a06d1c.tar.xz |
Added PanelRadar class, refactored from LLFloaterMap.
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/panelradar.h | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/linden/indra/newview/panelradar.h b/linden/indra/newview/panelradar.h new file mode 100644 index 0000000..ca253dd --- /dev/null +++ b/linden/indra/newview/panelradar.h | |||
@@ -0,0 +1,114 @@ | |||
1 | /** | ||
2 | * @file panelradar.h | ||
3 | * @brief PanelRadar class header (list of nearby agents) | ||
4 | * | ||
5 | * Copyright (c) 2009, McCabe Maxsted, Jacek Antonelli, Dale Glass | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided to you | ||
8 | * under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
10 | * this distribution, or online at | ||
11 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
12 | * | ||
13 | * There are special exceptions to the terms and conditions of the GPL as | ||
14 | * it is applied to this Source Code. View the full text of the exception | ||
15 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
16 | * online at | ||
17 | * http://secondlifegrid.net/programs/open_source/licensing/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 SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | |||
29 | #ifndef PANELRADAR_H | ||
30 | #define PANELRADAR_H | ||
31 | |||
32 | |||
33 | #include "llpanel.h" | ||
34 | #include "llscrolllistctrl.h" | ||
35 | |||
36 | |||
37 | class PanelRadar : public LLPanel | ||
38 | { | ||
39 | public: | ||
40 | PanelRadar(); | ||
41 | virtual ~PanelRadar(); | ||
42 | |||
43 | BOOL postBuild(); | ||
44 | |||
45 | // returns true if agent_id belongs to a developer listed in llfloatermap.cpp | ||
46 | static bool isImpDev(LLUUID agent_id); | ||
47 | |||
48 | LLUUID getSelected(); | ||
49 | bool isTyping(LLUUID agent_id); | ||
50 | void updateTypingList(LLUUID agent_id, bool remove); | ||
51 | |||
52 | LLScrollListCtrl* mRadarList; | ||
53 | LLUUID mSelectedAvatar; | ||
54 | |||
55 | // TODO: move all this info into its own object. It's stupid | ||
56 | // and bug-prone to keep it all in separate containers, but | ||
57 | // I want to get this out for 1.2 -- McCabe | ||
58 | std::set<LLUUID> mChatAvatars; | ||
59 | std::set<LLUUID> mTypingAvatars; | ||
60 | std::set<LLUUID> mSimAvatars; | ||
61 | bool mUpdate; | ||
62 | |||
63 | static void onList(LLUICtrl* ctrl, void* user_data); | ||
64 | static void onRangeChange(LLFocusableElement* focus, void* user_data); | ||
65 | BOOL visibleItemsSelected() const; | ||
66 | BOOL isKickable(const LLUUID &agent_id); | ||
67 | void toggleButtons(); | ||
68 | void populateRadar(); | ||
69 | |||
70 | void updateChatList(std::vector<LLUUID> agent_ids); | ||
71 | bool isInChatList(LLUUID agent_id); | ||
72 | void addToChatList(LLUUID agent_id, std::string distance); | ||
73 | void removeFromChatList(LLUUID agent_id); | ||
74 | |||
75 | bool getInSimAvList(LLUUID agent_id); | ||
76 | void addToSimAvList(LLUUID agent_id, std::string distance); | ||
77 | void updateSimAvList(std::vector<LLUUID> agent_ids); | ||
78 | |||
79 | private: | ||
80 | |||
81 | static std::string getSelectedName(const LLUUID &agent_id); | ||
82 | |||
83 | static void onClickProfile(void* user_data); | ||
84 | static void onClickIM(void* user_data); | ||
85 | static void onClickAddFriend(void* user_data); | ||
86 | static void onClickOfferTeleport(void* user_data); | ||
87 | static void onClickTrack(void* user_data); | ||
88 | static void onClickInvite(void* user_data); | ||
89 | static void callback_invite_to_group(LLUUID group_id, void *user_data); | ||
90 | |||
91 | static void onClickFreeze(void *user_data); | ||
92 | static void onClickEject(void *user_data); | ||
93 | static void onClickMute(void *user_data); | ||
94 | static void onClickUnmute(void *user_data); | ||
95 | static void onClickAR(void *user_data); | ||
96 | static void onClickEjectFromEstate(void *user_data); | ||
97 | |||
98 | static void callbackFreeze(S32 option, void *user_data); | ||
99 | static void callbackEject(S32 option, void *user_data); | ||
100 | static void callbackAR(void *user_data); | ||
101 | static void callbackEjectFromEstate(S32 option, void *user_data); | ||
102 | |||
103 | static void sendFreeze(const LLUUID &avatar, bool); | ||
104 | static void sendEject(const LLUUID &avatar, bool); | ||
105 | static void cmdEstateEject(const LLUUID &avatar); | ||
106 | static void cmdEstateBan(const LLUUID &avatar); | ||
107 | static void sendEstateBan(const LLUUID& agent); | ||
108 | static void sendEstateMessage(const char* request, const LLUUID &target); | ||
109 | |||
110 | }; | ||
111 | |||
112 | |||
113 | #endif // PANELRADAR_H | ||
114 | |||