31 listbox& list = find_widget<listbox>(
"addons_list");
32 keyboard_capture(&list);
35 for(
const auto & entry : titles_map_)
37 const std::string&
id = entry.first;
38 const std::string& title = entry.second;
41 selections_[
id] =
false;
46 column[
"label"] = title;
47 data.emplace(
"name", column);
55 const listbox& list = find_widget<listbox>(
"addons_list");
64 for(
unsigned k = 0; k < rows; ++k) {
74 std::vector<std::string> retv;
79 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_
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
std::string id
Text to match against addon_info.tags()
REGISTER_DIALOG(editor_edit_unit)
std::map< std::string, widget_item > widget_data
std::map< std::string, t_string > widget_item
@ OK
Dialog was closed with the OK button.