(svn r16838) -Codechange: Fill Window::nested_array in SetupSmallestSize.

This commit is contained in:
alberth
2009-07-15 22:51:37 +00:00
parent 92206f2d18
commit 9be387761c
4 changed files with 53 additions and 54 deletions

View File

@@ -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);