15 #define GETTEXT_DOMAIN "wesnoth-lib"
38 widget_id_.push_back(
"none");
39 widget_id_.push_back(
"err");
40 widget_id_.push_back(
"warn");
41 widget_id_.push_back(
"info");
42 widget_id_.push_back(
"debug");
48 std::string one_domain;
52 while(iss >> one_domain){
53 domain_list_.push_back(one_domain);
59 listbox& logger_box = find_widget<listbox>(
"logger_listbox");
66 item[
"label"] = this_domain;
74 widget* this_widget = this_grid->
find(this_id,
false);
83 if (current_sev <= max_sev) {
89 text_box* filter = find_widget<text_box>(
"filter_box",
false,
true);
98 listbox& list = find_widget<listbox>(
"logger_listbox");
100 const std::vector<std::string> words =
utils::split(text,
' ');
108 boost::dynamic_bitset<> show_items;
117 for(
const auto& word : words)
125 show_items[
i] = found;
141 std::string active_value =
groups_[log_domain].get_active_member_value();
void set_logger(const std::basic_string< char > log_domain)
The display function.
std::vector< std::string > domain_list_
void filter_text_changed(const std::string &text)
std::vector< std::string > last_words_
virtual void post_show() override
Actions to be taken after the window has been shown.
std::map< std::string, group< std::string > > groups_
std::vector< std::string > widget_id_
virtual void pre_show() override
Actions to be taken before showing the window.
Abstract base class for all modal dialogs.
widget * find(const std::string &id, const bool must_be_active) override
See widget::find.
void add_member(selectable_item *w, const T &value)
Adds a widget/value pair to the group map.
void set_member_states(const T &value)
Sets the toggle values for all widgets besides the one associated with the specified value to false.
void set_row_shown(const unsigned row, const bool shown)
Makes a row visible or invisible.
grid & add_row(const widget_item &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
const grid * get_row_grid(const unsigned row) const
Returns the grid of the wanted row.
unsigned get_item_count() const
Returns the number of items in the listbox.
void set_text_changed_callback(std::function< void(text_box_base *textbox, const std::string text)> cb)
Set the text_changed callback.
A widget that allows the user to input text in single line.
void keyboard_capture(widget *widget)
void add_to_keyboard_chain(widget *widget)
Adds the widget to the keyboard chain.
unsigned in
If equal to search_counter, the node is off the list.
Standard logging facilities (interface).
REGISTER_DIALOG(editor_edit_unit)
std::map< std::string, widget_item > widget_data
std::map< std::string, t_string > widget_item
bool get_log_domain_severity(const std::string &name, severity &severity)
std::string list_log_domains(const std::string &filter)
bool set_log_domain_severity(const std::string &name, severity severity)
bool ci_search(const std::string &s1, const std::string &s2)
std::vector< std::string > split(const config_attribute_value &val)