diff options
author | alberth <alberth@openttd.org> | 2009-05-21 16:14:04 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-05-21 16:14:04 +0000 |
commit | b6d198ca0bd96b45a635493feb8dd8a39987c5d6 (patch) | |
tree | a9fa16038f25cd3fe765868f92cb6cc7124e2e8b /src/widget_type.h | |
parent | db1be47d768f4938e187d5994eae8d519e4757cf (diff) | |
download | openttd-b6d198ca0bd96b45a635493feb8dd8a39987c5d6.tar.xz |
(svn r16369) -Codechange: Renaming ComputeMinimalSize() to SetupSmallestSize(), and AssignMinimalPosition() to AssignSizePosition(), they do not compute minimal size anymore.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index e4298fcfb..4b49741bb 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -152,8 +152,8 @@ class NWidgetBase : public ZeroedMemoryAllocator { public: NWidgetBase(WidgetType tp); - virtual int ComputeMinimalSize() = 0; - virtual void AssignMinimalPosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl) = 0; + virtual int SetupSmallestSize() = 0; + virtual void AssignSizePosition(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; @@ -178,7 +178,7 @@ public: uint resize_x; ///< Horizontal resize step (\c 0 means not resizable). uint resize_y; ///< Vertical resize step (\c 0 means not resizable). /* Size of the widget in the smallest window possible. - * Computed by #ComputeMinimalSize() followed by #AssignMinimalPosition(). + * Computed by #SetupSmallestSize() followed by #AssignSizePosition(). */ uint smallest_x; ///< Smallest horizontal size of the widget in a filled window. uint smallest_y; ///< Smallest vertical size of the widget in a filled window. @@ -205,7 +205,7 @@ public: void SetFill(bool fill_x, bool fill_y); void SetResize(uint resize_x, uint resize_y); - void AssignMinimalPosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); + void AssignSizePosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); uint min_x; ///< Minimal horizontal size of only this widget. uint min_y; ///< Minimal vertical size of only this widget. @@ -220,7 +220,7 @@ public: void SetIndex(int index); void SetDataTip(uint16 widget_data, StringID tool_tip); - int ComputeMinimalSize(); + int SetupSmallestSize(); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); Colours colour; ///< Colour of this widget. @@ -253,8 +253,8 @@ class NWidgetStacked : public NWidgetContainer { public: NWidgetStacked(WidgetType tp); - int ComputeMinimalSize(); - void AssignMinimalPosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); + int SetupSmallestSize(); + void AssignSizePosition(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); }; @@ -277,8 +277,8 @@ class NWidgetHorizontal : public NWidgetPIPContainer { public: NWidgetHorizontal(); - int ComputeMinimalSize(); - void AssignMinimalPosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); + int SetupSmallestSize(); + void AssignSizePosition(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); }; @@ -289,7 +289,7 @@ class NWidgetHorizontalLTR : public NWidgetHorizontal { public: NWidgetHorizontalLTR(); - void AssignMinimalPosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); + void AssignSizePosition(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); }; @@ -300,8 +300,8 @@ class NWidgetVertical : public NWidgetPIPContainer { public: NWidgetVertical(); - int ComputeMinimalSize(); - void AssignMinimalPosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); + int SetupSmallestSize(); + void AssignSizePosition(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); }; @@ -313,7 +313,7 @@ class NWidgetSpacer : public NWidgetResizeBase { public: NWidgetSpacer(int length, int height); - int ComputeMinimalSize(); + int SetupSmallestSize(); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); }; @@ -327,8 +327,8 @@ public: void Add(NWidgetBase *nwid); void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post); - int ComputeMinimalSize(); - void AssignMinimalPosition(uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); + int SetupSmallestSize(); + void AssignSizePosition(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); private: |