From 92d3e335dcdf9cff143cf507c79925733254c896 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Mon, 9 Nov 2009 17:44:55 +0200 Subject: partial implementation for the major task (EXT-989) IM chiclets should expand to show active voice indicator --HG-- branch : product-engine --- indra/newview/llchiclet.h | 88 +++++++++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 33 deletions(-) (limited to 'indra/newview/llchiclet.h') diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index b50702205c..15c9a0bad8 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -147,13 +147,13 @@ protected: }; /* - * Class for displaying status of Voice Chat + * Class for displaying of speaker's voice indicator */ -class LLChicletSpeakerCtrl : public LLIconCtrl +class LLChicletSpeakerCtrl : public LLOutputMonitorCtrl { public: - struct Params : public LLInitParam::Block + struct Params : public LLInitParam::Block { Params(){}; }; @@ -266,8 +266,6 @@ private: * Base class for Instant Message chiclets. * IMChiclet displays icon, number of unread messages(optional) * and voice chat status(optional). -* Every chiclet should override LLUICtrl::getRequiredRect and return -* desired width. */ class LLIMChiclet : public LLChiclet { @@ -306,15 +304,25 @@ public: virtual LLUUID getOtherParticipantId() { return mOtherParticipantId; } /* - * Shows/hides voice chat status control. + * Init Speaker Control with speaker's ID */ - virtual void setShowSpeaker(bool show) { mShowSpeaker = show; } + virtual void initSpeakerControl(); + + /* + * set status (Shows/Hide) for voice control. + */ + virtual void setShowSpeaker(bool show); /* * Returns voice chat status control visibility. */ virtual bool getShowSpeaker() {return mShowSpeaker;}; + /* + * Shows/Hides for voice control for a chiclet. + */ + virtual void toggleSpeakerControl(); + /* * Shows/hides overlay icon concerning new unread messages. */ @@ -325,10 +333,7 @@ public: */ virtual bool getShowNewMessagesIcon(); - /* - * Draws border around chiclet. - */ - /*virtual*/ void draw(); + virtual void draw(); /** * Determine whether given ID refers to a group or an IM chat session. @@ -363,6 +368,8 @@ protected: LLIconCtrl* mNewMessagesIcon; LLChicletNotificationCounterCtrl* mCounterCtrl; + LLChicletSpeakerCtrl* mSpeakerCtrl; + /** the id of another participant, either an avatar id or a group id*/ LLUUID mOtherParticipantId; @@ -410,8 +417,6 @@ public: /* virtual */ void setOtherParticipantId(const LLUUID& other_participant_id); - /*virtual*/ void setShowSpeaker(bool show); - /* * Sets number of unread messages. Will update chiclet's width if number text * exceeds size of counter and notify it's parent about size change. @@ -419,15 +424,14 @@ public: /*virtual*/ void setCounter(S32); /* - * Returns number of unread messages. + * Init Speaker Control with speaker's ID */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } + /*virtual*/ void initSpeakerControl(); /* - * Returns rect, required to display chiclet. - * Width is the only valid value. + * Returns number of unread messages. */ - /*virtual*/ LLRect getRequiredRect(); + /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } protected: LLIMP2PChiclet(const Params& p); @@ -457,7 +461,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -495,15 +498,19 @@ public: /*virtual*/ void setCounter(S32); /* - * Returns number of unread messages. + * Keep Speaker Control with actual speaker's ID */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } + /*virtual*/ void draw(); /* - * Returns rect, required to display chiclet. - * Width is the only valid value. + * Init Speaker Control with speaker's ID */ - /*virtual*/ LLRect getRequiredRect(); + /*virtual*/ void initSpeakerControl(); + + /* + * Returns number of unread messages. + */ + /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } protected: LLAdHocChiclet(const Params& p); @@ -514,10 +521,14 @@ protected: */ virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + /* + * Finds a current speaker and resets the SpeakerControl with speaker's ID + */ + /*virtual*/ void switchToCurrentSpeaker(); + private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -547,14 +558,17 @@ public: */ /*virtual*/ void setSessionId(const LLUUID& session_id); + /* + * Keep Speaker Control with actual speaker's ID + */ + /*virtual*/ void draw(); + /** * Callback for LLGroupMgrObserver, we get this when group data is available or changed. * Sets group icon. */ /*virtual*/ void changed(LLGroupChange gc); - /*virtual*/ void setShowSpeaker(bool show); - /* * Sets number of unread messages. Will update chiclet's width if number text * exceeds size of counter and notify it's parent about size change. @@ -562,15 +576,14 @@ public: /*virtual*/ void setCounter(S32); /* - * Returns number of unread messages. + * Init Speaker Control with speaker's ID */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } + /*virtual*/ void initSpeakerControl(); /* - * Returns rect, required to display chiclet. - * Width is the only valid value. + * Returns number of unread messages. */ - /*virtual*/ LLRect getRequiredRect(); + /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } ~LLIMGroupChiclet(); @@ -578,6 +591,11 @@ protected: LLIMGroupChiclet(const Params& p); friend class LLUICtrlFactory; + /* + * Finds a current speaker and resets the SpeakerControl with speaker's ID + */ + /*virtual*/ void switchToCurrentSpeaker(); + /* * Creates chiclet popup menu. Will create P2P or Group IM Chat menu * based on other participant's id. @@ -597,7 +615,6 @@ protected: private: LLChicletGroupIconCtrl* mChicletIconCtrl; - LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -735,6 +752,11 @@ public: /*virtual*/ BOOL postBuild(); + /* + * Handler for the Voice Client's signal. Finds a corresponding chiclet and toggles its SpeakerControl + */ + void onCurrentVoiceChannelChanged(const LLUUID& session_id); + /* * Reshapes controls and rearranges chiclets if needed. */ -- cgit v1.2.3 From 7e3cc1374795bc43646aecd29a0d4152b750c68e Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 9 Nov 2009 19:07:15 +0200 Subject: Fixed normal bug EXT-2103 (There are no arrow icons on the Chiclets overflow buttons), but Erica will have to set appropriate icon. --HG-- branch : product-engine --- indra/newview/llchiclet.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llchiclet.h') diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 15c9a0bad8..97af82fe2f 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -677,9 +677,6 @@ public: Optional chiclet_padding, scrolling_offset; - Optional left_scroll_button, - right_scroll_button; - Optional min_width; Params(); -- cgit v1.2.3 From 3a8c80a388df64dd58b4dc77e7219dfdd20f4aac Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 10 Nov 2009 18:45:51 +0200 Subject: fixed EXT-2275 "[BSI] New incoming IM or Group IM pushes all existing (and new) chiclets off the right end of the chiclet bar." --HG-- branch : product-engine --- indra/newview/llchiclet.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llchiclet.h') diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 97af82fe2f..e7afd7f08e 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -830,6 +830,16 @@ protected: */ void onRightScrollClick(); + /* + * Callback for right scroll button held down event + */ + void onLeftScrollHeldDown(); + + /* + * Callback for left scroll button held down event + */ + void onRightScrollHeldDown(); + /* * Callback for mouse wheel scrolled, calls scrollRight() or scrollLeft() */ @@ -870,6 +880,7 @@ protected: S32 mScrollingOffset; S32 mMinWidth; bool mShowControls; + static const S32 s_scroll_ratio; }; template -- cgit v1.2.3