diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-09-28 16:25:32 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-09-28 16:25:32 -0700 |
commit | 6a49f2947f05963c577a1644c16a8affc779da63 (patch) | |
tree | fc166c3c1ea4365de90e41dbceb4173a6f2ebcf9 /indra/llui/llview.h | |
parent | fc0f5173eb20fad8934420e6eec8873d71490894 (diff) |
EXP-1234 WIP experimental drag and drop
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r-- | indra/llui/llview.h | 14 |
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 ////////////////////////////////////////////// |