diff options
author | alberth <alberth@openttd.org> | 2009-07-15 22:51:37 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-07-15 22:51:37 +0000 |
commit | 9be387761c9af61fe30e502789e636155e7e1426 (patch) | |
tree | a7d3dd0a6c1d51d97c416085711e1a68910558a5 /src/widget_type.h | |
parent | 92206f2d18257feb4e95ecce2e48f447bd240201 (diff) | |
download | openttd-9be387761c9af61fe30e502789e636155e7e1426.tar.xz |
(svn r16838) -Codechange: Fill Window::nested_array in SetupSmallestSize.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index 6f2f6ba3d..c63beae73 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -165,7 +165,7 @@ class NWidgetBase : public ZeroedMemoryAllocator { public: NWidgetBase(WidgetType tp); - virtual int SetupSmallestSize(Window *w) = 0; + virtual void SetupSmallestSize(Window *w, bool init_array) = 0; virtual void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl) = 0; virtual void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) = 0; @@ -354,7 +354,7 @@ class NWidgetStacked : public NWidgetContainer { public: NWidgetStacked(WidgetType tp); - int SetupSmallestSize(Window *w); + void SetupSmallestSize(Window *w, bool init_array); void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); @@ -394,7 +394,7 @@ class NWidgetHorizontal : public NWidgetPIPContainer { public: NWidgetHorizontal(NWidContainerFlags flags = NC_NONE); - int SetupSmallestSize(Window *w); + void SetupSmallestSize(Window *w, bool init_array); void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); @@ -417,7 +417,7 @@ class NWidgetVertical : public NWidgetPIPContainer { public: NWidgetVertical(NWidContainerFlags flags = NC_NONE); - int SetupSmallestSize(Window *w); + void SetupSmallestSize(Window *w, bool init_array); void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); @@ -430,7 +430,7 @@ class NWidgetSpacer : public NWidgetResizeBase { public: NWidgetSpacer(int length, int height); - int SetupSmallestSize(Window *w); + void SetupSmallestSize(Window *w, bool init_array); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); /* virtual */ void FillNestedArray(NWidgetCore **array, uint length); @@ -450,7 +450,7 @@ public: void Add(NWidgetBase *nwid); void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post); - int SetupSmallestSize(Window *w); + void SetupSmallestSize(Window *w, bool init_array); void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); @@ -471,7 +471,7 @@ class NWidgetLeaf : public NWidgetCore { public: NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, StringID tip); - /* virtual */ int SetupSmallestSize(Window *w); + /* virtual */ void SetupSmallestSize(Window *w, bool init_array); /* virtual */ void Draw(const Window *w); /* virtual */ void Invalidate(const Window *w) const; /* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y); @@ -813,7 +813,7 @@ static inline NWidgetPart NWidgetFunction(NWidgetFunctionType *func_ptr) return part; } -NWidgetContainer *MakeNWidgets(const NWidgetPart *parts, int count); +NWidgetContainer *MakeNWidgets(const NWidgetPart *parts, int count, int *biggest_index); const Widget *InitializeWidgetArrayFromNestedWidgets(const NWidgetPart *parts, int parts_length, const Widget *orig_wid, Widget **wid_cache); |