#if defined(Hiro_ListView) struct ListView; struct ListViewItem; struct mListView; struct mListViewItem; using sListView = shared_pointer; using sListViewItem = shared_pointer; struct mListView : mTableView { using type = mListView; using mTableView::append; using mTableView::remove; mListView(); auto batched() const -> vector; auto doActivate() const -> void; auto doChange() const -> void; auto doToggle(ListViewItem) const -> void; auto item(uint position) const -> ListViewItem; auto items() const -> vector; auto onActivate(const function& callback) -> type&; auto onChange(const function& callback) -> type&; auto onToggle(const function& callback) -> type&; auto reset() -> type& override; auto selected() const -> ListViewItem; //private: struct State { function onActivate; function onChange; function onToggle; } state; }; struct mListViewItem : mTableViewItem { using type = mListViewItem; using mTableViewItem::append; using mTableViewItem::remove; mListViewItem(); auto checkable() const -> bool; auto checked() const -> bool; auto icon() const -> image; auto reset() -> type&; auto setCheckable(bool checkable) -> type&; auto setChecked(bool checked) -> type&; auto setIcon(const image& icon = {}) -> type&; auto setText(const string& text) -> type&; auto text() const -> string; }; #endif