31 listbox& list = find_widget<listbox>(
"addons_list");
32 keyboard_capture(&list);
35 for(
const auto& [
id, title] : titles_map_) {
37 selections_[
id] =
false;
45 const listbox& list = find_widget<listbox>(
"addons_list");
54 for(
unsigned k = 0; k < rows; ++k) {
64 std::vector<std::string> retv;
69 retv.push_back(entry.first);
virtual void post_show() override
Actions to be taken after the window has been shown.
std::map< std::string, bool > selections_
std::vector< std::string > selected_addons() const
std::vector< std::string > ids_
std::map< std::string, std::string > titles_map_
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
std::string id
Text to match against addon_info.tags()
REGISTER_DIALOG(editor_edit_unit)
std::map< std::string, widget_item > widget_data
@ OK
Dialog was closed with the OK button.