AListView#
Displays a list model of strings.

| Header: | #include <AUI/View/AListView.h> |
| CMake: | aui_link(my_target PUBLIC aui::views) |
Examples#
examples/ui/views/src/ExampleWindow.cpp
Views Example — All-in-one views building example.
Horizontal {
_new<AButton>("Add").connect(&AButton::clicked, AUI_SLOT(model)::addItem),
_new<AButton>("Remove").connect(&AButton::clicked, AUI_SLOT(model)::removeItem),
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
_new<AListView>(model) AUI_OVERRIDE_STYLE {
MinSize { 60_dp, 60_dp },
}
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } };
}(),
/// [list_view]
Public Types#
SelectAction#
enum class AListView::SelectAction
Selection action for updateSelectionOnItem.
| Constant | Description |
|---|---|
SelectAction::CLEAR_SELECTION_AND_SET
|
Clears old selection and selects the specified index. Used by selectItem. |
SelectAction::SET
|
Selects the specified index. In single selection mode, acts like CLEAR_SELECTION_AND_SET. |
SelectAction::UNSET
|
Deselects the specified index. |
SelectAction::TOGGLE
|
Selects or deselects the specified index depending on it's current state. |
Public Methods#
selectItem#
Acts on the item at index i as if the user were left-clicked without keyboard modifiers on it.