summaryrefslogtreecommitdiff
path: root/src/window_gui.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-14 22:50:35 +0000
committerfrosch <frosch@openttd.org>2012-11-14 22:50:35 +0000
commitf5d8ba5d7f90abc72db6c0470da383ecf82da487 (patch)
tree3dbbbbe18733005c5851251dac62314d871b2b30 /src/window_gui.h
parentdcfb2af871b76a7b65fb959b2f4ebc2da2f9e4d3 (diff)
downloadopenttd-f5d8ba5d7f90abc72db6c0470da383ecf82da487.tar.xz
(svn r24742) -Codechange: Remove QueryStringBaseWindow and store QueryStrings per widget instead.
Diffstat (limited to 'src/window_gui.h')
-rw-r--r--src/window_gui.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index ca93ee091..ab3b83505 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -18,6 +18,7 @@
#include "tile_type.h"
#include "widget_type.h"
#include "core/smallvec_type.hpp"
+#include "core/smallmap_type.hpp"
/** State of handling an event. */
enum EventState {
@@ -240,6 +241,8 @@ struct ViewportData : ViewPort {
int32 dest_scrollpos_y; ///< Current destination y coordinate to display (virtual screen coordinate of topleft corner of the viewport).
};
+struct QueryString;
+
/**
* Data structure for an opened window
*/
@@ -295,6 +298,7 @@ public:
ViewportData *viewport; ///< Pointer to viewport data, if present.
uint32 desc_flags; ///< Window/widgets default flags setting. @see WindowDefaultFlag
const NWidgetCore *nested_focus; ///< Currently focused nested widget, or \c NULL if no nested widget has focus.
+ SmallMap<int, QueryString*> querystrings; ///< QueryString associated to WWT_EDITBOX widgets.
NWidgetBase *nested_root; ///< Root of the nested tree.
NWidgetBase **nested_array; ///< Array of pointers into the tree. Do not access directly, use #Window::GetWidget() instead.
uint nested_array_size; ///< Size of the nested array.
@@ -315,6 +319,9 @@ public:
const Scrollbar *GetScrollbar(uint widnum) const;
Scrollbar *GetScrollbar(uint widnum);
+ const QueryString *GetQueryString(uint widnum) const;
+ QueryString *GetQueryString(uint widnum);
+
void InitNested(const WindowDesc *desc, WindowNumber number = 0);
void CreateNestedTree(const WindowDesc *desc, bool fill_nested = true);
void FinishInitNested(const WindowDesc *desc, WindowNumber window_number = 0);