15 #define GETTEXT_DOMAIN "wesnoth-lib"
39 widget_id_.push_back(
"none");
40 widget_id_.push_back(
"err");
41 widget_id_.push_back(
"warn");
42 widget_id_.push_back(
"info");
43 widget_id_.push_back(
"debug");
49 std::string one_domain;
53 while(iss >> one_domain){
54 domain_list_.push_back(one_domain);
60 listbox& logger_box = find_widget<listbox>(&
window,
"logger_listbox",
false);
67 item[
"label"] = this_domain;
75 widget* this_widget = this_grid->
find(this_id,
false);
84 if (current_sev <= max_sev) {
90 text_box* filter = find_widget<text_box>(&
window,
"filter_box",
false,
true);
101 const std::vector<std::string> words =
utils::split(text,
' ');
109 boost::dynamic_bitset<> show_items;
118 for(
const auto& word : words)
126 show_items[
i] = found;
142 std::string active_value =
groups_[log_domain].get_active_member_value();
void set_logger(const std::basic_string< char > log_domain)
The display function.
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
std::vector< std::string > domain_list_
void filter_text_changed(const std::string &text)
std::vector< std::string > last_words_
std::map< std::string, group< std::string > > groups_
std::vector< std::string > widget_id_
Abstract base class for all modal dialogs.
window * get_window()
Returns a pointer to the dialog's window.
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.
base class of top level items, the only item which needs to store the final canvases to draw on.
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
std::pair< std::string, unsigned > 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)