diff options
Diffstat (limited to 'linden/indra/newview/llfloateractivespeakers.h')
-rw-r--r-- | linden/indra/newview/llfloateractivespeakers.h | 61 |
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 | ||
41 | class LLScrollListCtrl; | 42 | class LLScrollListCtrl; |
42 | class LLButton; | 43 | class LLButton; |
@@ -106,7 +107,17 @@ public: | |||
106 | /*virtual*/ LLSD getValue(); | 107 | /*virtual*/ LLSD getValue(); |
107 | }; | 108 | }; |
108 | 109 | ||
109 | class LLSpeakerMgr | 110 | class LLSpeakerListChangeEvent : public LLEvent |
111 | { | ||
112 | public: | ||
113 | LLSpeakerListChangeEvent(LLSpeakerMgr* source, const LLUUID& speaker_id); | ||
114 | /*virtual*/ LLSD getValue(); | ||
115 | |||
116 | private: | ||
117 | const LLUUID& mSpeakerID; | ||
118 | }; | ||
119 | |||
120 | class LLSpeakerMgr : public LLObservable | ||
110 | { | 121 | { |
111 | public: | 122 | public: |
112 | LLSpeakerMgr(LLVoiceChannel* channelp); | 123 | LLSpeakerMgr(LLVoiceChannel* channelp); |
@@ -196,7 +207,6 @@ class LLPanelActiveSpeakers : public LLPanel | |||
196 | { | 207 | { |
197 | public: | 208 | public: |
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 | ||
224 | protected: | 234 | protected: |
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 | ||
246 | extern LLLocalSpeakerMgr* gLocalSpeakerMgr; | 297 | extern LLLocalSpeakerMgr* gLocalSpeakerMgr; |