summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2011-02-16 12:49:35 -0500
committerNat Goodspeed <nat@lindenlab.com>2011-02-16 12:49:35 -0500
commit5946d84eef30caeae6dee63767fabdcf81613984 (patch)
treed592c6203b9cc9e127d2f6a61891ba8599b43089 /indra/newview/llsidetray.h
parent34ba85dd59f64f481f6bc6de0fd9fabf681c7096 (diff)
SWAT-484, SWAT-485: add LLSideTrayListener, a new LLEventAPI.
Expand XUI-visible LLUICtrl::CommitCallbackRegistry operations to include "SideTray.Toggle" and "SideTray.Collapse". Give LLSideTrayListener friend access to LLSideTray so it can query the attached and detached tabs. Introduce tab_cast template to deal with the unavailability of the LLSideTrayTab class outside of llsidetray.cpp.
Diffstat (limited to 'indra/newview/llsidetray.h')
-rw-r--r--indra/newview/llsidetray.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 184d78845f..c4d3c2626c 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -33,6 +33,13 @@
class LLAccordionCtrl;
class LLSideTrayTab;
+// 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.
@@ -217,6 +224,9 @@ private:
}
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;