#include "gui/dialogs/field-fwd.hpp"#include <string>#include <vector>

Go to the source code of this file.
Classes | |
| class | gui2::tdialog |
| Abstract base class for all dialogs. More... | |
Namespaces | |
| namespace | gui2 |
A class inherited from ttext_box that displays its input as stars. | |
Defines | |
| #define | REGISTER_WINDOW(id) |
| Registers a window. | |
| #define | REGISTER_DIALOG2(type, id) |
| Registers a window for a dialog. | |
| #define | REGISTER_DIALOG(window_id) REGISTER_DIALOG2(t##window_id, window_id) |
| Wrapper for REGISTER_DIALOG2. | |
| #define REGISTER_DIALOG | ( | window_id | ) | REGISTER_DIALOG2(t##window_id, window_id) |
Wrapper for REGISTER_DIALOG2.
"Calls" REGISTER_DIALOG2(twindow_id, window_id)
Definition at line 95 of file dialog.hpp.
Referenced by gui2::tdata_manage::pre_show(), and gui2::tmp_create_game::tmp_create_game().
| #define REGISTER_DIALOG2 | ( | type, | ||
| id | ||||
| ) |
\ REGISTER_WINDOW(id) \ \ const std::string& \ type::window_id() const \ { \ static const std::string result(#id); \ return result; \ }
Registers a window for a dialog.
Call this function to register a window. In the header of the class it adds the following code:
// Inherited from tdialog, implemented by REGISTER_DIALOG. virtual const std::string& id() const; *
Then use this macro in the implementation, inside the gui2 namespace.
id is "foo" and the type tfoo it's easier to use REGISTER_DIALOG(foo).| type | Class type of the window to register. | |
| id | Id of the window, multiple dialogs can use the same window so the id doesn't need to be unique. |
Definition at line 79 of file dialog.hpp.
| #define REGISTER_WINDOW | ( | id | ) |
namespace { \ \ namespace ns_##id { \ \ struct tregister_helper { \ tregister_helper() \ { \ register_window(#id); \ } \ }; \ \ tregister_helper register_helper; \ } \ }
Registers a window.
This function registers a window. The registration is used to validate whether the config for the window exists when starting Wesnoth.
| id | Id of the window, multiple dialogs can use the same window so the id doesn't need to be unique. |
Definition at line 42 of file dialog.hpp.
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:05:17 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |