aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/panelradar.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/panelradar.h64
1 files changed, 34 insertions, 30 deletions
diff --git a/linden/indra/newview/panelradar.h b/linden/indra/newview/panelradar.h
index de7760f..af0ca2a 100644
--- a/linden/indra/newview/panelradar.h
+++ b/linden/indra/newview/panelradar.h
@@ -33,6 +33,7 @@
33#include "llpanel.h" 33#include "llpanel.h"
34#include "llscrolllistctrl.h" 34#include "llscrolllistctrl.h"
35 35
36class PanelRadarEntry;
36 37
37class PanelRadar : public LLPanel 38class PanelRadar : public LLPanel
38{ 39{
@@ -42,44 +43,44 @@ public:
42 43
43 BOOL postBuild(); 44 BOOL postBuild();
44 45
45 // returns true if agent_id belongs to an Imprudence developer 46 // Returns true if agent_id belongs to an Imprudence developer
46 static bool isImpDev(LLUUID agent_id); 47 bool isImpDev(const LLUUID& agent_id);
47 48 // Change the camera focus to an avatar
49 void lookAtAvatar(const LLUUID& agent_id);
50
51 // Returns UUID of currently selected avatar
48 LLUUID getSelected(); 52 LLUUID getSelected();
49 53
50 void addToTypingList(LLUUID agent_id); 54 // Updates the radar button states
51 void removeFromTypingList(LLUUID agent_id);
52
53 void updateButtonStates(); 55 void updateButtonStates();
54 void populateRadar(); 56 // Update the list of known avatars
57 void updateRadarInfo();
58 // Update the radar UI. Call updateRadarInfo first
59 void updateRadarDisplay();
60
61 // Returns PanelRadarEntry* if key is found, NULL if not
62 PanelRadarEntry* getEntry(const LLUUID& agent_id);
63 // Returns true if avatar is in the radar's list
64 bool isKnown(const LLUUID& agent_id);
55 65
56private: 66private:
57 67
58 // TODO: move all this info into its own object. It's stupid 68 std::map<LLUUID, PanelRadarEntry> mAvatars;
59 // and bug-prone to keep it all in separate containers, but 69
60 // I want to get this out for 1.2 -- McCabe 70 // Returns your distance from an avatar's position
61 std::set<LLUUID> mChatAvatars; 71 F32 calculateDistance(const LLUUID& agent_id, LLVector3d agent_position);
62 std::set<LLUUID> mTypingAvatars; 72 // Removes avatar IDs no longer known to the viewer
63 std::set<LLUUID> mSimAvatars; 73 void removeDeadEntries(const std::vector<LLUUID>& agent_ids);
64 74
65 LLScrollListCtrl* mRadarList; 75 LLScrollListCtrl* mRadarList;
66 LLUUID mSelectedAvatar; 76 LLUUID mSelectedAvatar;
67 77
68 void updateChatList(std::vector<LLUUID> agent_ids);
69 bool isInChatList(LLUUID agent_id);
70 void addToChatList(LLUUID agent_id, std::string distance);
71 void removeFromChatList(LLUUID agent_id);
72
73 bool isInSimAvList(LLUUID agent_id);
74 void addToSimAvList(LLUUID agent_id, std::string distance);
75 void updateSimAvList(std::vector<LLUUID> agent_ids);
76
77 bool isTyping(LLUUID agent_id);
78
79 bool visibleItemsSelected() const; 78 bool visibleItemsSelected() const;
80 bool isKickable(const LLUUID &agent_id); 79 bool isKickable(const LLUUID &agent_id);
81 80
82 static std::string getSelectedName(const LLUUID &agent_id); 81 std::string getSelectedName(const LLUUID &agent_id);
82
83 void sendAvatarPropertiesRequest(const LLUUID &agent_id);
83 84
84 static void onUseRadarList(LLUICtrl* ctrl, void* user_data); 85 static void onUseRadarList(LLUICtrl* ctrl, void* user_data);
85 static void onRangeChange(LLFocusableElement* focus, void* user_data); 86 static void onRangeChange(LLFocusableElement* focus, void* user_data);
@@ -93,25 +94,28 @@ private:
93 static void onClickInvite(void* user_data); 94 static void onClickInvite(void* user_data);
94 static void callback_invite_to_group(LLUUID group_id, void *user_data); 95 static void callback_invite_to_group(LLUUID group_id, void *user_data);
95 96
97 static void onClickCam(void* user_data);
96 static void onClickFreeze(void *user_data); 98 static void onClickFreeze(void *user_data);
99 static void onClickUnfreeze(void *user_data);
97 static void onClickEject(void *user_data); 100 static void onClickEject(void *user_data);
98 static void onClickMute(void *user_data); 101 static void onClickMute(void *user_data);
99 static void onClickUnmute(void *user_data); 102 static void onClickUnmute(void *user_data);
100 static void onClickAR(void *user_data); 103 static void onClickAR(void *user_data);
101 static void onClickEjectFromEstate(void *user_data); 104 //static void onClickEjectFromEstate(void *user_data); Not working yet
105 static void onClickBanFromEstate(void *user_data);
102 106
103 static void callbackAR(void *user_data); 107 static void callbackAR(void *user_data);
104 static bool callbackFreeze(const LLSD& notification, const LLSD& response, PanelRadar *self); 108 static bool callbackFreeze(const LLSD& notification, const LLSD& response, PanelRadar *self);
105 static bool callbackEject(const LLSD& notification, const LLSD& response, PanelRadar *self); 109 static bool callbackEject(const LLSD& notification, const LLSD& response, PanelRadar *self);
106 static bool callbackEjectFromEstate(const LLSD& notification, const LLSD& response, PanelRadar *self); 110 //static bool callbackEjectFromEstate(const LLSD& notification, const LLSD& response, PanelRadar *self);
111 static bool callbackBanFromEstate(const LLSD& notification, const LLSD& response, PanelRadar *self);
107 112
108 static void sendFreeze(const LLUUID &avatar, bool); 113 static void sendFreeze(const LLUUID& avatar, bool freeze);
109 static void sendEject(const LLUUID &avatar, bool); 114 static void sendEject(const LLUUID& avatar, bool ban);
110 static void cmdEstateEject(const LLUUID &avatar); 115 static void cmdEstateEject(const LLUUID &avatar);
111 static void cmdEstateBan(const LLUUID &avatar); 116 static void cmdEstateBan(const LLUUID &avatar);
112 static void sendEstateBan(const LLUUID& agent); 117 static void sendEstateBan(const LLUUID& agent);
113 static void sendEstateMessage(const char* request, const LLUUID &target); 118 static void sendEstateMessage(const char* request, const LLUUID &target);
114
115}; 119};
116 120
117 121