summaryrefslogtreecommitdiff
path: root/src/widget_type.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-04 15:35:36 +0000
committeralberth <alberth@openttd.org>2009-07-04 15:35:36 +0000
commitd65c6cae545f36e7f25efcee0b28bbfac7d64769 (patch)
tree88411cfe473c05b2abb2c6afdce7932f660312cd /src/widget_type.h
parent2385aeae3c3b065fac37724334469f1ed9ea29f3 (diff)
downloadopenttd-d65c6cae545f36e7f25efcee0b28bbfac7d64769.tar.xz
(svn r16740) -Codechange: Self-sizing widgets in intro screen, town directory, and found town windows.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r--src/widget_type.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widget_type.h b/src/widget_type.h
index 084f36be8..0e5fd42c4 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() = 0;
+ virtual int SetupSmallestSize(Window *w) = 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;
@@ -284,7 +284,6 @@ public:
inline void SetDisabled(bool disabled);
inline bool IsDisabled();
- int SetupSmallestSize();
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
@@ -355,7 +354,7 @@ class NWidgetStacked : public NWidgetContainer {
public:
NWidgetStacked(WidgetType tp);
- int SetupSmallestSize();
+ int SetupSmallestSize(Window *w);
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);
@@ -395,7 +394,7 @@ class NWidgetHorizontal : public NWidgetPIPContainer {
public:
NWidgetHorizontal(NWidContainerFlags flags = NC_NONE);
- int SetupSmallestSize();
+ int SetupSmallestSize(Window *w);
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);
@@ -418,7 +417,7 @@ class NWidgetVertical : public NWidgetPIPContainer {
public:
NWidgetVertical(NWidContainerFlags flags = NC_NONE);
- int SetupSmallestSize();
+ int SetupSmallestSize(Window *w);
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);
@@ -431,7 +430,7 @@ class NWidgetSpacer : public NWidgetResizeBase {
public:
NWidgetSpacer(int length, int height);
- int SetupSmallestSize();
+ int SetupSmallestSize(Window *w);
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
@@ -451,7 +450,7 @@ public:
void Add(NWidgetBase *nwid);
void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post);
- int SetupSmallestSize();
+ int SetupSmallestSize(Window *w);
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);
@@ -472,6 +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 Draw(const Window *w);
/* virtual */ void Invalidate(const Window *w) const;
/* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y);