summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsidetray.h')
-rw-r--r--indra/newview/llsidetray.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 184d78845f..17158329dc 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -33,6 +33,20 @@
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; }
+// specialized for implementation in presence of LLSideTrayTab definition
+template <>
+LLPanel* tab_cast<LLPanel*>(LLSideTrayTab* tab);
+
// added inheritance from LLDestroyClass<LLSideTray> to enable Side Tray perform necessary actions
// while disconnecting viewer in LLAppViewer::disconnectViewer().
// LLDestroyClassList::instance().fireCallbacks() calls destroyClass method. See EXT-245.
@@ -97,6 +111,8 @@ public:
*/
LLPanel* showPanel (const std::string& panel_name, const LLSD& params = LLSD());
+ bool hidePanel (const std::string& panel_name);
+
/**
* Toggling Side Tray tab which contains "sub_panel" child of "panel_name" panel.
* If "sub_panel" is not visible Side Tray is opened to display it,
@@ -112,6 +128,8 @@ public:
LLPanel* getActivePanel ();
bool isPanelActive (const std::string& panel_name);
+ void setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater = true);
+
/*
* get the panel of given type T (don't show it or do anything else with it)
*/
@@ -155,6 +173,8 @@ public:
bool getCollapsed() { return mCollapsed; }
+ void setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver);
+
public:
virtual ~LLSideTray(){};
@@ -193,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();
@@ -215,11 +233,16 @@ private:
if (LLSideTray::instanceCreated())
LLSideTray::getInstance()->setEnabled(FALSE);
}
-
+
private:
+ // Since we provide no public way to query mTabs and mDetachedTabs, give
+ // LLSideTrayListener friend access.
+ friend class LLSideTrayListener;
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;