Struct imgui::ProgressBar[][src]

#[must_use]pub struct ProgressBar<'a> { /* fields omitted */ }

Builder for a progress bar widget.

Examples

ProgressBar::new(0.6)
    .size([100.0, 12.0])
    .overlay_text(im_str!("Progress!"))
    .build(&ui);

Implementations

impl<'a> ProgressBar<'a>[src]

pub const fn new(fraction: f32) -> ProgressBar<'a>[src]

Creates a progress bar with a given fraction showing the progress (0.0 = 0%, 1.0 = 100%).

The progress bar will be automatically sized to fill the entire width of the window if no custom size is specified.

pub const fn overlay_text(
    mut self: Self,
    overlay_text: &'a ImStr
) -> ProgressBar<'_>
[src]

Sets an optional text that will be drawn over the progress bar.

pub const fn size(mut self: Self, size: [f32; 2]) -> Self[src]

Sets the size of the progress bar.

Negative values will automatically align to the end of the axis, zero will let the progress bar choose a size, and positive values will use the given size.

pub fn build(self, _: &Ui<'_>)[src]

Builds the progress bar

Trait Implementations

impl<'a> Clone for ProgressBar<'a>[src]

impl<'a> Copy for ProgressBar<'a>[src]

impl<'a> Debug for ProgressBar<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ProgressBar<'a>[src]

impl<'a> Send for ProgressBar<'a>[src]

impl<'a> Sync for ProgressBar<'a>[src]

impl<'a> Unpin for ProgressBar<'a>[src]

impl<'a> UnwindSafe for ProgressBar<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.