The Battle for Wesnoth  1.17.0-dev
new_map.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2018 by Mark de Wever <koraq@xs4all.nl>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
18 
19 #include "tstring.hpp"
20 
21 namespace gui2::dialogs
22 {
23 
24 /**
25  * @ingroup GUIWindowDefinitionWML
26  *
27  * Key |Type |Mandatory|Description
28  * ------------------|------------------|---------|-----------
29  * width | integer_selector |yes |An integer selector to determine the width of the map to create.
30  * height | integer_selector |yes |An integer selector to determine the height of the map to create.
31  */
33 {
34 public:
35  /**
36  * Constructor.
37  *
38  * @param title The title of the dialog.
39  * @param [in, out] width The parameter's usage is:
40  * - Input: The initial width of the map.
41  * - Output: The selected width of the map if
42  * the dialog returns retval::OK
43  * undefined otherwise.
44  * @param [in, out] height The parameter's usage is:
45  * - Input: The initial height of the map.
46  * - Output: The selected height of the map if
47  * the dialog returns retval::OK
48  * undefined otherwise.
49  */
50  editor_new_map(const t_string& title, int& width, int& height);
51 
52  /** The execute function. See @ref modal_dialog for more information. */
54 
55 private:
56  virtual const std::string& window_id() const override;
57 };
58 
59 } // namespace dialogs
editor_new_map(const t_string &title, int &width, int &height)
Constructor.
Definition: new_map.cpp:25
virtual const std::string & window_id() const override
The execute function.
Key Type MandatoryDescription width integer_selector yes An integer selector to determine the width ...
Definition: new_map.hpp:32
Abstract base class for all modal dialogs.