pub struct ListSlice { /* private fields */ }Expand description
One frame’s slicing of a variable-height list, between the reading and
the rows: which rows to measure, and — once they are — where the window
lands and what to build. Made by RowHeights::slice; see list
for the loop that drives it, which every binding’s port repeats.
Implementations§
Source§impl ListSlice
impl ListSlice
Sourcepub fn unmeasured(&self, heights: &RowHeights) -> Vec<usize>
pub fn unmeasured(&self, heights: &RowHeights) -> Vec<usize>
The rows of the current range nothing has measured: measure each,
RowHeights::set it, then Self::reslice. Empty is done.
Sourcepub fn reslice(&mut self, heights: &mut RowHeights) -> bool
pub fn reslice(&mut self, heights: &mut RowHeights) -> bool
After measuring: puts the anchor row back where it was and slices again. Measuring moved the numbers the slice was taken from — this row’s own, the rows above it, and (through the mean) every row nobody has measured at all — so what is under the pointer would otherwise slide out from under it. True when the range moved and its new rows want measuring, within the pass budget.
Sourcepub fn finish(self, heights: &mut RowHeights) -> ListPlan
pub fn finish(self, heights: &mut RowHeights) -> ListPlan
The rows to build, the spacers, and the correction.