Struct native_windows_gui::ProgressBar [−][src]
pub struct ProgressBar { pub handle: ControlHandle, }
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
impl ProgressBar
[src]
pub fn builder() -> ProgressBarBuilder
[src]
pub fn state(&self) -> ProgressBarState
[src]
Return the current state of the progress bar
pub fn set_state(&self, state: ProgressBarState)
[src]
Set the state of the progress bar
pub fn advance(&self)
[src]
Increase the bar value by the step value
pub fn advance_delta(&self, v: u32)
[src]
Increase the bar value by a value
pub fn step(&self) -> u32
[src]
Return the step of the progress bar.
pub fn set_step(&self, s: u32)
[src]
Set the step of the progress bar.
pub fn pos(&self) -> u32
[src]
Return the position of the progress bar.
pub fn set_pos(&self, p: u32)
[src]
Set the position of the progress bar. If the value is outside of range sets the value to the nearest bound.
pub fn range(&self) -> Range<u32>
[src]
Get the range of the progress bar
pub fn set_range(&self, range: Range<u32>)
[src]
Set the range of the progress bar
pub fn set_marquee(&self, enable: bool, update_interval: u32)
[src]
Set the progress bar marquee mode
pub fn add_flags(&self, styles: ProgressBarFlags)
[src]
Updates the flags of the progress bar.
pub fn remove_flags(&self, styles: ProgressBarFlags)
[src]
Removes flags from the progress bar.
pub fn focus(&self) -> bool
[src]
Return true if the control currently has the keyboard focus
pub fn set_focus(&self)
[src]
Set the keyboard focus on the button.
pub fn enabled(&self) -> bool
[src]
Return true if the control user can interact with the control, return false otherwise
pub fn set_enabled(&self, v: bool)
[src]
Enable or disable the control
pub fn visible(&self) -> bool
[src]
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))
pub fn set_visible(&self, v: bool)
[src]
Show or hide the control to the user
pub fn size(&self) -> (u32, u32)
[src]
Return the size of the button in the parent window
pub fn set_size(&self, x: u32, y: u32)
[src]
Set the size of the button in the parent window
pub fn position(&self) -> (i32, i32)
[src]
Return the position of the button in the parent window
pub fn set_position(&self, x: i32, y: i32)
[src]
Set the position of the button in the parent window
pub fn class_name(&self) -> &'static str
[src]
Winapi class name used during control creation
pub fn flags(&self) -> u32
[src]
Winapi base flags used during window creation
pub fn forced_flags(&self) -> u32
[src]
Winapi flags required by the control
Trait Implementations
impl Default for ProgressBar
[src]
fn default() -> ProgressBar
[src]
impl Drop for ProgressBar
[src]
impl Eq for ProgressBar
[src]
impl From<&'_ ProgressBar> for ControlHandle
[src]
fn from(control: &ProgressBar) -> Self
[src]
impl From<&'_ mut ProgressBar> for ControlHandle
[src]
fn from(control: &mut ProgressBar) -> Self
[src]
impl PartialEq<ControlHandle> for ProgressBar
[src]
fn eq(&self, other: &ControlHandle) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<ProgressBar> for ProgressBar
[src]
fn eq(&self, other: &ProgressBar) -> bool
[src]
fn ne(&self, other: &ProgressBar) -> bool
[src]
impl PartialEq<ProgressBar> for ControlHandle
[src]
fn eq(&self, other: &ProgressBar) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ProgressBar
[src]
impl StructuralPartialEq for ProgressBar
[src]
Auto Trait Implementations
impl RefUnwindSafe for ProgressBar
impl !Send for ProgressBar
impl !Sync for ProgressBar
impl Unpin for ProgressBar
impl UnwindSafe for ProgressBar
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,