IconView and ListView are complete IApplication implementations, not Widgets placed inside another App.
IconView
IconView suits a small number of items with XBM icons. A concrete derived class supplies its configuration:
1 | class ToolMenu final : public IconView { |
IconItemList is etl::vector<IconItem, MAX_ICONVIEW_ITEMS>. title, bitmap, and userData are non-owning pointers and must not refer to short-lived local data. AppLauncher is a ready-made use of IconView.
ListView
ListView suits settings, Boolean switches, integer or floating-point values, and nested submenus. It is abstract; a derived class must implement onLoad() and onSave():
1 | class SettingsView final : public ListView { |
1 | bool soundEnabled = true; |
A ListItem may point to a submenu through nextList and nextListLength. PIXELUI_MAX_LISTVIEW_DEPTH limits the history stack. Every ListItem, submenu, title string, and object referenced through an extra pointer must outlive the ListView.
The current ListView array API is intentionally low level. Consult examples/ListViewDemo1.cpp in the main repository before using it. Length must be greater than zero; do not construct it with an empty array.
