The Battle for Wesnoth  1.17.0-dev
log_settings.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2017 - 2021
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
18 #include "gui/widgets/group.hpp"
19 #include <map>
20 
21 namespace gui2
22 {
23 class text_box_base;
24 
25 namespace dialogs
26 {
27 
28 class log_settings : public modal_dialog
29 {
30 public:
31  /** Constructor. */
32  log_settings();
33 
34  /**
35  * The display function.
36  *
37  * See @ref modal_dialog for more information.
38  */
40 
41 private:
42  void set_logger(const std::basic_string<char> log_domain);
43 
44  std::map<std::string, group<std::string>> groups_;
45  std::vector<std::string> domain_list_, widget_id_;
46 
47  virtual const std::string& window_id() const override;
48 
49  virtual void pre_show(window& window) override;
50 
51  virtual void post_show(window& window) override;
52 
53  void filter_text_changed(const std::string& text);
54 
55  std::vector<std::string> last_words_;
56 
57 };
58 
59 } // namespace dialogs
60 } // 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:23
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:65
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.