summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.h
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2009-12-21 12:16:56 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2009-12-21 12:16:56 +0200
commit77c97725516564f5595b2b71df54c1e32e08a7fc (patch)
tree86887e93cad6945e1289ebd3fa9f7af3b9a01f4b /indra/newview/llchiclet.h
parent45b859b50b18d214559ee2da0376496da9222fdf (diff)
parent05898105c88a2fa175bdc3d353461a6f61ad0616 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llchiclet.h')
-rw-r--r--indra/newview/llchiclet.h69
1 files changed, 49 insertions, 20 deletions
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 122e8bd8b4..2ab6abfb5b 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -52,10 +52,19 @@ class LLChicletNotificationCounterCtrl : public LLTextBox
{
public:
+ static const S32 MAX_DISPLAYED_COUNT;
+
struct Params : public LLInitParam::Block<Params, LLTextBox::Params>
{
- Params()
- {};
+ /**
+ * Contains maximum displayed count of unread messages. Default value is 9.
+ *
+ * If count is less than "max_unread_count" will be displayed as is.
+ * Otherwise 9+ will be shown (for default value).
+ */
+ Optional<S32> max_displayed_count;
+
+ Params();
};
/**
@@ -93,6 +102,7 @@ private:
S32 mCounter;
S32 mInitialWidth;
+ S32 mMaxDisplayedCount;
};
/**
@@ -359,6 +369,32 @@ public:
virtual void toggleSpeakerControl();
/**
+ * 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.
+ */
+ virtual void setCounter(S32);
+
+ /**
+ * Enables/disables the counter control for a chiclet.
+ */
+ virtual void enableCounterControl(bool enable);
+
+ /**
+ * Sets show counter state.
+ */
+ virtual void setShowCounter(bool show);
+
+ /**
+ * Shows/Hides for counter control for a chiclet.
+ */
+ virtual void toggleCounterControl();
+
+ /**
+ * Sets required width for a chiclet according to visible controls.
+ */
+ virtual void setRequiredWidth();
+
+ /**
* Shows/hides overlay icon concerning new unread messages.
*/
virtual void setShowNewMessagesIcon(bool show);
@@ -400,6 +436,7 @@ protected:
protected:
bool mShowSpeaker;
+ bool mCounterEnabled;
LLIconCtrl* mNewMessagesIcon;
LLChicletNotificationCounterCtrl* mCounterCtrl;
@@ -453,12 +490,6 @@ public:
/* virtual */ void setOtherParticipantId(const LLUUID& other_participant_id);
/**
- * 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.
- */
- /*virtual*/ void setCounter(S32);
-
- /**
* Init Speaker Control with speaker's ID
*/
/*virtual*/ void initSpeakerControl();
@@ -527,12 +558,6 @@ public:
/*virtual*/ void setSessionId(const LLUUID& session_id);
/**
- * 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.
- */
- /*virtual*/ void setCounter(S32);
-
- /**
* Keep Speaker Control with actual speaker's ID
*/
/*virtual*/ void draw();
@@ -695,12 +720,6 @@ public:
/*virtual*/ void changed(LLGroupChange gc);
/**
- * 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.
- */
- /*virtual*/ void setCounter(S32);
-
- /**
* Init Speaker Control with speaker's ID
*/
/*virtual*/ void initSpeakerControl();
@@ -842,6 +861,16 @@ protected:
LLIMWellChiclet(const Params& p);
/**
+ * Processes clicks on chiclet popup menu.
+ */
+ virtual void onMenuItemClicked(const LLSD& user_data);
+
+ /**
+ * Enables chiclet menu items.
+ */
+ bool enableMenuItem(const LLSD& user_data);
+
+ /**
* Creates menu.
*/
/*virtual*/ void createMenu();