The Battle for Wesnoth  1.17.0-dev
edit_side.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2018 by Fabian Müller <fabianmueller5@gmx.de>
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 
19 #include "gui/widgets/group.hpp"
20 #include "team.hpp"
21 
22 namespace gui2
23 {
24 
25 namespace dialogs
26 {
27 
28 /**
29  * @ingroup GUIWindowDefinitionWML
30  *
31  * Dialog for editing gamemap sides.
32  * Key |Type |Mandatory|Description
33  * ------------------|---------------|---------|-----------
34  * title | @ref label |yes |Dialog title label.
35  * label | @ref text_box |yes |Input field for the id.
36  * team_only_toggle | toggle_button |yes |Checkbox for whether to make the label visible to the player's team only or not.
37  */
39 {
40 public:
42 
43  /** The execute function. See @ref modal_dialog for more information. */
45 
46 private:
47  virtual void pre_show(window& window) override;
48  virtual void post_show(window& window) override;
49 
50  team::CONTROLLER& controller_;
52 
53  team::SHARE_VISION& share_vision_;
55 
56  virtual const std::string& window_id() const override;
57 };
58 } // namespace dialogs
59 } // namespace gui2
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
Definition: edit_side.cpp:70
Dialog for editing gamemap sides.
Definition: edit_side.hpp:38
logger & info()
Definition: log.cpp:88
team::SHARE_VISION & share_vision_
Definition: edit_side.hpp:53
virtual const std::string & window_id() const override
The id of the window to build.
Generic file dialog.
Definition: field-fwd.hpp:22
virtual void pre_show(window &window) override
The execute function.
Definition: edit_side.cpp:52
Various uncategorised dialogs.
group< team::SHARE_VISION > vision_group
Definition: edit_side.hpp:54
editor_edit_side(editor::editor_team_info &info)
Definition: edit_side.cpp:30
Abstract base class for all modal dialogs.
team::CONTROLLER & controller_
Definition: edit_side.hpp:50
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64
group< team::CONTROLLER > controller_group
Definition: edit_side.hpp:51