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 when advance 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. Unlike flags, ex_flags must be used straight from winapi
  • marquee: 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 bar
  • OnMouseMove: Generic mouse mouse event
  • OnMouseWheel: 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 the step value

Increase the bar value by a value

Return the step of the progress bar.

Set the step of the progress bar.

Return the position of the progress bar.

Set the position of the progress bar. If the value is outside of range sets the value to the nearest bound.

Get the range of the progress bar

Set the range of the progress bar

Set the progress bar marquee mode

Updates the flags of the progress bar.

Removes flags from the progress bar.

Return true if the control currently has the keyboard focus

Set the keyboard focus on the button.

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

Return the size of the button in the parent window

Set the size of the button in the parent window

Return the position of the button in the parent window

Set the position of the button in the parent window

Winapi class name used during control creation

Winapi base flags used during window creation

Winapi flags required by the control

Trait Implementations

Returns the “default value” for a type. Read more

Executes the destructor for this 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 !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.