38 listbox& list = find_widget<listbox>(&
window,
"themes",
false);
39 window.keyboard_capture(&list);
46 std::string theme_name =
t.name;
47 if(theme_name.empty()) {
51 column[
"label"] = theme_name;
52 data.emplace(
"name", column);
53 column[
"label"] =
t.description;
54 data.emplace(
"description", column);
72 listbox& list = find_widget<listbox>(&
window,
"themes",
false);
window(const builder_window::window_resolution &definition)
< Needs to be initialized in show.
Dialog for selecting a GUI theme.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
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.
int get_selected_row() const
Returns the first selected row.
std::vector< theme_info > themes_
bool select_row(const unsigned row, const bool select=true)
Selects a row.
std::map< std::string, t_string > widget_item
This file contains the settings handling of the widget library.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
unsigned get_item_count() const
Returns the number of items in the listbox.
Definitions related to theme-support.
int get_retval() const
Returns the cached window exit code.
Abstract base class for all modal dialogs.
std::map< std::string, widget_item > widget_data
Dialog was closed with the OK button.
base class of top level items, the only item which needs to store the final canvases to draw on...