Guide API
Skip to main content

update_steps

Function update_steps 

Source
pub fn update_steps<L: ListViewer + ?Sized>(this: &L, ctx: &mut Context<'_>)
Expand description

The list-viewer construction step formula — (re)publish each bar’s page/arrow step. Exposed as a Context-taking entry the consumer/test calls after insertion (the no-Context constructor cannot reach the bars — the same constraint the scroller hit).

  • vertical bar: single column → page step size.y - 1, arrow step 1; else page step size.y * num_cols, arrow step size.y.
  • horizontal bar: page step size.x / num_cols, arrow step 1.

This is the CONSTRUCTION formula, NOT the resize formula. The resize path (on_bounds_changed) uses a different step: a plain size.y page step for the vertical bar, and it preserves the live arrow step for both bars. A future resize consumer must use that formula directly — do NOT call update_steps for a resize.