32 listbox& list = find_widget<listbox>(&
window,
"addons_list",
false);
35 this->selections_.clear();
37 for(
const auto & entry : titles_map_)
39 const std::string&
id = entry.first;
40 const std::string& title = entry.second;
42 this->ids_.push_back(
id);
43 this->selections_[
id] =
false;
48 column[
"label"] = title;
49 data.emplace(
"name", column);
57 const listbox& list = find_widget<listbox>(&
window,
"addons_list",
false);
60 assert(rows == this->
ids_.size() && rows == this->titles_map_.size());
66 for(
unsigned k = 0; k < rows; ++k) {
69 = find_widget<const toggle_button>(
g,
"checkbox",
false);
76 std::vector<std::string> retv;
81 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()
REGISTER_DIALOG(tod_new_schedule)
std::map< std::string, widget_item > widget_data
std::map< std::string, t_string > widget_item
@ OK
Dialog was closed with the OK button.