The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
select_orb_colors.hpp
Go to the documentation of this file.
1 /*
2  Part of the Battle for Wesnoth Project http://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 #ifndef GUI_DIALOGS_SELECT_ORB_COLORS_HPP_INCLUDED
15 #define GUI_DIALOGS_SELECT_ORB_COLORS_HPP_INCLUDED
16 
17 #include "gui/dialogs/dialog.hpp"
18 #include "gui/widgets/group.hpp"
19 #include <map>
20 
21 namespace gui2 {
22 
23 class ttoggle_button;
24 
25 class tselect_orb_colors : public tdialog {
26 public:
28 
29  /**
30  * The display function.
31  *
32  * See @ref tdialog for more information.
33  */
34  static void display(CVideo& video) {
35  tselect_orb_colors().show(video);
36  }
37 private:
38  void setup_orb_group(const std::string& base_id, bool& shown, const std::string& initial, twindow& window, bool connect = true);
39  void handle_toggle_click(bool& storage);
40  void handle_reset_click(twindow& window);
41 
43  std::map<std::string, tgroup<std::string> > groups_;
44 
45  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
46  virtual const std::string& window_id() const;
47 
48  /** Inherited from tdialog. */
49  void pre_show(twindow& window);
50  /** Inherited from tdialog. */
51  void post_show(twindow& window);
52 };
53 
54 }
55 
56 #endif
void post_show(twindow &window)
Inherited from tdialog.
std::map< std::string, tgroup< std::string > > groups_
void setup_orb_group(const std::string &base_id, bool &shown, const std::string &initial, twindow &window, bool connect=true)
Definition: video.hpp:58
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:62
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
void handle_reset_click(twindow &window)
void pre_show(twindow &window)
Inherited from tdialog.
Abstract base class for all dialogs.
Definition: dialog.hpp:121
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
connection connect(const std::string &host, int port)
Function to attempt to connect to a remote host.
Definition: network.cpp:498
GLsizei const GLcharARB ** string
Definition: glew.h:4503
static void display(CVideo &video)
The display function.
void handle_toggle_click(bool &storage)