34 listbox& list = find_widget<listbox>(&
window,
"addons_list",
false);
37 this->selections_.clear();
39 for(
const auto & entry : titles_map_)
41 const std::string&
id = entry.first;
42 const std::string& title = entry.second;
44 this->ids_.push_back(
id);
45 this->selections_[
id] =
false;
50 column[
"label"] = title;
51 data.emplace(
"name", column);
59 const listbox& list = find_widget<listbox>(&
window,
"addons_list",
false);
62 assert(rows == this->
ids_.size() && rows == this->titles_map_.size());
68 for(
unsigned k = 0; k < rows; ++k) {
71 = find_widget<const toggle_button>(
g,
"checkbox",
false);
78 std::vector<std::string> retv;
83 retv.push_back(entry.first);
Dialog with a checkbox list for choosing installed add-ons to remove.
std::map< std::string, bool > selections_
std::vector< std::string > selected_addons() const
std::vector< std::string > ids_
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
int get_retval() const
Returns the cached window exit code.
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.
bool get_value_bool() const
base class of top level items, the only item which needs to store the final canvases to draw on.
void keyboard_capture(widget *widget)
std::string id
Text to match against addon_info.tags()
#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.