Skip to main content

Module stepper

Module stepper 

Source
Expand description

Stepper / wizard widget.

A horizontal numbered-step progress indicator with connector lines and an accent/muted restyle on step change (segmented-style + progressbar-style filled connector); see stepper.rs. Stepper / wizard widget — a horizontal multi-step progress indicator: a row of numbered step circles with labels, joined by connector lines. Completed and current steps are highlighted in the accent colour; upcoming steps (and the connectors that lead to them) are muted.

This is a blend of crate::widgets::segmented::Segmented (a horizontal row of clickable items whose clicked index is derived from sibling position and whose active item is live-restyled via set_css_property) and the filled-track look of crate::widgets::progressbar::ProgressBar (the accent connector).

Steps are CLICKABLE (free navigation, like a segmented control): clicking step i sets current_step = i, invokes the optional on_step_change(state), and live-restyles every circle / connector / label to reflect the new position — no DOM rebuild. (A non-clickable, display-only stepper is also a valid design; this widget chooses clickable to exercise the segmented restyle pattern, and set_current_step still drives it from app code on rebuild.)

A circle is “reached” (accent) iff its index <= current_step; the connector gap between circle i and i+1 is accent iff i < current_step. Clicking the already-current step is a no-op (no callback).

Key types: [Stepper], [StepperState], [StepperOnStepChange].

Structs§

Stepper
A horizontal numbered-step progress indicator with a step-change callback.
StepperOnStepChange
StepperOnStepChangeCallback
StepperState
State of a Stepper: the zero-based current step and the total step count.
StepperStateWrapper

Enums§

OptionStepperOnStepChange

Statics§

STEPPER_ON_STEP_CHANGE_INVOKER
Process-global slot for this callback kind’s host-side invoker.

Functions§

AzApp_setStepperOnStepChangeCallbackInvoker
Register the host-side invoker for this callback kind.
AzStepperOnStepChangeCallback_createFromHostHandle
C-ABI export wrapping <Wrapper>::create_from_host_handle.

Type Aliases§

AzStepperOnStepChangeCallbackInvoker
Pointer-arg variant of this callback kind’s typedef.
StepperOnStepChangeCallbackType
Callback function type invoked when the current step changes.