pub struct MacProgressIndicator<'a> { /* private fields */ }Expand description
Authentic macOS AppKit progress indicator (NSProgressIndicator equivalent).
§Example
use egui_macview::{MacProgressControlSize, MacProgressIndicator, MacTheme};
let theme = MacTheme::default();
MacProgressIndicator::bar(0.75)
.theme(&theme)
.control_size(MacProgressControlSize::Regular)
.show_percentage(true)
.show(ui);Implementations§
Source§impl<'a> MacProgressIndicator<'a>
impl<'a> MacProgressIndicator<'a>
Sourcepub fn bar(progress: f32) -> Self
pub fn bar(progress: f32) -> Self
Creates a determinate horizontal progress bar with progress in 0.0..=1.0.
Sourcepub fn spinning(time: f64) -> Self
pub fn spinning(time: f64) -> Self
Creates a radial spinning fin indicator animated by time in seconds.
Sourcepub fn style(self, style: MacProgressStyle) -> Self
pub fn style(self, style: MacProgressStyle) -> Self
Sets the presentation style (Bar or Spinning).
Sourcepub fn control_size(self, size: MacProgressControlSize) -> Self
pub fn control_size(self, size: MacProgressControlSize) -> Self
Sets the AppKit control size (Regular, Small, or Mini).
Sourcepub fn indeterminate(self, time: f64) -> Self
pub fn indeterminate(self, time: f64) -> Self
Configures indeterminate mode driven by animation time in seconds.
Sourcepub fn label(self, label: &'a str) -> Self
pub fn label(self, label: &'a str) -> Self
Attaches an optional status label next to or below the indicator.
Sourcepub fn show_percentage(self, show: bool) -> Self
pub fn show_percentage(self, show: bool) -> Self
Enables or disables automatic percentage readout (0%..=100%) for determinate bars.
Sourcepub fn clamped_progress(&self) -> Option<f32>
pub fn clamped_progress(&self) -> Option<f32>
Returns the clamped determinate progress in 0.0..=1.0, if determinate.
Trait Implementations§
Source§impl<'a> Default for MacProgressIndicator<'a>
impl<'a> Default for MacProgressIndicator<'a>
Auto Trait Implementations§
impl<'a> Forget for MacProgressIndicator<'a>
impl<'a> Freeze for MacProgressIndicator<'a>
impl<'a> RefUnwindSafe for MacProgressIndicator<'a>
impl<'a> Send for MacProgressIndicator<'a>
impl<'a> Sync for MacProgressIndicator<'a>
impl<'a> Unpin for MacProgressIndicator<'a>
impl<'a> UnsafeUnpin for MacProgressIndicator<'a>
impl<'a> UnwindSafe for MacProgressIndicator<'a>
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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