Skip to main content

Module virtual_list

Module virtual_list 

Expand description

Sparse, variable-height list with retained row delegates.

The model exposes stable keys and random access without requiring all rows to be resident. Only the viewport window owns widget instances; those instances survive reorder while their key remains visible.

Structs§

DescribedList
The list a described VirtualList is: over its items, under the one context menu its rows share.
DescribedRows
The items of a described list: read from a host that renders them as they are shown, or given whole.
DuplicateListKey
ListItemProps
One item of a virtual list: the resource its row shows, the row, and what the row offers on the item.
RowBuild
What a list tells its row delegate about the row it builds, besides the model and the row’s place in it: the row’s selection, and whether it stands open into its item.
RowSelection
A row’s selection with its neighbours’, for a delegate that paints its own selection: a run of selected rows is one lift (crate::chrome::RowJoin), with no rule between rows.
TreeMarks
What a tree list works out of its rows, for the rows it builds: how deep each stands, which of them are folded away, which have subtasks, and which stand under the row they follow. The list fills it as it mounts rows; a row’s builder reads it, and the person’s folding stays with the list, so a row folded away stays folded while its neighbours come and go.
TreeRow
What a row is in a tree of rows: the row of the item it is a subtask of, when that item is one of the list’s rows.
VecListModel
Convenient fully-resident model. Database and paged sources generally implement ListModel directly instead.
VirtualList
VirtualListProps
A long list of rows that costs only the rows on screen: each is built when it scrolls into view. Selection follows the person’s choice and is reported with the item it shows; the list is one focus stop.

Enums§

ItemRow
The row of a ListItemProps.
ListModelChange
One already-applied change to a ListModel. Structural variants retain mounted delegates by stable key; Self::RowsChanged rebuilds only the named rows.
RowGroup
The row’s place in a group of the list (super::ListModel::group_at): the heading the run of rows stands under, and the tail of items done with.
TreeMove
One step a row moves through a tree: its order among the rows it stands beside, and how deep it stands.

Constants§

TREE_DISCLOSURE
The room a tree row’s disclosure marker takes at its leading edge.
TREE_INDENT
One step of a tree’s nesting (VirtualList::with_tree): the disclosure gutter a row’s content stands in by, from the leading edge of its own depth, where the chevron that folds what stands under it hangs.

Traits§

ListEdges
The space a list leaves above its first row and below its last (VirtualList::with_edges), part of what it scrolls: a page’s top and bottom spacing around rows that are a page’s content, one by one.
ListModel
Random-access collection contract for VirtualList. Keys must be unique and stable while an item represents the same logical entity.
RowActionRects
A row widget says where its own hover actions stand, so the list reports the place to press one without knowing what the host built its row of (VirtualList::row_action_rect). A row without actions provides none; ListRow provides its own.
RowRenameField
A row that says where its title stands, for the field renaming it in place to stand over it, in the role the title reads in: asked for through capability.
RowSelectionSink
A row that paints the selection the list holds for it, asked for through capability_mut: a view wraps the row it places in its swipe and its hover toolbar, and the list reaches the row through them.