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.