summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llchiclet.h')
-rw-r--r--indra/newview/llchiclet.h48
1 files changed, 30 insertions, 18 deletions
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index ee9db10525..ba17c5970e 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -41,7 +41,6 @@
#include "llgroupmgr.h"
#include "llimview.h"
-class LLVoiceControlPanel;
class LLMenuGL;
class LLIMFloater;
@@ -326,9 +325,13 @@ public:
};
- /*virtual*/ ~LLIMChiclet() {};
+ virtual ~LLIMChiclet() {};
/**
+ * It is used for default setting up of chicklet:click handler, etc.
+ */
+ BOOL postBuild();
+ /**
* Sets IM session name. This name will be displayed in chiclet tooltip.
*/
virtual void setIMSessionName(const std::string& name) { setToolTip(name); }
@@ -423,12 +426,12 @@ public:
*/
virtual void onMouseDown();
+ virtual void setToggleState(bool toggle);
+
protected:
LLIMChiclet(const LLIMChiclet::Params& p);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
-
protected:
bool mShowSpeaker;
@@ -439,7 +442,7 @@ protected:
LLIconCtrl* mNewMessagesIcon;
LLChicletNotificationCounterCtrl* mCounterCtrl;
LLChicletSpeakerCtrl* mSpeakerCtrl;
-
+ LLButton* mChicletButton;
/** the id of another participant, either an avatar id or a group id*/
LLUUID mOtherParticipantId;
@@ -474,6 +477,8 @@ class LLIMP2PChiclet : public LLIMChiclet
public:
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
+ Optional<LLButton::Params> chiclet_button;
+
Optional<LLChicletAvatarIconCtrl::Params> avatar_icon;
Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications;
@@ -539,6 +544,8 @@ class LLAdHocChiclet : public LLIMChiclet
public:
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
+ Optional<LLButton::Params> chiclet_button;
+
Optional<LLChicletAvatarIconCtrl::Params> avatar_icon;
Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications;
@@ -615,6 +622,8 @@ public:
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
+ Optional<LLButton::Params> chiclet_button;
+
Optional<LLIconCtrl::Params> icon;
Optional<LLIconCtrl::Params> new_message_icon;
@@ -633,11 +642,6 @@ public:
*/
/*virtual*/ void onMouseDown();
- /**
- * Override default handler
- */
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
-
protected:
LLScriptChiclet(const Params&);
@@ -657,6 +661,8 @@ public:
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
+ Optional<LLButton::Params> chiclet_button;
+
Optional<LLChicletInvOfferIconCtrl::Params> icon;
Optional<LLIconCtrl::Params> new_message_icon;
@@ -675,12 +681,6 @@ public:
*/
/*virtual*/ void onMouseDown();
- /**
- * Override default handler
- */
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
-
-
protected:
LLInvOfferChiclet(const Params&);
friend class LLUICtrlFactory;
@@ -698,6 +698,8 @@ public:
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
+ Optional<LLButton::Params> chiclet_button;
+
Optional<LLChicletGroupIconCtrl::Params> group_icon;
Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications;
@@ -825,6 +827,8 @@ public:
void setToggleState(BOOL toggled);
void setNewMessagesState(bool new_messages);
+ //this method should change a widget according to state of the SysWellWindow
+ virtual void updateWidget(bool is_window_empty);
protected:
@@ -930,7 +934,7 @@ protected:
// methods for updating a number of unread System notifications
void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); }
-
+ /*virtual*/ void setCounter(S32 counter);
S32 mUreadSystemNotifications;
};
@@ -1039,6 +1043,11 @@ public:
S32 notifyParent(const LLSD& info);
+ /**
+ * Toggle chiclet by session id ON and toggle OFF all other chiclets.
+ */
+ void setChicletToggleState(const LLUUID& session_id, bool toggle);
+
protected:
LLChicletPanel(const Params&p);
friend class LLUICtrlFactory;
@@ -1219,12 +1228,15 @@ T* LLChicletPanel::findChiclet(const LLUUID& im_session_id)
{
LLChiclet* chiclet = *it;
+ llassert(chiclet);
+ if (!chiclet) continue;
if(chiclet->getSessionId() == im_session_id)
{
T* result = dynamic_cast<T*>(chiclet);
- if(!result && chiclet)
+ if(!result)
{
llwarns << "Found chiclet but of wrong type " << llendl;
+ continue;
}
return result;
}