aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloateractivespeakers.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloateractivespeakers.h')
-rw-r--r--linden/indra/newview/llfloateractivespeakers.h61
1 files changed, 56 insertions, 5 deletions
diff --git a/linden/indra/newview/llfloateractivespeakers.h b/linden/indra/newview/llfloateractivespeakers.h
index cded35d..1088be3 100644
--- a/linden/indra/newview/llfloateractivespeakers.h
+++ b/linden/indra/newview/llfloateractivespeakers.h
@@ -37,6 +37,7 @@
37#include "llvoiceclient.h" 37#include "llvoiceclient.h"
38#include "llframetimer.h" 38#include "llframetimer.h"
39#include "llevent.h" 39#include "llevent.h"
40#include <list>
40 41
41class LLScrollListCtrl; 42class LLScrollListCtrl;
42class LLButton; 43class LLButton;
@@ -106,7 +107,17 @@ public:
106 /*virtual*/ LLSD getValue(); 107 /*virtual*/ LLSD getValue();
107}; 108};
108 109
109class LLSpeakerMgr 110class LLSpeakerListChangeEvent : public LLEvent
111{
112public:
113 LLSpeakerListChangeEvent(LLSpeakerMgr* source, const LLUUID& speaker_id);
114 /*virtual*/ LLSD getValue();
115
116private:
117 const LLUUID& mSpeakerID;
118};
119
120class LLSpeakerMgr : public LLObservable
110{ 121{
111public: 122public:
112 LLSpeakerMgr(LLVoiceChannel* channelp); 123 LLSpeakerMgr(LLVoiceChannel* channelp);
@@ -196,7 +207,6 @@ class LLPanelActiveSpeakers : public LLPanel
196{ 207{
197public: 208public:
198 LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters); 209 LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters);
199 virtual ~LLPanelActiveSpeakers();
200 210
201 /*virtual*/ BOOL postBuild(); 211 /*virtual*/ BOOL postBuild();
202 212
@@ -222,16 +232,54 @@ public:
222 static void onChangeModerationMode(LLUICtrl* ctrl, void* user_data); 232 static void onChangeModerationMode(LLUICtrl* ctrl, void* user_data);
223 233
224protected: 234protected:
225 class LLSpeakerListener : public LLSimpleListener 235 class SpeakerMuteListener : public LLSimpleListener
226 { 236 {
227 public: 237 public:
228 LLSpeakerListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {} 238 SpeakerMuteListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
229 239
230 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); 240 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
231 241
232 LLPanelActiveSpeakers* mPanel; 242 LLPanelActiveSpeakers* mPanel;
233 }; 243 };
234 244
245 friend class SpeakerAddListener;
246 class SpeakerAddListener : public LLSimpleListener
247 {
248 public:
249 SpeakerAddListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
250
251 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
252
253 LLPanelActiveSpeakers* mPanel;
254 };
255
256 friend class SpeakerRemoveListener;
257 class SpeakerRemoveListener : public LLSimpleListener
258 {
259 public:
260 SpeakerRemoveListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
261
262 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
263
264 LLPanelActiveSpeakers* mPanel;
265 };
266
267
268 friend class SpeakerClearListener;
269 class SpeakerClearListener : public LLSimpleListener
270 {
271 public:
272 SpeakerClearListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
273
274 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
275
276 LLPanelActiveSpeakers* mPanel;
277 };
278
279 void addSpeaker(const LLUUID& id);
280 void removeSpeaker(const LLUUID& id);
281
282
235 LLScrollListCtrl* mSpeakerList; 283 LLScrollListCtrl* mSpeakerList;
236 LLUICtrl* mMuteVoiceCtrl; 284 LLUICtrl* mMuteVoiceCtrl;
237 LLUICtrl* mMuteTextCtrl; 285 LLUICtrl* mMuteTextCtrl;
@@ -240,7 +288,10 @@ protected:
240 BOOL mShowTextChatters; 288 BOOL mShowTextChatters;
241 LLSpeakerMgr* mSpeakerMgr; 289 LLSpeakerMgr* mSpeakerMgr;
242 LLFrameTimer mIconAnimationTimer; 290 LLFrameTimer mIconAnimationTimer;
243 LLPointer<LLSpeakerListener> mSpeakerListener; 291 LLPointer<SpeakerMuteListener> mSpeakerMuteListener;
292 LLPointer<SpeakerAddListener> mSpeakerAddListener;
293 LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener;
294 LLPointer<SpeakerClearListener> mSpeakerClearListener;
244}; 295};
245 296
246extern LLLocalSpeakerMgr* gLocalSpeakerMgr; 297extern LLLocalSpeakerMgr* gLocalSpeakerMgr;