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.h39
1 files changed, 16 insertions, 23 deletions
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 33d345beff..594a5eec6b 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -34,6 +34,7 @@
#include "stdtypes.h"
#include "llcoord.h"
#include "llfontgl.h"
+#include "llhandle.h"
#include "llmortician.h"
#include "llmousehandler.h"
#include "llstring.h"
@@ -116,7 +117,8 @@ public:
visible,
mouse_opaque,
use_bounding_rect,
- from_xui;
+ from_xui,
+ focus_root;
Optional<S32> tab_group,
default_tab_group;
@@ -286,7 +288,7 @@ public:
void setAllChildrenEnabled(BOOL b);
virtual void setVisible(BOOL visible);
- BOOL getVisible() const { return mVisible; }
+ const BOOL& getVisible() const { return mVisible; }
virtual void setEnabled(BOOL enabled);
BOOL getEnabled() const { return mEnabled; }
/// 'available' in this context means 'visible and enabled': in other
@@ -405,21 +407,16 @@ public:
BOOL blockMouseEvent(S32 x, S32 y) const;
// See LLMouseHandler virtuals for screenPointToLocal and localPointToScreen
- BOOL localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, LLView* other_view) const;
- BOOL localRectToOtherView( const LLRect& local, LLRect* other, LLView* other_view ) const;
+ BOOL localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, const LLView* other_view) const;
+ BOOL localRectToOtherView( const LLRect& local, LLRect* other, const LLView* other_view ) const;
void screenRectToLocal( const LLRect& screen, LLRect* local ) const;
void localRectToScreen( const LLRect& local, LLRect* screen ) const;
LLControlVariable *findControl(const std::string& name);
- // Moved setValue(), getValue(), setControlValue(), setControlName(),
- // controlListener() to LLUICtrl because an LLView is NOT assumed to
- // contain a value. If that's what you want, use LLUICtrl instead.
-// virtual bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-
const child_list_t* getChildList() const { return &mChildList; }
- const child_list_const_iter_t beginChild() { return mChildList.begin(); }
- const child_list_const_iter_t endChild() { return mChildList.end(); }
+ child_list_const_iter_t beginChild() const { return mChildList.begin(); }
+ child_list_const_iter_t endChild() const { return mChildList.end(); }
// LLMouseHandler functions
// Default behavior is to pass events to children
@@ -466,12 +463,8 @@ public:
template <class T> T* getDefaultWidget(const std::string& name) const
{
- default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name);
- if (found_it == getDefaultWidgetMap().end())
- {
- return NULL;
- }
- return dynamic_cast<T*>(found_it->second);
+ LLView* widgetp = getDefaultWidgetContainer().findChildView(name);
+ return dynamic_cast<T*>(widgetp);
}
//////////////////////////////////////////////
@@ -551,11 +544,13 @@ private:
LLView* mParentView;
child_list_t mChildList;
- std::string mName;
// location in pixels, relative to surrounding structure, bottom,left=0,0
+ BOOL mVisible;
LLRect mRect;
LLRect mBoundingRect;
+
std::string mLayout;
+ std::string mName;
U32 mReshapeFlags;
@@ -577,17 +572,15 @@ private:
LLRootHandle<LLView> mHandle;
BOOL mLastVisible;
- BOOL mVisible;
-
S32 mNextInsertionOrdinal;
static LLWindow* sWindow; // All root views must know about their window.
typedef std::map<std::string, LLView*> default_widget_map_t;
// allocate this map no demand, as it is rarely needed
- mutable default_widget_map_t* mDefaultWidgets;
+ mutable LLView* mDefaultWidgets;
- default_widget_map_t& getDefaultWidgetMap() const;
+ LLView& getDefaultWidgetContainer() const;
public:
// Depth in view hierarchy during rendering
@@ -654,7 +647,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co
return NULL;
}
- getDefaultWidgetMap()[name] = result;
+ getDefaultWidgetContainer().addChild(result);
}
}
return result;