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