The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
label_settings.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_LABEL_SETTINGS_HPP_INCLUDED
15 #define GUI_DIALOGS_LABEL_SETTINGS_HPP_INCLUDED
16 
17 #include "gui/dialogs/dialog.hpp"
18 #include <map>
19 #include "display_context.hpp"
20 #include "tstring.hpp"
21 
22 namespace gui2 {
23 
24 class tlabel_settings : public tdialog {
25 public:
27 
28  /**
29  * The execute function.
30  *
31  * See @ref tdialog for more information.
32  */
33  static bool execute(display_context& dc, CVideo& video);
34 private:
35  std::map<std::string, bool> all_labels;
36  std::map<std::string, t_string> labels_display;
38 
39  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
40  virtual const std::string& window_id() const;
41 
42  /** Inherited from tdialog. */
43  void pre_show(twindow& window);
44 
45  /** Callback for toggling a checkbox state. */
46  void toggle_category(twidget& box, std::string category);
47 };
48 }
49 
50 #endif
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
std::map< std::string, bool > all_labels
std::map< std::string, t_string > labels_display
Abstract base class for all dialogs.
Definition: dialog.hpp:121
tlabel_settings(display_context &dc)
static bool execute(display_context &dc, CVideo &video)
The execute function.
display_context & viewer
void pre_show(twindow &window)
Inherited from tdialog.
Base class for all widgets.
Definition: widget.hpp:49
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
GLsizei const GLcharARB ** string
Definition: glew.h:4503
void toggle_category(twidget &box, std::string category)
Callback for toggling a checkbox state.