summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.h
diff options
context:
space:
mode:
authorLeslie Linden <none@none>2011-06-10 16:20:30 -0700
committerLeslie Linden <none@none>2011-06-10 16:20:30 -0700
commit3eeb14ee0abb5720e010d94eba52db09fa32237e (patch)
tree17e36f9d42098b912302aa6fd79e9ad67eaa93ce /indra/newview/llsidetray.h
parent7ed78f92747a7234435d1b6ceef50a3053003f48 (diff)
EXP-856 FIX -- Inbox item count reflected as badge on inventory button
* Modified badges to be parented to their owners if their owners have no parents * Modified side tray tab panels to create badges on side tab buttons when the xml specifies a badge. * Modified inbox to drive the badge value of the sidebar_inventory button. * Updated inbox and outbox sizes so scroll bars function as expected * Updated inventory_panel.xml to allow scroll tag to specify scroll bar properties, instead of just having them hardcoded. Reviewed by Richard
Diffstat (limited to 'indra/newview/llsidetray.h')
-rw-r--r--indra/newview/llsidetray.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 24882411f4..17158329dc 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -33,6 +33,13 @@
class LLAccordionCtrl;
class LLSideTrayTab;
+// Define an interface for side tab button badge values
+class LLSideTrayTabBadgeDriver
+{
+public:
+ virtual std::string getBadgeString() const = 0;
+};
+
// Deal with LLSideTrayTab being opaque. Generic do-nothing cast...
template <class T>
T tab_cast(LLSideTrayTab* tab) { return tab; }
@@ -166,6 +173,8 @@ public:
bool getCollapsed() { return mCollapsed; }
+ void setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver);
+
public:
virtual ~LLSideTray(){};
@@ -204,8 +213,6 @@ protected:
void createButtons ();
- LLButton* createButton (const std::string& name,const std::string& image,const std::string& tooltip,
- LLUICtrl::commit_callback_t callback);
void arrange ();
void detachTabs ();
void reflectCollapseChange();
@@ -234,6 +241,8 @@ private:
LLPanel* mButtonsPanel;
typedef std::map<std::string,LLButton*> button_map_t;
button_map_t mTabButtons;
+ typedef std::map<std::string,LLSideTrayTabBadgeDriver*> badge_map_t;
+ badge_map_t mTabButtonBadgeDrivers;
child_vector_t mTabs;
child_vector_t mDetachedTabs;
tab_order_vector_t mOriginalTabOrder;