pub struct ProgressBar { /* private fields */ }Expand description
Progress bar widget.
Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn with_value(value: f32) -> Self
pub fn with_value(value: f32) -> Self
Create a progress bar with the given value.
Sourcepub const fn mode(self, mode: ProgressMode) -> Self
pub const fn mode(self, mode: ProgressMode) -> Self
Set the progress mode.
Sourcepub const fn indeterminate(self) -> Self
pub const fn indeterminate(self) -> Self
Set indeterminate mode.
Sourcepub fn corner_radius(self, radius: f32) -> Self
pub fn corner_radius(self, radius: f32) -> Self
Set the corner radius.
Sourcepub const fn track_color(self, color: Color) -> Self
pub const fn track_color(self, color: Color) -> Self
Set the track color (background).
Sourcepub const fn fill_color(self, color: Color) -> Self
pub const fn fill_color(self, color: Color) -> Self
Set the fill color (progress).
Sourcepub const fn with_label(self) -> Self
pub const fn with_label(self) -> Self
Show percentage label.
Sourcepub const fn show_label(self, show: bool) -> Self
pub const fn show_label(self, show: bool) -> Self
Set whether to show the label.
Sourcepub const fn label_color(self, color: Color) -> Self
pub const fn label_color(self, color: Color) -> Self
Set the label color.
Sourcepub fn accessible_name(self, name: impl Into<String>) -> Self
pub fn accessible_name(self, name: impl Into<String>) -> Self
Set the accessible name.
Sourcepub const fn get_mode(&self) -> ProgressMode
pub const fn get_mode(&self) -> ProgressMode
Get the current mode.
Sourcepub fn percentage(&self) -> u8
pub fn percentage(&self) -> u8
Get the percentage (0-100).
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if progress is complete.
Sourcepub fn is_indeterminate(&self) -> bool
pub fn is_indeterminate(&self) -> bool
Check if indeterminate.
Sourcepub const fn get_track_color(&self) -> Color
pub const fn get_track_color(&self) -> Color
Get the track color.
Sourcepub const fn get_fill_color(&self) -> Color
pub const fn get_fill_color(&self) -> Color
Get the fill color.
Sourcepub const fn get_label_color(&self) -> Color
pub const fn get_label_color(&self) -> Color
Get the label color.
Sourcepub const fn is_label_shown(&self) -> bool
pub const fn is_label_shown(&self) -> bool
Get whether label is shown.
Sourcepub const fn get_min_width(&self) -> f32
pub const fn get_min_width(&self) -> f32
Get the minimum width.
Sourcepub const fn get_height(&self) -> f32
pub const fn get_height(&self) -> f32
Get the height.
Sourcepub const fn get_corner_radius(&self) -> f32
pub const fn get_corner_radius(&self) -> f32
Get the corner radius.
Trait Implementations§
Source§impl Brick for ProgressBar
impl Brick for ProgressBar
Source§fn brick_name(&self) -> &'static str
fn brick_name(&self) -> &'static str
Get the brick’s unique type name
Source§fn assertions(&self) -> &[BrickAssertion]
fn assertions(&self) -> &[BrickAssertion]
Get all assertions for this brick
Source§fn budget(&self) -> BrickBudget
fn budget(&self) -> BrickBudget
Get the performance budget
Source§fn verify(&self) -> BrickVerification
fn verify(&self) -> BrickVerification
Verify all assertions against current state Read more
Source§fn can_render(&self) -> bool
fn can_render(&self) -> bool
Check if this brick can be rendered (all assertions pass)
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
Source§impl Default for ProgressBar
impl Default for ProgressBar
Source§impl<'de> Deserialize<'de> for ProgressBar
impl<'de> Deserialize<'de> for ProgressBar
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ProgressBar
impl Serialize for ProgressBar
Source§impl Widget for ProgressBar
impl Widget for ProgressBar
Source§fn measure(&self, constraints: Constraints) -> Size
fn measure(&self, constraints: Constraints) -> Size
Compute intrinsic size constraints.
Source§fn layout(&mut self, bounds: Rect) -> LayoutResult
fn layout(&mut self, bounds: Rect) -> LayoutResult
Position children within allocated bounds.
Source§fn children_mut(&mut self) -> &mut [Box<dyn Widget>]
fn children_mut(&mut self) -> &mut [Box<dyn Widget>]
Get mutable child widgets.
Source§fn is_interactive(&self) -> bool
fn is_interactive(&self) -> bool
Check if this widget is interactive (can receive focus/events).
Source§fn is_focusable(&self) -> bool
fn is_focusable(&self) -> bool
Check if this widget can receive keyboard focus.
Source§fn accessible_name(&self) -> Option<&str>
fn accessible_name(&self) -> Option<&str>
Get the accessible name for screen readers.
Source§fn accessible_role(&self) -> AccessibleRole
fn accessible_role(&self) -> AccessibleRole
Get the accessible role.
Auto Trait Implementations§
impl Freeze for ProgressBar
impl RefUnwindSafe for ProgressBar
impl Send for ProgressBar
impl Sync for ProgressBar
impl Unpin 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
Source§impl<T> BrickWidgetExt for Twhere
T: Brick,
impl<T> BrickWidgetExt for Twhere
T: Brick,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().