pub enum ListPatch {
Reload,
Splice(Vec<RowDelta>),
RowSizeInvalidated {
cell: usize,
height: f64,
},
ScrollToEnd,
ScrollToRow(usize),
Selected(Vec<usize>),
Editing(bool),
}Variants§
Reload
The row set changed (count/order/content): the host re-queries its ListSource.
Splice(Vec<RowDelta>)
The row set changed by exactly these deltas: a host that can, animates each row
in, out, or across; one that cannot treats this as ListPatch::Reload. The
data source answers with the final state throughout.
RowSizeInvalidated
An Automatic-height row was re-laid at a new height after its first layout (its
text changed, a wrapped line appeared, the backend corrected its width): the host
gives the row bound to physical cell cell (the handle ListSource::bind_row got,
as usize) the new height, padding included, the same value
ListSource::cell_height now answers for it.
Sent from inside a day-core layout pass, with the tree borrowed: a host applies it
after the pass (posted to its main loop), never by asking the source anything
synchronously, which would read a 0.0 height (docs/list.md “Row heights”).
ScrollToEnd
Imperatively scroll the native list so its last row is fully visible (a chat timeline sticking to the newest message). No-op when the list is empty (docs/list.md).
ScrollToRow(usize)
Imperatively scroll the native list so this row is visible, realizing it if needed (docs/list.md). Clamped to the row count; no-op when the list is empty.
Selected(Vec<usize>)
Programmatic selection sync (row indices; empty = clear): toolkits apply without re-emitting a selection event, like every other programmatic sync.
Editing(bool)
Enter (true) or leave (false) the platform’s list editing mode, animated
(docs/list.md, ListProps::editing). Ignored where Cap::ListEditing is
Unsupported.