summaryrefslogtreecommitdiff
path: root/indra/llui/llview.h
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2011-09-28 16:25:32 -0700
committerRichard Nelson <richard@lindenlab.com>2011-09-28 16:25:32 -0700
commit6a49f2947f05963c577a1644c16a8affc779da63 (patch)
treefc166c3c1ea4365de90e41dbceb4173a6f2ebcf9 /indra/llui/llview.h
parentfc0f5173eb20fad8934420e6eec8873d71490894 (diff)
EXP-1234 WIP experimental drag and drop
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r--indra/llui/llview.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 9039366e7e..f4e31b109a 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -465,6 +465,20 @@ public:
return dynamic_cast<T*>(widgetp);
}
+ template <class T> T* getParentByType() const
+ {
+ LLView* parent = getParent();
+ while(parent)
+ {
+ if (dynamic_cast<T*>(parent))
+ {
+ return static_cast<T*>(parent);
+ }
+ parent = parent->getParent();
+ }
+ return NULL;
+ }
+
//////////////////////////////////////////////
// statics
//////////////////////////////////////////////