Struct native_windows_gui::ProgressBar [−][src]
pub struct ProgressBar { pub handle: ControlHandle, }
Expand description
A progress bar is a window that an application can use to indicate the progress of a lengthy operation.
Requires the progress-bar
feature.
Builder parameters:
parent
: Required. The progress bar parent container.size
: The progress bar size.position
: The progress bar position.state
: The initial state of the progress bar.step
: The value in which the progress bar value increase whenadvance
is used.pos
: The initial value of the progress bar.range
: The minimum and maximum value in the progress bar.enabled
: If the progress bar is enabled.flags
: A combination of the ProgressBarFlags values.ex_flags
: A combination of win32 window extended flags. Unlikeflags
, ex_flags must be used straight from winapimarquee
: Enable of disable the marquee animation (only used with the MARQUEE flags)marquee_update
: The update interval of the marquee mode
Control events:
MousePress(_)
: Generic mouse press events on the progress barOnMouseMove
: Generic mouse mouse eventOnMouseWheel
: Generic mouse wheel event
use native_windows_gui as nwg; fn build_progress_bar(bar: &mut nwg::ProgressBar, window: &nwg::Window) { nwg::ProgressBar::builder() .state(nwg::ProgressBarState::Paused) .step(10) .range(0..100) .parent(window) .build(bar); }
Fields
handle: ControlHandle
Implementations
Return the current state of the progress bar
Set the state of the progress bar
Increase the bar value by a value
Set the position of the progress bar. If the value is outside of range sets the value to the nearest bound.
Set the progress bar marquee mode
Updates the flags of the progress bar.
Removes flags from the progress bar.
Return true if the control user can interact with the control, return false otherwise
Enable or disable the control
Return true if the control is visible to the user. Will return true even if the control is outside of the parent client view (ex: at the position (10000, 10000))
Show or hide the control to the user
Set the position of the button in the parent window
Winapi class name used during control creation
Winapi flags required by the control
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ProgressBar
impl !Send for ProgressBar
impl !Sync for ProgressBar
impl Unpin for ProgressBar
impl UnwindSafe for ProgressBar