summaryrefslogtreecommitdiff
path: root/indra/llui/llview.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r--indra/llui/llview.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index fe15307a5d..08828e55e6 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -97,13 +97,10 @@ private:
static std::vector<LLViewDrawContext*> sDrawContextStack;
};
-class LLViewWidgetRegistry : public LLChildRegistry<LLViewWidgetRegistry>
-{};
-
class LLView : public LLMouseHandler, public LLMortician, public LLFocusableElement
{
public:
- struct Follows : public LLInitParam::Choice<Follows>
+ struct Follows : public LLInitParam::ChoiceBlock<Follows>
{
Alternative<std::string> string;
Alternative<U32> flags;
@@ -152,7 +149,8 @@ public:
Params();
};
- typedef LLViewWidgetRegistry child_registry_t;
+ // most widgets are valid children of LLView
+ typedef LLDefaultChildRegistry child_registry_t;
void initFromParams(const LLView::Params&);
@@ -242,7 +240,7 @@ public:
ECursorType getHoverCursor() { return mHoverCursor; }
- const std::string& getToolTip() const { return mToolTipMsg.getString(); }
+ virtual const std::string getToolTip() const { return mToolTipMsg.getString(); }
void sendChildToFront(LLView* child);
void sendChildToBack(LLView* child);
@@ -472,6 +470,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
//////////////////////////////////////////////
@@ -487,7 +499,6 @@ public:
// return query for iterating over focus roots in tab order
static const LLCtrlQuery & getFocusRootsQuery();
- static void deleteViewByHandle(LLHandle<LLView> handle);
static LLWindow* getWindow(void) { return LLUI::sWindow; }
// Set up params after XML load before calling new(),
@@ -554,7 +565,7 @@ protected:
private:
template <typename METHOD, typename XDATA>
- LLView* childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra);
+ LLView* childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block = true);
template <typename METHOD, typename CHARTYPE>
LLView* childrenHandleCharEvent(const std::string& desc, const METHOD& method,