summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.h
diff options
context:
space:
mode:
authorcallum <none@none>2010-10-04 17:40:59 -0700
committercallum <none@none>2010-10-04 17:40:59 -0700
commit21c8dea4e460939aae0767e791f3efed03dc91b3 (patch)
treefee1d569617bbe97a2e492a73deae7383da65868 /indra/newview/llsidetray.h
parent89efb318141bb504597e525f186ea1a43502eac4 (diff)
parent7af6d1c7319bc0f339e9159161c05ed6eb45fb5b (diff)
Test merge
Diffstat (limited to 'indra/newview/llsidetray.h')
-rw-r--r--indra/newview/llsidetray.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 4e79007c13..4c23a1920b 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -109,6 +109,22 @@ public:
LLPanel* getPanel (const std::string& panel_name);
LLPanel* getActivePanel ();
bool isPanelActive (const std::string& panel_name);
+
+ /*
+ * get the panel of given type T (don't show it or do anything else with it)
+ */
+ template <typename T>
+ T* getPanel(const std::string& panel_name)
+ {
+ T* panel = dynamic_cast<T*>(getPanel(panel_name));
+ if (!panel)
+ {
+ llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl;
+ return NULL;
+ }
+ return panel;
+ }
+
/*
* get currently active tab
*/