summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.h
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-10-20 12:18:33 -0400
committerLoren Shih <seraph@lindenlab.com>2010-10-20 12:18:33 -0400
commit76876538715e3afbe456e2bf84173bde416d50e6 (patch)
tree423b27e9a5ef5c463b066b0fb5a50bda25060869 /indra/newview/llsidetray.h
parent0682e10532e058462d2bb1d5379c55d0e4d757e9 (diff)
parent04425000ae60b1fccf4feac1d4d84796d3b6b27d (diff)
Automated merge up from viewer-development
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
*/