The Battle for Wesnoth  1.15.12+dev
log_settings.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 #include <map>
19 
20 namespace gui2
21 {
22 class text_box_base;
23 
24 namespace dialogs
25 {
26 
27 class log_settings : public modal_dialog
28 {
29 public:
30  /** Constructor. */
31  log_settings();
32 
33  /**
34  * The display function.
35  *
36  * See @ref modal_dialog for more information.
37  */
39 
40 private:
41  void set_logger(const std::basic_string<char> log_domain);
42 
43  std::map<std::string, group<std::string>> groups_;
44  std::vector<std::string> domain_list_, widget_id_;
45 
46  virtual const std::string& window_id() const override;
47 
48  virtual void pre_show(window& window) override;
49 
50  virtual void post_show(window& window) override;
51 
52  void filter_text_changed(const std::string& text);
53 
54  std::vector<std::string> last_words_;
55 
56 };
57 
58 } // namespace dialogs
59 } // end namespace gui2
std::vector< std::string > widget_id_
std::vector< std::string > domain_list_
void set_logger(const std::basic_string< char > log_domain)
The display function.
Generic file dialog.
Definition: field-fwd.hpp:22
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
std::vector< std::string > last_words_
Various uncategorised dialogs.
void filter_text_changed(const std::string &text)
std::map< std::string, group< std::string > > groups_
Abstract base class for all modal dialogs.
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64
virtual const std::string & window_id() const override
The id of the window to build.
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.