31 #include "../View/view.h"
32 #include "scroll_view.h"
36 class ListBoxBaseViewImpl;
44 void set_items(
const std::vector<std::shared_ptr<View>> &items);
49 std::vector<std::shared_ptr<View>> views;
50 views.reserve(items.size());
51 for (
const auto &item : items)
53 views.push_back(map_function(item));
64 std::unique_ptr<ListBoxBaseViewImpl> impl;
void set_selected_item(int index)
Definition: listbox_view.h:38
int selected_item() const
Signal< void()> & sig_selection_changed()
void set_items(const std::vector< std::shared_ptr< View >> &items)
Definition: Application/application.h:35
void set_items(const std::vector< T > &items, const std::function< std::shared_ptr< View >(const T &item)> &map_function)
Definition: listbox_view.h:47