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, whether it stands open into its item, and the step its tree indents by.
RowLift
A selection lift a list painted around one of its rows, as it painted it: the box, and what the row shows that the box stands around.
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_INDENT
One step of a tree’s nesting (VirtualList::with_tree): the disclosure gutter a row’s content stands in by from the depth above it, where the chevron that folds the row in front of it hangs. A list leads every row’s depth’s column by one step, so the top level stands the one step its chevron takes in from the list’s own leading edge.

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.
PaintedRowLifts
A list that paints its rows’ selection, asked for through capability: the lifts it painted last frame, in window space.
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.
RowContentBox
The box a row’s own content takes, in the space its rect answers in: a list that paints its rows’ selection paints it around this box, as a row that paints its own does, rather than across the space the row’s layout keeps around what it shows.
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.

Functions§

row_content_box
The box widget — or the first of its children — shows its content in: what a list asks a row’s view for before it paints the row’s selection.