pub struct Steps<Msg> { /* private fields */ }Expand description
Where a sequence of steps stands: finished steps carry a check in the success colour, the current step is bold with an accent marker, and upcoming steps are faint. Steps are set apart by space and tone; nothing connects them.
Steps sit in a row by default. When the row does not fit, only the markers stay, followed by
the current step’s label. Steps::vertical puts one step on each line.
With Steps::on_select finished steps can be chosen to go back to them: by click, or by
focusing the steps, moving with the arrow keys and pressing Enter or Space. The application
owns the current step.
Style keys: step (bg, pillar) with hover and focus for choosable steps; step-marker and
step-label (fg, bold) with checked for finished steps and active for the current
one, and variants running and failed for the current step. Icons: check, dot,
dot-outline, error.
Implementations§
Source§impl<Msg: 'static> Steps<Msg>
impl<Msg: 'static> Steps<Msg>
Sourcepub fn new(labels: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn new(labels: impl IntoIterator<Item = impl Into<String>>) -> Self
Steps named labels, the first one current.
Sourcepub fn current(self, index: usize) -> Self
pub fn current(self, index: usize) -> Self
The current step. Steps before it are finished; a value past the last step shows every step finished.
Sourcepub fn running(self, running: bool) -> Self
pub fn running(self, running: bool) -> Self
The current step is being worked on: its marker breathes.
Trait Implementations§
Source§impl<Msg: 'static> Widget<Msg> for Steps<Msg>
impl<Msg: 'static> Widget<Msg> for Steps<Msg>
Source§fn measure(&self, cx: &mut MeasureCx<'_>, available: Size) -> Size
fn measure(&self, cx: &mut MeasureCx<'_>, available: Size) -> Size
available.Source§fn event(&self, cx: &mut EventCx<'_, Msg>, event: &Event) -> bool
fn event(&self, cx: &mut EventCx<'_, Msg>, event: &Event) -> bool
true when the event was used; unused key and scroll events
bubble to the parent widget.Source§fn paint_overlay(&self, _cx: &mut PaintCx<'_>, _anchor: Rect)
fn paint_overlay(&self, _cx: &mut PaintCx<'_>, _anchor: Rect)
PaintCx::request_overlay. anchor is the area the widget was painted in.Source§fn children_mut(&mut self) -> &mut [Node<Msg>]
fn children_mut(&mut self) -> &mut [Node<Msg>]
Auto Trait Implementations§
impl<Msg> !RefUnwindSafe for Steps<Msg>
impl<Msg> !Send for Steps<Msg>
impl<Msg> !Sync for Steps<Msg>
impl<Msg> !UnwindSafe for Steps<Msg>
impl<Msg> Freeze for Steps<Msg>
impl<Msg> Unpin for Steps<Msg>
impl<Msg> UnsafeUnpin for Steps<Msg>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more