The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
new_map.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2016 by Mark de Wever <[email protected]>
3  Part of the Battle for Wesnoth Project http://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 #ifndef GUI_DIALOGS_EDITOR_NEW_MAP_HPP_INCLUDED
16 #define GUI_DIALOGS_EDITOR_NEW_MAP_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 namespace gui2
21 {
22 
23 class teditor_new_map : public tdialog
24 {
25 public:
26  /**
27  * Constructor.
28  *
29  * @param [in, out] width The parameter's usage is:
30  * - Input: The initial width of the map.
31  * - Output: The selected width of the map if
32  * the dialog returns @ref twindow::OK
33  * undefined otherwise.
34  * @param [in, out] height The parameter's usage is:
35  * - Input: The initial height of the map.
36  * - Output: The selected height of the map if
37  * the dialog returns @ref twindow::OK
38  * undefined otherwise.
39  */
40  teditor_new_map(int& width, int& height);
41 
42  /** The execute function see @ref tdialog for more information. */
43  static bool execute(int& width, int& height, CVideo& video)
44  {
45  return teditor_new_map(width, height).show(video);
46  }
47 
48 private:
49  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
50  virtual const std::string& window_id() const;
51 };
52 
53 } // namespace gui2
54 
55 #endif
teditor_new_map(int &width, int &height)
Constructor.
Definition: new_map.cpp:44
Definition: video.hpp:58
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
Abstract base class for all dialogs.
Definition: dialog.hpp:121
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Definition: glew.h:1220
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
GLint GLint GLint GLint GLint GLint GLsizei width
Definition: glew.h:1220
static bool execute(int &width, int &height, CVideo &video)
The execute function see tdialog for more information.
Definition: new_map.hpp:43
GLsizei const GLcharARB ** string
Definition: glew.h:4503