summaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-01-24 02:36:55 +0000
committerbjarni <bjarni@openttd.org>2007-01-24 02:36:55 +0000
commit4dd0d007b1cf1f595fba5d690a096e69c7bbca20 (patch)
tree6db06687d695ee0417f9694efa9466b841ab1481 /src/window.h
parent802d1065b2d181ad71b4a1506e5af44b60907859 (diff)
downloadopenttd-4dd0d007b1cf1f595fba5d690a096e69c7bbca20.tar.xz
(svn r8384) -Codechange: [GUI] instead of writing a resize button function for each window, a global ResizeButtons() is added
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h
index be3edae9d..5e5fcf6ba 100644
--- a/src/window.h
+++ b/src/window.h
@@ -767,4 +767,21 @@ enum SpecialMouseMode {
void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y);
+/** Evenly distribute some widgets when resizing horizontally (often a button row)
+ * @param w widow to modify
+ * @param a,b,c,d the widgets to resize (left to right, order matters)
+ * @param right the widget right of the buttons, that needs resizing
+ */
+void ResizeButtons(Window *w, byte a, byte b, byte right);
+void ResizeButtons(Window *w, byte a, byte b, byte c, byte right);
+void ResizeButtons(Window *w, byte a, byte b, byte c, byte d, byte right);
+
+/** Evenly distribute some widgets when resizing horizontally (often a button row)
+ * When only two arguments are given, the widgets are presumed to be on a line and only the ends are given
+ * @param w widow to modify
+ * @param left The leftmost widget to resize
+ * @param right The widget just right of the widgets to resize
+ */
+void ResizeButtons(Window *w, byte left, byte right);
+
#endif /* WINDOW_H */