pub struct CircularProgressView { /* private fields */ }Expand description
A circular progress indicator, classic or wavy. See the module docs.
Implementations§
Source§impl CircularProgressView
impl CircularProgressView
Sourcepub fn wavy(self) -> Self
pub fn wavy(self) -> Self
Switch to the wavy variant — the builder form of
circular_wavy_progress.
Sourcepub fn diameter(self, diameter: f64) -> Self
pub fn diameter(self, diameter: f64) -> Self
Outer diameter in logical px (M3EProgressIndicator.size), overriding
the 40dp classic / 48dp wavy default.
Sourcepub fn color(self, color: Color) -> Self
pub fn color(self, color: Color) -> Self
Active-arc colour (M3EProgressIndicator.color), overriding the
theme’s colors.primary.
Sourcepub fn track_color(self, color: Color) -> Self
pub fn track_color(self, color: Color) -> Self
Track-arc colour (M3EProgressIndicator.trackColor), overriding the
theme’s colors.secondary_container.
Sourcepub fn stroke_width(self, stroke: f64) -> Self
pub fn stroke_width(self, stroke: f64) -> Self
Active-arc stroke thickness in logical px
(M3EProgressIndicator.strokeWidth).
Sourcepub fn track_stroke_width(self, stroke: f64) -> Self
pub fn track_stroke_width(self, stroke: f64) -> Self
Track-arc stroke thickness in logical px
(M3EProgressIndicator.trackStrokeWidth).
Sourcepub fn gap_size(self, gap: f64) -> Self
pub fn gap_size(self, gap: f64) -> Self
Clear space between the active arc and the track, in logical px
(M3EProgressIndicator.gapSize). Applied twice — once at each end of
the active arc — so the ring reads as two separated arcs.
Sourcepub fn amplitude(self, amplitude: f64) -> Self
pub fn amplitude(self, amplitude: f64) -> Self
Fix the wave’s amplitude factor (0..=1,
M3EProgressIndicator.amplitude). Inert unless the indicator is wavy;
outranked by Self::amplitude_for_progress.
Sourcepub fn amplitude_for_progress<F: Fn(f64) -> f64 + 'static>(
self,
curve: F,
) -> Self
pub fn amplitude_for_progress<F: Fn(f64) -> f64 + 'static>( self, curve: F, ) -> Self
Drive the wave’s amplitude factor from the current progress
(M3EProgressIndicator.amplitudeForProgress) — see
LinearProgressView::amplitude_for_progress for the full contract.
Sourcepub fn wavelength(self, wavelength: f64) -> Self
pub fn wavelength(self, wavelength: f64) -> Self
Length of one full wave cycle along the ring, in logical px
(M3EProgressIndicator.wavelength, defaulting to 15). Rounded to a
whole number of cycles around the circumference so the wave closes on
itself. Inert unless the indicator is wavy.
Sourcepub fn wave_speed(self, wave_speed: f64) -> Self
pub fn wave_speed(self, wave_speed: f64) -> Self
How fast the wave travels, in logical px per second
(M3EProgressIndicator.waveSpeed, defaulting to the wavelength).
Inert unless the indicator is wavy.
Trait Implementations§
Source§impl<State: 'static> View<State> for CircularProgressView
impl<State: 'static> View<State> for CircularProgressView
Source§type Element = CircularProgressWidget
type Element = CircularProgressWidget
Source§fn build(&self, _ctx: &mut BuildCtx<'_>) -> CircularProgressWidget
fn build(&self, _ctx: &mut BuildCtx<'_>) -> CircularProgressWidget
Source§fn rebuild(
&self,
prev: &Self,
element: &mut CircularProgressWidget,
_ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, element: &mut CircularProgressWidget, _ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl !RefUnwindSafe for CircularProgressView
impl !Send for CircularProgressView
impl !Sync for CircularProgressView
impl !UnwindSafe for CircularProgressView
impl Freeze for CircularProgressView
impl Unpin for CircularProgressView
impl UnsafeUnpin for CircularProgressView
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Source§impl<State, V> ViewSeq<State, One> for Vwhere
State: 'static,
V: View<State>,
impl<State, V> ViewSeq<State, One> for Vwhere
State: 'static,
V: View<State>,
Source§fn extend_views(self, out: &mut Vec<AnyView<State>>)
fn extend_views(self, out: &mut Vec<AnyView<State>>)
out — erasing each
with AnyView::new (a no-op for an element already an AnyView).