From ade6bbb06c6a842f39a3fe32decf7c66682df092 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 17:16:27 +0000 Subject: merge -r 124105-124625 skinning-13 -> viewer-2.0.0-3 --- indra/llui/llbutton.cpp | 2 +- indra/llui/llcheckboxctrl.h | 2 +- indra/llui/llcombobox.cpp | 8 +++++--- indra/llui/llfloater.cpp | 7 +++++++ indra/llui/llfloater.h | 5 ++++- indra/llui/llflyoutbutton.cpp | 2 +- indra/llui/lliconctrl.h | 2 +- indra/llui/lllineeditor.h | 2 +- indra/llui/llmenugl.h | 2 +- indra/llui/llmultifloater.h | 2 +- indra/llui/llnotifications.h | 4 ++-- indra/llui/llpanel.cpp | 18 ++++++++++++++++-- indra/llui/llpanel.h | 6 +++--- indra/llui/llradiogroup.h | 4 ++-- indra/llui/llscrolllistcolumn.cpp | 10 ++++++++++ indra/llui/llscrolllistcolumn.h | 14 ++++++++------ indra/llui/llscrolllistctrl.cpp | 4 ++-- indra/llui/llscrolllistctrl.h | 2 +- indra/llui/llscrolllistitem.h | 6 +++--- indra/llui/llsearcheditor.cpp | 2 +- indra/llui/lltextbox.h | 2 +- indra/llui/lltexteditor.h | 2 +- indra/llui/llui.cpp | 8 ++++++++ indra/llui/llui.h | 4 ++-- indra/llui/lluicolortable.h | 4 ++-- indra/llui/lluictrl.cpp | 7 +++++++ indra/llui/lluictrl.h | 13 +++++++------ indra/llui/lluictrlfactory.h | 24 +++++++++++++++++++----- indra/llui/llview.cpp | 22 +++++++++++----------- indra/llui/llview.h | 24 ++++++++++++------------ 30 files changed, 141 insertions(+), 73 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 110ad82763..4d340b3ddd 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -146,7 +146,7 @@ LLButton::LLButton(const LLButton::Params& p) mFadeWhenDisabled(FALSE) { static LLUICachedControl llbutton_orig_h_pad ("UIButtonOrigHPad", 0); - static LLButton::Params default_params(LLUICtrlFactory::getDefaultParams()); + static Params default_params(LLUICtrlFactory::getDefaultParams()); //if we aren't a picture_style button set label as name if not provided if (!p.picture_style.isProvided() || !p.picture_style) diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index fe719e3b6a..2f8f088a3e 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -65,7 +65,7 @@ public: Optional label_text; Optional check_button; - Deprecated radio_style; + Ignored radio_style; Params(); }; diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 2197d5432b..51ab3326fe 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -640,15 +640,17 @@ void LLComboBox::onButtonDown() { if (!mList->getVisible()) { + // this might change selection, so do it first + prearrangeList(); + + // highlight the last selected item from the original selection before potentially selecting a new item + // as visual cue to original value of combo box LLScrollListItem* last_selected_item = mList->getLastSelectedItem(); if (last_selected_item) { - // highlight the original selection before potentially selecting a new item mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item)); } - prearrangeList(); - if (mList->getItemCount() != 0) { showList(); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a14b99eeb7..8932a7ccf2 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -188,6 +188,13 @@ bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b) //************************************ +//static +const LLFloater::Params& LLFloater::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + + LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) : LLPanel(), mDragHandle(NULL), diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 421b7f3ec1..3e80f1b284 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -141,7 +141,10 @@ public: } }; - LLFloater(const LLSD& key = LLSD(), const LLFloater::Params& params = LLFloater::Params()); + // use this to avoid creating your own default LLFloater::Param instance + static const Params& getDefaultParams(); + + LLFloater(const LLSD& key = LLSD(), const Params& params = getDefaultParams()); virtual ~LLFloater(); diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 62a321dc02..8846f2a8c4 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -35,7 +35,7 @@ // file includes #include "llflyoutbutton.h" -static LLDefaultWidgetRegistry::Register r2("flyout_button"); +//static LLDefaultWidgetRegistry::Register r2("flyout_button"); const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24; diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index ad0f6f563f..a6cab0e9ee 100644 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -55,7 +55,7 @@ public: { Optional image; Optional color; - Deprecated scale_image; + Ignored scale_image; Params(); }; protected: diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 78df791334..eb021bace9 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -103,7 +103,7 @@ public: Optional text_pad_left, text_pad_right; - Deprecated is_unicode, + Ignored is_unicode, drop_shadow_visible, border_drop_shadow_visible, bg_visible; diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 7d889c291c..0d7d1ae746 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -63,7 +63,7 @@ public: Optional jump_key; Optional use_mac_ctrl; - Deprecated rect, + Ignored rect, left, top, right, diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index ea8a9841e3..7f4c1c040a 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -44,7 +44,7 @@ class LLMultiFloater : public LLFloater { public: - LLMultiFloater(const LLFloater::Params& params = LLFloater::Params()); + LLMultiFloater(const LLFloater::Params& params = LLFloater::getDefaultParams()); virtual ~LLMultiFloater() {}; void buildTabContainer(); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 5c8d146e0c..b749724b4e 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -299,8 +299,8 @@ public: struct Functor : public LLInitParam::Choice { - Option name; - Option function; + Alternative name; + Alternative function; Functor() : name("functor_name"), diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index ad5cdca5cc..0136a41d61 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -58,6 +58,11 @@ static LLDefaultWidgetRegistry::Register r1("panel", &LLPanel::fromXML); +const LLPanel::Params& LLPanel::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + LLPanel::Params::Params() : has_border("border", false), bg_opaque_color("bg_opaque_color"), @@ -114,6 +119,14 @@ void LLPanel::addBorder(LLViewBorder::Params p) addChild( mBorder ); } +void LLPanel::addBorder() +{ + LLViewBorder::Params p; + p.border_thickness(LLPANEL_BORDER_WIDTH); + addBorder(p); +} + + void LLPanel::removeBorder() { if (mBorder) @@ -885,10 +898,11 @@ LLView* LLPanel::getChildView(const std::string& name, BOOL recurse, BOOL create } if (!view && create_if_missing) { - view = getDummyWidget(name); + view = getDefaultWidget(name); if (!view) { - view = LLUICtrlFactory::createDummyWidget(name); + // create LLViews explicitly, as they are not registered widget types + view = LLUICtrlFactory::createDefaultWidget(name); } } return view; diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index b3ccdd0f00..fc40cd77eb 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -96,10 +96,10 @@ public: protected: friend class LLUICtrlFactory; // RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8 - static const Params& defaultParams() { return LLUICtrlFactory::getDefaultParams(); } + static const LLPanel::Params& getDefaultParams(); // Panels can get constructed directly - LLPanel(const Params& params = defaultParams()); + LLPanel(const LLPanel::Params& params = getDefaultParams()); public: // LLPanel(const std::string& name, const LLRect& rect = LLRect(), BOOL bordered = TRUE); @@ -122,7 +122,7 @@ public: // Border controls void addBorder( LLViewBorder::Params p); - void addBorder() { LLViewBorder::Params p; p.border_thickness(LLPANEL_BORDER_WIDTH); addBorder(p); } + void addBorder(); void removeBorder(); BOOL hasBorder() const { return mBorder != NULL; } void setBorderVisible( BOOL b ); diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h index d3cb8a628e..850d896e29 100644 --- a/indra/llui/llradiogroup.h +++ b/indra/llui/llradiogroup.h @@ -48,8 +48,8 @@ class LLRadioCtrl : public LLCheckBoxCtrl public: struct Params : public LLInitParam::Block { - Deprecated length; - Deprecated type; + Ignored length; + Ignored type; Params() : length("length"), diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index 48fddbfb71..02f09bd9b4 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -285,6 +285,16 @@ void LLScrollListColumn::SortNames::declareValues() declare("descending", LLScrollListColumn::DESCENDING); } +// +// LLScrollListColumn +// +//static +const LLScrollListColumn::Params& LLScrollListColumn::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + + LLScrollListColumn::LLScrollListColumn(const Params& p, LLScrollListCtrl* parent) : mWidth(0), mIndex (-1), diff --git a/indra/llui/llscrolllistcolumn.h b/indra/llui/llscrolllistcolumn.h index c1bb86577f..712ea56454 100644 --- a/indra/llui/llscrolllistcolumn.h +++ b/indra/llui/llscrolllistcolumn.h @@ -116,9 +116,9 @@ public: struct Width : public LLInitParam::Choice { - Option dynamic_width; - Option pixel_width; - Option relative_width; + Alternative dynamic_width; + Alternative pixel_width; + Alternative relative_width; Width() : dynamic_width("dynamicwidth", false), @@ -133,8 +133,8 @@ public: // either an image or label is used in column header struct Header : public LLInitParam::Choice
{ - Option label; - Option image; + Alternative label; + Alternative image; Header() : label("label"), @@ -160,8 +160,10 @@ public: } }; + static const Params& getDefaultParams(); + //NOTE: this is default constructible so we can store it in a map. - LLScrollListColumn(const Params& p = Params(), LLScrollListCtrl* = NULL); + LLScrollListColumn(const Params& p = getDefaultParams(), LLScrollListCtrl* = NULL); void setWidth(S32 width); S32 getWidth() const { return mWidth; } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 42c7c892c8..6d91c784f7 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1246,14 +1246,14 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const // "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which // has an associated, unique UUID, and only one of which can be selected at a time. -LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled, S32 column_width) +LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled) { if (getItemCount() < mMaxItemCount) { LLScrollListItem::Params item_p; item_p.enabled(enabled); item_p.value(id); - item_p.cells.add().value(item_text).width(column_width).type("text"); + item_p.cells.add().value(item_text).type("text"); return addRow( item_p, pos ); } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 461df6760f..8d200fb73f 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -222,7 +222,7 @@ public: // DEPRECATED: Use LLSD versions of setCommentText() and getSelectedValue(). // "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which // has an associated, unique UUID, and only one of which can be selected at a time. - LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, S32 column_width = 0); + LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); LLUUID getStringUUIDSelectedItem() const; LLScrollListItem* getFirstSelected() const; diff --git a/indra/llui/llscrolllistitem.h b/indra/llui/llscrolllistitem.h index 8d87137c3a..4237d5b304 100644 --- a/indra/llui/llscrolllistitem.h +++ b/indra/llui/llscrolllistitem.h @@ -64,9 +64,9 @@ public: Optional userdata; Optional value; - Deprecated name; // use for localization tools - Deprecated type; - Deprecated length; + Ignored name; // use for localization tools + Ignored type; + Ignored length; Multiple cells; diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 3171f96fcf..9522d32a8b 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -36,7 +36,7 @@ #include "llsearcheditor.h" -static LLDefaultWidgetRegistry::Register r2("search_editor"); +//static LLDefaultWidgetRegistry::Register r2("search_editor"); LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) : LLUICtrl(p) diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index aae538a221..dca906decc 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -60,7 +60,7 @@ public: Optional font_shadow; - Deprecated drop_shadow_visible, + Ignored drop_shadow_visible, type, length; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index efedb30f47..f64353555e 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -82,7 +82,7 @@ public: Optional border; - Deprecated type, + Ignored type, length, is_unicode; diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 3c9759695d..1d3e5d7a15 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -58,6 +58,10 @@ #include "llmenugl.h" #include "llwindow.h" +// for registration +#include "llsearcheditor.h" +#include "llflyoutbutton.h" + // for XUIParse #include "llquaternion.h" #include @@ -85,6 +89,10 @@ std::list gUntranslated; /*static*/ std::vector LLUI::sXUIPaths; +// register searcheditor here +static LLDefaultWidgetRegistry::Register register_search_editor("search_editor"); +static LLDefaultWidgetRegistry::Register register_flyout_button("flyout_button"); + // // Functions diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 35c0bb478e..dbd295d4e8 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -665,8 +665,8 @@ template LLRegisterWith LLDestroyClass::sReg // useful parameter blocks struct TimeIntervalParam : public LLInitParam::Choice { - Option seconds; - Option frames; + Alternative seconds; + Alternative frames; TimeIntervalParam() : seconds("seconds"), frames("frames") diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h index 8900875813..dcbb1ee5cb 100644 --- a/indra/llui/lluicolortable.h +++ b/indra/llui/lluicolortable.h @@ -22,8 +22,8 @@ class LLUIColorTable : public LLSingleton public: struct ColorParams : LLInitParam::Choice { - Option value; - Option reference; + Alternative value; + Alternative reference; ColorParams(); }; diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 80ef7ebdf1..8aba122e39 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -111,6 +111,13 @@ void LLFocusableElement::setFocus(BOOL b) { } +//static +const LLUICtrl::Params& LLUICtrl::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams(); +} + + LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel) : LLView(p), mTentative(FALSE), diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 71f0a47f45..686f1e966d 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -87,7 +87,7 @@ public: struct CallbackParam : public LLInitParam::Block { - Deprecated name; + Ignored name; Optional function_name; Optional parameter; @@ -116,8 +116,8 @@ public: struct EnableControls : public LLInitParam::Choice { - Option enabled; - Option disabled; + Alternative enabled; + Alternative disabled; EnableControls() : enabled("enabled_control"), @@ -126,8 +126,8 @@ public: }; struct ControlVisibility : public LLInitParam::Choice { - Option visible; - Option invisible; + Alternative visible; + Alternative invisible; ControlVisibility() : visible("make_visible_control"), @@ -160,7 +160,8 @@ public: void initFromParams(const Params& p); protected: friend class LLUICtrlFactory; - LLUICtrl(const Params& p = LLUICtrl::Params(), + static const Params& getDefaultParams(); + LLUICtrl(const Params& p = getDefaultParams(), const LLViewModelPtr& viewmodel=LLViewModelPtr(new LLViewModel)); void initCommitCallback(const CommitCallbackParam& cb, commit_signal_t& sig); diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 4045022c8e..b9c61b1fed 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -154,9 +154,15 @@ struct LLCompareTypeID class LLWidgetTemplateRegistry : public LLRegistrySingleton -{ +{}; -}; +// function used to create new default widgets via LLView::getChild +typedef LLView* (*dummy_widget_creator_func_t)(const std::string&); + +// used to register factory functions for default widget instances +class LLDummyWidgetRegistry +: public LLRegistrySingleton +{}; extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP; extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION; @@ -295,10 +301,16 @@ fail: return widget; } + template + static T* getDefaultWidget(const std::string& name) + { + dummy_widget_creator_func_t* dummy_func = LLDummyWidgetRegistry::instance().getValue(&typeid(T)); + return dynamic_cast((*dummy_func)(name)); + } + template - static T* createDummyWidget(const std::string& name) + static LLView* createDefaultWidget(const std::string& name) { - //#pragma message("Generating LLUICtrlFactory::createDummyWidget") typename T::Params params; params.name(name); @@ -389,8 +401,10 @@ template LLWidgetRegistry::Register::Register(const char* tag, LLWidgetCreatorFunc func) : LLWidgetRegistry::StaticRegistrar(tag, func.empty() ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder : func) { - //FIXME: inventory_panel will register itself with LLPanel::Params but it does have its own params...:( + // associate parameter block type with template .xml file LLWidgetTemplateRegistry::instance().defaultRegistrar().add(&typeid(PARAM_BLOCK), tag); + // associate widget type with factory function + LLDummyWidgetRegistry::instance().defaultRegistrar().add(&typeid(T), &LLUICtrlFactory::createDefaultWidget); } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 2e2ef4d79f..d225ad2767 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -124,7 +124,7 @@ LLView::LLView(const LLView::Params& p) mDefaultTabGroup(p.default_tab_group), mLastTabGroup(0), mToolTipMsg((LLStringExplicit)p.tool_tip()), - mDummyWidgets(NULL) + mDefaultWidgets(NULL) { // create rect first, as this will supply initial follows flags setShape(p.rect); @@ -157,12 +157,12 @@ LLView::~LLView() mParentView->removeChild(this); } - if (mDummyWidgets) + if (mDefaultWidgets) { - std::for_each(mDummyWidgets->begin(), mDummyWidgets->end(), + std::for_each(mDefaultWidgets->begin(), mDefaultWidgets->end(), DeletePairedPointer()); - delete mDummyWidgets; - mDummyWidgets = NULL; + delete mDefaultWidgets; + mDefaultWidgets = NULL; } } @@ -1710,10 +1710,10 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_ if (create_if_missing) { - LLView* view = getDummyWidget(name); + LLView* view = getDefaultWidget(name); if (!view) { - view = LLUICtrlFactory::createDummyWidget(name); + view = LLUICtrlFactory::createDefaultWidget(name); } return view; } @@ -2750,11 +2750,11 @@ LLView::tree_iterator_t LLView::endTree() // only create maps on demand, as they incur heap allocation/deallocation cost // when a view is constructed/deconstructed -LLView::dummy_widget_map_t& LLView::getDummyWidgetMap() const +LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const { - if (!mDummyWidgets) + if (!mDefaultWidgets) { - mDummyWidgets = new dummy_widget_map_t(); + mDefaultWidgets = new default_widget_map_t(); } - return *mDummyWidgets; + return *mDefaultWidgets; } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 458d02d001..422f62f602 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -143,8 +143,8 @@ class LLView : public LLMouseHandler, public LLMortician public: struct Follows : public LLInitParam::Choice { - Option string; - Option flags; + Alternative string; + Alternative flags; Follows() : string(""), @@ -190,7 +190,7 @@ public: // these are nested attributes for LLLayoutPanel //FIXME: get parent context involved in parsing traversal - Deprecated user_resize, + Ignored user_resize, auto_resize, needs_translate; @@ -486,10 +486,10 @@ public: virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; - template T* getDummyWidget(const std::string& name) const + template T* getDefaultWidget(const std::string& name) const { - dummy_widget_map_t::const_iterator found_it = getDummyWidgetMap().find(name); - if (found_it == getDummyWidgetMap().end()) + default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name); + if (found_it == getDefaultWidgetMap().end()) { return NULL; } @@ -592,11 +592,11 @@ private: static LLWindow* sWindow; // All root views must know about their window. - typedef std::map dummy_widget_map_t; + typedef std::map default_widget_map_t; // allocate this map no demand, as it is rarely needed - mutable dummy_widget_map_t* mDummyWidgets; + mutable default_widget_map_t* mDefaultWidgets; - dummy_widget_map_t& getDummyWidgetMap() const; + default_widget_map_t& getDefaultWidgetMap() const; public: static BOOL sDebugRects; // Draw debug rects behind everything. @@ -640,10 +640,10 @@ template T* LLView::getChild(const std::string& name, BOOL recurse, BO } if (create_if_missing) { - result = getDummyWidget(name); + result = getDefaultWidget(name); if (!result) { - result = LLUICtrlFactory::createDummyWidget(name); + result = LLUICtrlFactory::getDefaultWidget(name); if (result) { @@ -655,7 +655,7 @@ template T* LLView::getChild(const std::string& name, BOOL recurse, BO return NULL; } - getDummyWidgetMap()[name] = result; + getDefaultWidgetMap()[name] = result; } } } -- cgit v1.2.3