From 5946d84eef30caeae6dee63767fabdcf81613984 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 16 Feb 2011 12:49:35 -0500 Subject: 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. --- indra/newview/llsidetray.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llsidetray.h') 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 +T tab_cast(LLSideTrayTab* tab) { return tab; } +// specialized for implementation in presence of LLSideTrayTab definition +template <> +LLPanel* tab_cast(LLSideTrayTab* tab); + // added inheritance from LLDestroyClass 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 button_map_t; button_map_t mTabButtons; -- cgit v1.2.3