diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 17:16:27 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 17:16:27 +0000 |
commit | ade6bbb06c6a842f39a3fe32decf7c66682df092 (patch) | |
tree | 8fa1e4ba680f916bb4c77c70f2464f295a3bd3f3 /indra/llui | |
parent | 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (diff) |
merge -r 124105-124625 skinning-13 -> viewer-2.0.0-3
Diffstat (limited to 'indra/llui')
30 files changed, 141 insertions, 73 deletions
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<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0); - static LLButton::Params default_params(LLUICtrlFactory::getDefaultParams<LLButton::Params>()); + static Params default_params(LLUICtrlFactory::getDefaultParams<Params>()); //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<LLTextBox::Params> label_text; Optional<LLButton::Params> 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::Params>(); +} + + 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<LLFlyoutButton> r2("flyout_button"); +//static LLDefaultWidgetRegistry::Register<LLFlyoutButton> 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<LLUIImage*> image; Optional<LLUIColor> 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<S32> 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<KEY> jump_key; Optional<bool> 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<Functor> { - Option<std::string> name; - Option<LLNotificationFunctorRegistry::ResponseFunctor> function; + Alternative<std::string> name; + Alternative<LLNotificationFunctorRegistry::ResponseFunctor> 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<LLPanel> r1("panel", &LLPanel::fromXML); +const LLPanel::Params& LLPanel::getDefaultParams() +{ + return LLUICtrlFactory::getDefaultParams<LLPanel::Params>(); +} + 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<LLView>(name); + view = getDefaultWidget<LLView>(name); if (!view) { - view = LLUICtrlFactory::createDummyWidget<LLView>(name); + // create LLViews explicitly, as they are not registered widget types + view = LLUICtrlFactory::createDefaultWidget<LLView>(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<LLPanel::Params>(); } + 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<Params, LLCheckBoxCtrl::Params> { - 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::Params>(); +} + + 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<Width> { - Option<bool> dynamic_width; - Option<S32> pixel_width; - Option<F32> relative_width; + Alternative<bool> dynamic_width; + Alternative<S32> pixel_width; + Alternative<F32> 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<Header> { - Option<std::string> label; - Option<LLUIImage*> image; + Alternative<std::string> label; + Alternative<LLUIImage*> 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<void*> userdata; Optional<LLSD> value; - Deprecated name; // use for localization tools - Deprecated type; - Deprecated length; + Ignored name; // use for localization tools + Ignored type; + Ignored length; Multiple<LLScrollListCell::Params> 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<LLSearchEditor> r2("search_editor"); +//static LLDefaultWidgetRegistry::Register<LLSearchEditor> 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<LLFontGL::ShadowType> 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<LLViewBorder::Params> 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 <boost/tokenizer.hpp> @@ -85,6 +89,10 @@ std::list<std::string> gUntranslated; /*static*/ std::vector<std::string> LLUI::sXUIPaths; +// register searcheditor here +static LLDefaultWidgetRegistry::Register<LLSearchEditor> register_search_editor("search_editor"); +static LLDefaultWidgetRegistry::Register<LLFlyoutButton> 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 <typename T> LLRegisterWith<LLDestroyClassList> LLDestroyClass<T>::sReg // useful parameter blocks struct TimeIntervalParam : public LLInitParam::Choice<TimeIntervalParam> { - Option<F32> seconds; - Option<S32> frames; + Alternative<F32> seconds; + Alternative<S32> 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<LLUIColorTable> public: struct ColorParams : LLInitParam::Choice<ColorParams> { - Option<LLColor4> value; - Option<std::string> reference; + Alternative<LLColor4> value; + Alternative<std::string> 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::Params>(); +} + + 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<CallbackParam> { - Deprecated name; + Ignored name; Optional<std::string> function_name; Optional<LLSD> parameter; @@ -116,8 +116,8 @@ public: struct EnableControls : public LLInitParam::Choice<EnableControls> { - Option<std::string> enabled; - Option<std::string> disabled; + Alternative<std::string> enabled; + Alternative<std::string> disabled; EnableControls() : enabled("enabled_control"), @@ -126,8 +126,8 @@ public: }; struct ControlVisibility : public LLInitParam::Choice<ControlVisibility> { - Option<std::string> visible; - Option<std::string> invisible; + Alternative<std::string> visible; + Alternative<std::string> 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<const std::type_info*, std::string, LLWidgetTemplateRegistry, LLCompareTypeID> -{ +{}; -}; +// function used to create new default widgets via LLView::getChild<T> +typedef LLView* (*dummy_widget_creator_func_t)(const std::string&); + +// used to register factory functions for default widget instances +class LLDummyWidgetRegistry +: public LLRegistrySingleton<const std::type_info*, dummy_widget_creator_func_t, LLDummyWidgetRegistry, LLCompareTypeID> +{}; extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP; extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION; @@ -295,10 +301,16 @@ fail: return widget; } + template<class T> + static T* getDefaultWidget(const std::string& name) + { + dummy_widget_creator_func_t* dummy_func = LLDummyWidgetRegistry::instance().getValue(&typeid(T)); + return dynamic_cast<T*>((*dummy_func)(name)); + } + template <class T> - 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<typename T, typename PARAM_BLOCK> LLWidgetRegistry<DERIVED>::Register<T, PARAM_BLOCK>::Register(const char* tag, LLWidgetCreatorFunc func) : LLWidgetRegistry<DERIVED>::StaticRegistrar(tag, func.empty() ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder<T, PARAM_BLOCK> : 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<T>); } 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<LLView>(name); + LLView* view = getDefaultWidget<LLView>(name); if (!view) { - view = LLUICtrlFactory::createDummyWidget<LLView>(name); + view = LLUICtrlFactory::createDefaultWidget<LLView>(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<Follows> { - Option<std::string> string; - Option<U32> flags; + Alternative<std::string> string; + Alternative<U32> 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 <class T> T* getDummyWidget(const std::string& name) const + template <class T> 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<std::string, LLView*> dummy_widget_map_t; + typedef std::map<std::string, LLView*> 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 <class T> T* LLView::getChild(const std::string& name, BOOL recurse, BO } if (create_if_missing) { - result = getDummyWidget<T>(name); + result = getDefaultWidget<T>(name); if (!result) { - result = LLUICtrlFactory::createDummyWidget<T>(name); + result = LLUICtrlFactory::getDefaultWidget<T>(name); if (result) { @@ -655,7 +655,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse, BO return NULL; } - getDummyWidgetMap()[name] = result; + getDefaultWidgetMap()[name] = result; } } } |