(svn r24742) -Codechange: Remove QueryStringBaseWindow and store QueryStrings per widget instead.

This commit is contained in:
frosch
2012-11-14 22:50:35 +00:00
parent dcfb2af871
commit f5d8ba5d7f
16 changed files with 180 additions and 131 deletions

View File

@@ -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);