Commit d89aab6b authored by Cinder's avatar Cinder
Browse files

Member init order

parent 272441fc
......@@ -175,9 +175,9 @@ LLFloater::Params::Params()
can_close("can_close", true),
can_drag_on_left("can_drag_on_left", false),
can_tear_off("can_tear_off", true),
save_dock_state("save_dock_state", false),
save_rect("save_rect", false),
save_visibility("save_visibility", false),
save_dock_state("save_dock_state", false),
can_dock("can_dock", false),
show_title("show_title", true),
show_help("show_help", false),
......@@ -240,20 +240,21 @@ static LLWidgetNameRegistry::StaticRegistrar sRegisterFloaterParams(&typeid(LLFl
LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
: LLPanel(), // intentionally do not pass params here, see initFromParams
mDragHandle(NULL),
mMinimizeSignal(NULL),
mKey(key),
mDragHandle(nullptr),
mTitle(p.title),
mShortTitle(p.short_title),
mShortTitle(p.short_title), // reuse single-instance floaters by default
mSingleInstance(p.single_instance),
mReuseInstance(p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance), // reuse single-instance floaters by default
mKey(key),
mReuseInstance(p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance),
mCanTearOff(p.can_tear_off),
mCanMinimize(p.can_minimize),
mCanClose(p.can_close),
mShowHelp(p.show_help),
mDragOnLeft(p.can_drag_on_left),
mResizable(p.can_resize),
mResizableHeight(p.can_resize_height),
mResizableWidth(p.can_resize_width),
mShowHelp(p.show_help),
mPositioning(p.positioning),
mMinWidth(p.min_width),
mMinHeight(p.min_height),
......@@ -262,15 +263,14 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mMinimized(FALSE),
mForeground(FALSE),
mFirstLook(TRUE),
mButtonScale(1.0f),
mAutoFocus(TRUE), // automatically take focus when opened
mButtonScale(1.0f), // automatically take focus when opened
mAutoFocus(TRUE),
mCanDock(false),
mDocked(false),
mTornOff(false),
mHasBeenDraggedWhileMinimized(FALSE),
mPreviousMinimizedBottom(0),
mPreviousMinimizedLeft(0),
mMinimizeSignal(NULL)
mPreviousMinimizedLeft(0)
// mNotificationContext(NULL)
{
mPosition.setFloater(*this);
......@@ -2244,10 +2244,10 @@ static LLDefaultChildRegistry::Register<LLFloaterView> r("floater_view");
LLFloaterView::LLFloaterView (const Params& p)
: LLUICtrl (p),
mFocusCycleMode(FALSE),
mMinimizePositionVOffset(0),
mSnapOffsetBottom(0),
mSnapOffsetRight(0),
mFrontChild(NULL)
mMinimizePositionVOffset(0),
mFrontChild(nullptr)
{
mSnapView = getHandle();
}
......
......@@ -233,13 +233,13 @@ public:
mPassedFolderFilter(true),
mStringMatchOffsetFilter(std::string::npos),
mStringFilterSize(0),
mFolderViewItem(NULL),
mLastFilterGeneration(-1),
mLastFolderFilterGeneration(-1),
mMarkedDirtyGeneration(-1),
mMostFilteredDescendantGeneration(-1),
mParent(NULL),
mRootViewModel(root_view_model)
mMarkedDirtyGeneration(-1),
mParent(nullptr),
mRootViewModel(root_view_model),
mFolderViewItem(nullptr)
{
mChildren.clear();
}
......
......@@ -82,10 +82,10 @@ LLPanel::Params::Params()
bg_alpha_image("bg_alpha_image"),
min_width("min_width", 100),
min_height("min_height", 100),
strings("string"),
filename("filename"),
class_name("class"),
help_topic("help_topic"),
strings("string"),
visible_callback("visible_callback"),
accepts_badge("accepts_badge")
{
......@@ -98,6 +98,11 @@ LLPanel::Params::Params()
LLPanel::LLPanel(const LLPanel::Params& p)
: LLUICtrl(p),
LLBadgeHolder(p.accepts_badge),
mCommitCallbackRegistrar(false),
mEnableCallbackRegistrar(false),
mVisibleSignal(NULL),
mHelpTopic(p.help_topic),
mXMLFilename(p.filename),
mBgVisible(p.background_visible),
mBgOpaque(p.background_opaque),
mBgOpaqueColor(p.bg_opaque_color()),
......@@ -106,14 +111,9 @@ LLPanel::LLPanel(const LLPanel::Params& p)
mBgAlphaImageOverlay(p.bg_alpha_image_overlay),
mBgOpaqueImage(p.bg_opaque_image()),
mBgAlphaImage(p.bg_alpha_image()),
mDefaultBtn(NULL),
mBorder(NULL),
mLabel(p.label),
mHelpTopic(p.help_topic),
mCommitCallbackRegistrar(false),
mEnableCallbackRegistrar(false),
mXMLFilename(p.filename),
mVisibleSignal(NULL)
mBorder(nullptr),
mDefaultBtn(nullptr),
mLabel(p.label)
// *NOTE: Be sure to also change LLPanel::initFromParams(). We have too
// many classes derived from LLPanel to retrofit them all to pass in params.
{
......
......@@ -38,10 +38,10 @@
#include "llwindow.h"
LLResizeBar::Params::Params()
: max_size("max_size", S32_MAX),
snapping_enabled("snapping_enabled", true),
resizing_view("resizing_view"),
: resizing_view("resizing_view"),
side("side"),
max_size("max_size", S32_MAX),
snapping_enabled("snapping_enabled", true),
allow_double_click_snapping("allow_double_click_snapping", true)
{
name = "resize_bar";
......
......@@ -65,8 +65,8 @@ static LLDefaultChildRegistry::Register<LLScrollListCtrl> r("scroll_list");
struct SortScrollListItem
{
SortScrollListItem(const std::vector<std::pair<S32, BOOL> >& sort_orders,const LLScrollListCtrl::sort_signal_t* sort_signal)
: mSortOrders(sort_orders)
, mSortSignal(sort_signal)
: mSortSignal(sort_signal)
, mSortOrders(sort_orders)
{}
bool operator()(const LLScrollListItem* i1, const LLScrollListItem* i2)
......@@ -123,19 +123,20 @@ LLScrollListCtrl::Contents::Contents()
LLScrollListCtrl::Params::Params()
: multi_select("multi_select", false),
commit_on_keyboard_movement("commit_on_keyboard_movement", true),
mouse_wheel_opaque("mouse_wheel_opaque", false),
remove_callback("remove_callback"),
has_border("draw_border"),
draw_heading("draw_heading"),
draw_stripes("draw_stripes"),
background_visible("background_visible"),
scroll_bar_bg_visible("scroll_bar_bg_visible"),
column_padding("column_padding"),
page_lines("page_lines", 0),
heading_height("heading_height"),
search_column("search_column", 0),
sort_column("sort_column", -1),
sort_ascending("sort_ascending", true),
mouse_wheel_opaque("mouse_wheel_opaque", false),
commit_on_keyboard_movement("commit_on_keyboard_movement", true),
heading_height("heading_height"),
page_lines("page_lines", 0),
background_visible("background_visible"),
draw_stripes("draw_stripes"),
column_padding("column_padding"),
fg_unselected_color("fg_unselected_color"),
fg_selected_color("fg_selected_color"),
bg_selected_color("bg_selected_color"),
......@@ -145,9 +146,8 @@ LLScrollListCtrl::Params::Params()
bg_stripe_color("bg_stripe_color"),
hovered_color("hovered_color"),
highlighted_color("highlighted_color"),
contents(""),
scroll_bar_bg_visible("scroll_bar_bg_visible"),
scroll_bar_bg_color("scroll_bar_bg_color"),
scroll_bar_bg_color("scroll_bar_bg_color"),
contents(""),
border("border")
{}
......@@ -155,18 +155,34 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
: LLUICtrl(p),
mLineHeight(0),
mScrollLines(0),
mMouseWheelOpaque(p.mouse_wheel_opaque),
mPageLines(p.page_lines),
mHeadingHeight(p.heading_height),
mMaxSelectable(0),
mAllowMultipleSelection(p.multi_select),
mAllowKeyboardMovement(true),
mCommitOnKeyboardMovement(p.commit_on_keyboard_movement),
mCommitOnSelectionChange(false),
mItemRemoved(false),
mSelectionChanged(false),
mItemRemoved(false),
mNeedsScroll(false),
mCanSelect(true),
mMouseWheelOpaque(p.mouse_wheel_opaque),
mCanSelect(true),
mDisplayColumnHeaders(p.draw_heading),
mColumnsDirty(false),
mMaxItemCount(INT_MAX),
mLastSelected(NULL),
mMaxItemCount(INT_MAX),
mColumnPadding(p.column_padding),
mBackgroundVisible(p.background_visible),
mDrawStripes(p.draw_stripes),
mBgWriteableColor(p.bg_writeable_color()),
mBgReadOnlyColor(p.bg_readonly_color()),
mBgSelectedColor(p.bg_selected_color()),
mBgStripeColor(p.bg_stripe_color()),
mFgSelectedColor(p.fg_selected_color()),
mFgUnselectedColor(p.fg_unselected_color()),
mFgDisabledColor(p.fg_disable_color()),
mHoveredColor(p.hovered_color()),
mHighlightedColor(p.highlighted_color()),
mBorderThickness( 2 ),
mOnDoubleClickCallback( NULL ),
mOnMaximumSelectCallback( NULL ),
......@@ -174,33 +190,17 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
mRemoveSignal( NULL ),
mHighlightedItem(-1),
mBorder(NULL),
mSortCallback(NULL),
mPopupMenuHandle(),
mCommentText(NULL),
mSearchColumn(p.search_column),
mNumDynamicWidthColumns(0),
mTotalStaticColumnWidth(0),
mTotalColumnPadding(0),
mSorted(false),
mDirty(false),
mOriginalSelection(-1),
mLastSelected(NULL),
mHeadingHeight(p.heading_height),
mAllowMultipleSelection(p.multi_select),
mDisplayColumnHeaders(p.draw_heading),
mBackgroundVisible(p.background_visible),
mDrawStripes(p.draw_stripes),
mBgWriteableColor(p.bg_writeable_color()),
mBgReadOnlyColor(p.bg_readonly_color()),
mBgSelectedColor(p.bg_selected_color()),
mBgStripeColor(p.bg_stripe_color()),
mFgSelectedColor(p.fg_selected_color()),
mFgUnselectedColor(p.fg_unselected_color()),
mFgDisabledColor(p.fg_disable_color()),
mHighlightedColor(p.highlighted_color()),
mHoveredColor(p.hovered_color()),
mSearchColumn(p.search_column),
mColumnPadding(p.column_padding),
mContextMenuType(MENU_NONE)
mContextMenuType(MENU_NONE),
mSortCallback(NULL)
{
mItemListRect.setOriginAndSize(
mBorderThickness,
......
......@@ -86,9 +86,8 @@ namespace LLInitParam
LLToolBar::Params::Params()
: button_display_mode("button_display_mode"),
button_layout_mode("button_layout_mode", LLToolBarEnums::LAYOUT_NONE),
commands("command"),
side("side", SIDE_TOP),
button_layout_mode("button_layout_mode", LLToolBarEnums::LAYOUT_NONE),
button_icon("button_icon"),
button_icon_small("button_icon_small"),
button_icon_and_text("button_icon_and_text"),
......@@ -101,42 +100,43 @@ LLToolBar::Params::Params()
pad_bottom("pad_bottom"),
pad_between("pad_between"),
min_girth("min_girth"),
commands("command"),
button_panel("button_panel")
{}
LLToolBar::LLToolBar(const LLToolBar::Params& p)
: LLUICtrl(p),
mReadOnly(p.read_only),
mButtonType(p.button_display_mode),
mLayoutType(p.button_layout_mode),
mSideType(p.side),
mWrap(p.wrap),
mNeedsLayout(false),
mModified(false),
mButtonPanel(NULL),
mCenteringStack(NULL),
mPadLeft(p.pad_left),
mPadRight(p.pad_right),
mPadTop(p.pad_top),
mPadBottom(p.pad_bottom),
mPadBetween(p.pad_between),
mMinGirth(p.min_girth),
mPopupMenuHandle(),
mRightMouseTargetButton(NULL),
mStartDragItemCallback(NULL),
mHandleDragItemCallback(NULL),
mHandleDropCallback(NULL),
mButtonAddSignal(NULL),
mButtonEnterSignal(NULL),
mButtonLeaveSignal(NULL),
mButtonRemoveSignal(NULL),
mDragAndDropTarget(false),
mDragRank(0),
mDragx(0),
mDragy(0),
mDragGirth(0),
mCaretIcon(NULL),
mCenterPanel(NULL)
mButtonType(p.button_display_mode),
mLayoutType(p.button_layout_mode),
mCenteringStack(nullptr),
mCenterPanel(nullptr),
mButtonPanel(nullptr),
mPopupMenuHandle(),
mRightMouseTargetButton(nullptr),
mNeedsLayout(false),
mModified(false),
mButtonAddSignal(NULL),
mButtonEnterSignal(NULL),
mButtonLeaveSignal(NULL),
mButtonRemoveSignal(NULL),
mCaretIcon(nullptr)
{
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text;
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon;
......@@ -1206,17 +1206,17 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
LLToolBarButton::LLToolBarButton(const Params& p)
: LLButton(p),
mId(""),
mMouseDownX(0),
mMouseDownY(0),
mWidthRange(p.button_width),
mDesiredHeight(p.desired_height),
mId(""),
mIsEnabledSignal(NULL),
mIsRunningSignal(NULL),
mIsStartingSignal(NULL),
mIsDragged(false),
mStartDragItemCallback(NULL),
mHandleDragItemCallback(NULL),
mIsEnabledSignal(NULL),
mIsRunningSignal(NULL),
mIsStartingSignal(NULL),
mOriginalImageSelected(p.image_selected),
mOriginalImageUnselected(p.image_unselected),
mOriginalImagePressed(p.image_pressed),
......
......@@ -64,15 +64,15 @@ LLViewBorder::Params::Params()
LLViewBorder::LLViewBorder(const LLViewBorder::Params& p)
: LLView(p),
mTexture( NULL ),
mHasKeyboardFocus( FALSE ),
mBorderWidth(p.border_thickness),
mBevel(p.bevel_style),
mStyle(p.render_style),
mHighlightLight(p.highlight_light_color()),
mHighlightDark(p.highlight_dark_color()),
mShadowLight(p.shadow_light_color()),
mShadowDark(p.shadow_dark_color()),
mBevel(p.bevel_style),
mStyle(p.render_style)
mBorderWidth(p.border_thickness),
mTexture( nullptr ),
mHasKeyboardFocus( FALSE )
{}
void LLViewBorder::setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light )
......
......@@ -251,9 +251,9 @@ struct ComplexType : public LLInitParam::Block<ComplexType, ComplexTypeContents>
ComplexType()
: name("name"),
mixed("mixed"),
attribute("xs:attribute"),
elements("xs:element"),
mixed("mixed")
elements("xs:element")
{
}
};
......@@ -298,11 +298,11 @@ public:
void setNameSpace(const std::string& ns) {targetNamespace = ns; xmlns = ns;}
Schema(const std::string& ns = LLStringUtil::null)
: attributeFormDefault("attributeFormDefault"),
elementFormDefault("elementFormDefault"),
xs("xmlns:xs"),
targetNamespace("targetNamespace"),
: targetNamespace("targetNamespace"),
xmlns("xmlns"),
xs("xmlns:xs"),
attributeFormDefault("attributeFormDefault"),
elementFormDefault("elementFormDefault"),
root_element("xs:element")
{
attributeFormDefault = "unqualified";
......
......@@ -81,7 +81,7 @@ public:
virtual BOOL maximize() = 0;
virtual void minimize() = 0;
virtual void restore() = 0;
BOOL getFullscreen() { return mWindowMode == E_WINDOW_FULLSCREEN_EXCLUSIVE || mWindowMode == E_WINDOW_WINDOWED_FULLSCREEN; };
virtual BOOL getFullscreen() { return mWindowMode == E_WINDOW_FULLSCREEN_EXCLUSIVE || mWindowMode == E_WINDOW_WINDOWED_FULLSCREEN; };
virtual BOOL getPosition(LLCoordScreen *position) = 0;
virtual BOOL getSize(LLCoordScreen *size) = 0;
virtual BOOL getSize(LLCoordWindow *size) = 0;
......
......@@ -41,7 +41,7 @@ public:
/*virtual*/ BOOL maximize() override {return FALSE;};
/*virtual*/ void minimize() override {};
/*virtual*/ void restore() override {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getFullscreen() override {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) override {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) override {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) override {return FALSE;};
......
......@@ -46,7 +46,7 @@ public:
/*virtual*/ BOOL maximize() override;
/*virtual*/ void minimize() override;
/*virtual*/ void restore() override;
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getFullscreen() override;
/*virtual*/ BOOL getPosition(LLCoordScreen *position) override;
/*virtual*/ BOOL getSize(LLCoordScreen *size) override;
/*virtual*/ BOOL getSize(LLCoordWindow *size) override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment