diff options
author | belugas <belugas@openttd.org> | 2008-05-17 03:29:16 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2008-05-17 03:29:16 +0000 |
commit | 17bd325574f452b76a3f87edf49cc2f9a39ddea7 (patch) | |
tree | 5903538b115052daa222f770031425851a70a95c /src/window_gui.h | |
parent | 5199f5ff47028911d61eee22a6861bf03ef7b597 (diff) | |
download | openttd-17bd325574f452b76a3f87edf49cc2f9a39ddea7.tar.xz |
(svn r13133) -Codechange: Add a base class (descending from Window) for all new windows that are going to require a ResetObjectToPlace to be performed on closing.
This will allow to free the said window only once, and not twice otherwise
Diffstat (limited to 'src/window_gui.h')
-rw-r--r-- | src/window_gui.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/window_gui.h b/src/window_gui.h index 94482b254..8d527f95f 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -256,7 +256,7 @@ struct ViewportData : ViewPort { int32 dest_scrollpos_y; }; - /** +/** * Data structure for an opened window */ struct Window : ZeroedMemoryAllocator { @@ -493,6 +493,17 @@ public: /*** End of the event handling ***/ }; +/** + * Data structure for a window opened from a toolbar + */ +class PickerWindowBase : public Window { + +public: + PickerWindowBase(const WindowDesc *desc) : Window(desc) {}; // nothing special yet, just propagation + + virtual ~PickerWindowBase(); +}; + enum SortListFlags { VL_NONE = 0, ///< no sort VL_DESC = 1 << 0, ///< sort descending or ascending |