diff options
author | alberth <alberth@openttd.org> | 2009-03-22 21:15:45 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-03-22 21:15:45 +0000 |
commit | 12a31f3d5c47253174684de70d2297543a69838d (patch) | |
tree | 0236e5b673974b968f6be32744f9ecae0391508c /src/window_gui.h | |
parent | 56e7d2944b4e12cd791824f7fb555320b3021b0c (diff) | |
download | openttd-12a31f3d5c47253174684de70d2297543a69838d.tar.xz |
(svn r15819) -Add: Nested widgets framework
Diffstat (limited to 'src/window_gui.h')
-rw-r--r-- | src/window_gui.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/window_gui.h b/src/window_gui.h index f873eb94a..223b17618 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -41,18 +41,26 @@ extern Window *_focused_window; struct WindowDesc : ZeroedMemoryAllocator { WindowDesc(int16 left, int16 top, int16 min_width, int16 min_height, int16 def_width, int16 def_height, - WindowClass window_class, WindowClass parent_class, uint32 flags, const Widget *widgets); - - int16 left; ///< Prefered x position of left edge of the window, @see WindowDefaultPosition() - int16 top; ///< Prefered y position of the top of the window, @see WindowDefaultPosition() - int16 minimum_width; ///< Minimal width of the window - int16 minimum_height; ///< Minimal height of the window - int16 default_width; ///< Prefered initial width of the window - int16 default_height; ///< Prefered initial height of the window - WindowClass cls; ///< Class of the window, @see WindowClass - WindowClass parent_cls; ///< Class of the parent window, @see WindowClass - uint32 flags; ///< Flags, @see WindowDefaultFlags - const Widget *widgets; ///< List of widgets with their position and size for the window + WindowClass window_class, WindowClass parent_class, uint32 flags, const Widget *widgets, + const NWidgetPart *nwid_parts = NULL, int16 nwid_length = 0); + + ~WindowDesc(); + + int16 left; ///< Prefered x position of left edge of the window. @see WindowDefaultPosition() + int16 top; ///< Prefered y position of the top of the window. @see WindowDefaultPosition() + int16 minimum_width; ///< Minimal width of the window. + int16 minimum_height; ///< Minimal height of the window. + int16 default_width; ///< Prefered initial width of the window. + int16 default_height; ///< Prefered initial height of the window. + WindowClass cls; ///< Class of the window, @see WindowClass. + WindowClass parent_cls; ///< Class of the parent window. @see WindowClass + uint32 flags; ///< Flags. @see WindowDefaultFlags + const Widget *widgets; ///< List of widgets with their position and size for the window. + const NWidgetPart *nwid_parts; ///< Nested widget parts describing the window. + int16 nwid_length; ///< Length of the #nwid_parts array. + mutable Widget *new_widgets; ///< Widgets generated from #nwid_parts. + + const Widget *GetWidgets() const; }; /** |