diff options
author | alberth <alberth@openttd.org> | 2009-11-20 20:10:06 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-11-20 20:10:06 +0000 |
commit | 777d5ce12eaf60389746245f3e3ceae408afc17e (patch) | |
tree | 6cd2b30b16b1156dbce5f6814cbb6f63be98c14b /src/widget_type.h | |
parent | e166d5b4028432b5f16234b2ae1d045f5fafe3a8 (diff) | |
download | openttd-777d5ce12eaf60389746245f3e3ceae408afc17e.tar.xz |
(svn r18201) -Codechange (r18092): No need anymore for initializing nested widgets for Widget* arrays.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index d4e1abda9..ca428e76a 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -154,7 +154,6 @@ enum WidgetType { /** Different forms of sizing nested widgets, using NWidgetBase::AssignSizePosition() */ enum SizingType { - ST_ARRAY, ///< Initialize nested widget tree to generate a #Widget * array. ST_SMALLEST, ///< Initialize nested widget tree to smallest size. Also updates \e current_x and \e current_y. ST_RESIZE, ///< Resize the nested widget tree. }; @@ -174,7 +173,7 @@ public: NWidgetBase(WidgetType tp); 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 AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl) = 0; virtual void FillNestedArray(NWidgetBase **array, uint length) = 0; @@ -228,7 +227,7 @@ public: uint8 padding_left; ///< Paddings added to the left of the widget. Managed by parent container widget. protected: - inline void StoreSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y); + inline void StoreSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height); }; /** @@ -262,7 +261,7 @@ public: void SetFill(bool fill_x, bool fill_y); void SetResize(uint resize_x, uint resize_y); - 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 AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl); uint min_x; ///< Minimal horizontal size of only this widget. uint min_y; ///< Minimal vertical size of only this widget. @@ -383,7 +382,7 @@ public: void SetIndex(int index); 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 AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl); /* virtual */ void FillNestedArray(NWidgetBase **array, uint length); /* virtual */ void Draw(const Window *w); @@ -428,7 +427,7 @@ public: NWidgetHorizontal(NWidContainerFlags flags = NC_NONE); 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 AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl); }; /** Horizontal container that doesn't change the direction of the widgets for RTL languages. @@ -437,7 +436,7 @@ class NWidgetHorizontalLTR : public NWidgetHorizontal { public: NWidgetHorizontalLTR(NWidContainerFlags flags = NC_NONE); - 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 AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl); }; /** Vertical container. @@ -447,7 +446,7 @@ public: NWidgetVertical(NWidContainerFlags flags = NC_NONE); 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 AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl); }; @@ -476,7 +475,7 @@ public: void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post); 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 AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl); /* virtual */ void FillNestedArray(NWidgetBase **array, uint length); |