The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
logging.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_LOGGING_HPP_INCLUDED
15 #define GUI_LOGGING_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 tlabel;
24 class ttoggle_button;
25 
26 class tlogging : public tdialog
27 {
28 public:
29  /** Constructor. */
30  tlogging();
31 
32  /**
33  * The display function.
34  *
35  * See @ref tdialog for more information.
36  */
37  static void display(CVideo& video)
38  {
39  tlogging().show(video);
40  }
41 
42 
43 private:
44  void set_logger(const std::basic_string<char> log_domain);
45 
46  std::map<std::string, tgroup<std::string> > groups_;
47  std::vector<std::string> domain_list_, widget_id_;
48 
49  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
50  virtual const std::string& window_id() const;
51 
52  /** Inherited from tdialog. */
53  void pre_show(twindow& window);
54 
55  /** Inherited from tdialog. */
56  void post_show(twindow& window);
57 
58 };
59 
60 } // end namespace gui2
61 
62 #endif
std::vector< std::string > widget_id_
Definition: logging.hpp:47
void pre_show(twindow &window)
Inherited from tdialog.
Definition: logging.cpp:53
Definition: video.hpp:58
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
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 set_logger(const std::basic_string< char > log_domain)
Definition: logging.cpp:92
Abstract base class for all dialogs.
Definition: dialog.hpp:121
std::map< std::string, tgroup< std::string > > groups_
Definition: logging.hpp:46
static void display(CVideo &video)
The display function.
Definition: logging.hpp:37
tlogging()
Constructor.
Definition: logging.cpp:32
void post_show(twindow &window)
Inherited from tdialog.
Definition: logging.cpp:85
GLsizei const GLcharARB ** string
Definition: glew.h:4503
std::vector< std::string > domain_list_
Definition: logging.hpp:47