The Battle for Wesnoth  1.15.1+dev
select_orb_colors.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2017-2018 by the Battle for Wesnoth Project https://www.wesnoth.org/
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY.
10 
11  See the COPYING file for more details.
12 */
13 
14 #pragma once
15 
17 #include "gui/widgets/group.hpp"
18 
19 #include <map>
20 
21 namespace gui2
22 {
23 namespace dialogs
24 {
26 {
27 public:
29 
30  /**
31  * The display function.
32  *
33  * See @ref modal_dialog for more information.
34  */
36 
37 private:
38  void setup_orb_group(const std::string& base_id, bool& shown, const std::string& initial);
39 
40  void reset_orb_group(const std::string& base_id, bool& shown, const std::string& initial);
41 
42  void toggle_orb_callback(bool& storage);
43  void reset_orb_callback();
44 
46 
47  std::map<std::string, group<std::string>> groups_;
48 
49  /** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */
50  virtual const std::string& window_id() const override;
51 
52  /** Inherited from modal_dialog. */
53  virtual void pre_show(window& window) override;
54 
55  /** Inherited from modal_dialog. */
56  virtual void post_show(window& window) override;
57 };
58 
59 } // namespace dialogs
60 } // namespace gui2
void reset_orb_group(const std::string &base_id, bool &shown, const std::string &initial)
Generic file dialog.
Definition: field-fwd.hpp:22
void setup_orb_group(const std::string &base_id, bool &shown, const std::string &initial)
The display function.
virtual void post_show(window &window) override
Inherited from modal_dialog.
Various uncategorised dialogs.
virtual void pre_show(window &window) override
Inherited from modal_dialog.
virtual const std::string & window_id() const override
Inherited from modal_dialog, implemented by REGISTER_DIALOG.
Abstract base class for all modal dialogs.
std::map< std::string, group< std::string > > groups_
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:63