pub struct ProgressBar { /* private fields */ }Expand description
A horizontal determinate progress bar.
ui.add(ProgressBar::new(0.42));
ui.add(ProgressBar::new(0.8).accent(Accent::Green).text("Uploading…"));Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn new(fraction: f32) -> Self
pub fn new(fraction: f32) -> Self
Create a progress bar at fraction (0..=1). NaN and out-of-range
values are clamped.
Sourcepub fn desired_width(self, width: f32) -> Self
pub fn desired_width(self, width: f32) -> Self
Override the bar width. Defaults to ui.available_width().
Sourcepub fn color(self, color: Color32) -> Self
pub fn color(self, color: Color32) -> Self
Paint the fill with an explicit colour. Clears any previously set accent.
Trait Implementations§
Source§impl Clone for ProgressBar
impl Clone for ProgressBar
Source§fn clone(&self) -> ProgressBar
fn clone(&self) -> ProgressBar
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgressBar
impl Debug for ProgressBar
Auto Trait Implementations§
impl Freeze for ProgressBar
impl RefUnwindSafe for ProgressBar
impl Send for ProgressBar
impl Sync for ProgressBar
impl Unpin for ProgressBar
impl UnsafeUnpin for ProgressBar
impl UnwindSafe for ProgressBar
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