Struct kiss_ui::progress::ProgressBar [] [src]

pub struct ProgressBar(_);

A widget that renders a bar which fills as its set value approaches a maximum.

For more info, see the IupProgressBar documentation. (Note: "marquee" is the same as "indefinite")

Methods

impl ProgressBar

fn new() -> ProgressBar

Create a new progress bar.

fn set_indefinite(self, is_indefinite: bool) -> Self

Set this progress bar as indefinite or not.

In the indefinite state, the progress bar will not show its true value; instead it will render a looping animation.

This may not have a visual effect on certain platforms.

fn set_dashed(self, dashed: bool) -> Self

Set if the progress bar should render solid (false) or dashed (true).

This may not have a visual effect on certain platforms.

fn set_max(self, max: f32) -> Self

Set the maximum value of this progress bar, i.e. the value at which it will show full.

Defaults to 1.0.

fn set_min(self, min: f32) -> Self

Set the minimum value of this progress bar, i.e. the value at which it will be empty.

Defaults to 0.0.

fn set_orientation(self, orientation: Orientation) -> Self

Set the orientation of this progress bar.

  • Vertical: The progress bar will render as a vertical bar, and fill from bottom to top.
  • Horizontal: The progress bar will render as a horizontal bar, and fill from left to right.

fn set_value(self, val: f32) -> Self

Set the current value of this progress bar. Its rendered infill will be updated to reflect the new value in relation to the minimum and maximum.

fn get_value(self) -> f32

Get the current value.

fn add_value(self, amt: f32) -> Self

Add amt to the current value and update it. amt may be negative.

Trait Implementations

impl Widget for ProgressBar

fn show(self) -> Self

fn hide(self) -> Self

fn set_visible(self, visible: bool) -> Self

fn set_enabled(self, enabled: bool) -> Self

fn set_position(self, x: i32, y: i32) -> Self

fn get_position(self) -> (i32, i32)

fn set_name(self, name: &str) -> Self

fn get_name(&self) -> Option<WidgetStr>

fn get_sibling(self) -> Option<BaseWidget>

fn get_parent(self) -> Option<BaseWidget>

fn get_dialog(self) -> Option<Dialog>

fn get_size_pixels(self) -> (u32, u32)

fn store<N: Into<String>>(self, name: N) -> Option<BaseWidget>

fn to_base(self) -> BaseWidget

impl Copy for ProgressBar

impl Clone for ProgressBar

fn clone(&self) -> Self

fn clone_from(&mut self, source: &Self)

impl Downcast for ProgressBar

fn can_downcast(base: &BaseWidget) -> bool

fn try_downcast(base: BaseWidget) -> Result<Self, BaseWidget>