pub struct ProgressBar(/* private fields */);gui only.Expand description
Native progress bar control.
Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn on_subclass(&self) -> &impl GuiEventsWindow
pub fn on_subclass(&self) -> &impl GuiEventsWindow
Exposes the subclass events. If at least one event exists, the control will be subclassed.
Note: Subclassing may impact performance, use with care.
§Panics
Panics if the control or the parent window are already created. Events must be set before control and parent window creation.
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn new(parent: &(impl GuiParent + 'static), opts: ProgressBarOpts) -> Self
pub fn new(parent: &(impl GuiParent + 'static), opts: ProgressBarOpts) -> Self
Instantiates a new ProgressBar object, to be created on the parent
window with HWND::CreateWindowEx.
§Panics
Panics if the parent window was already created – that is, you cannot
dynamically create a ProgressBar in an event closure.
Sourcepub fn new_dlg(
parent: &(impl GuiParent + 'static),
ctrl_id: u16,
resize_behavior: (Horz, Vert),
) -> Self
pub fn new_dlg( parent: &(impl GuiParent + 'static), ctrl_id: u16, resize_behavior: (Horz, Vert), ) -> Self
Instantiates a new ProgressBar object, to be loaded from a dialog
resource with HWND::GetDlgItem.
§Panics
Panics if the parent dialog was already created – that is, you cannot
dynamically create a ProgressBar in an event closure.
Sourcepub fn position(&self) -> u32
pub fn position(&self) -> u32
Retrieves the current position by sending a
pbm::GetPos message.
Sourcepub fn range(&self) -> (u32, u32)
pub fn range(&self) -> (u32, u32)
Retrieves the current minimum and maximum values by sending a
pbm::GetRange message. Default values are
0 and 100.
Sourcepub fn set_marquee(&self, marquee: bool)
pub fn set_marquee(&self, marquee: bool)
Sets or unsets the marquee mode by sending a
pbm::SetMarquee message combined with a
SetWindowLongPtr call for a style
change.
Sourcepub fn set_position(&self, position: u32) -> u32
pub fn set_position(&self, position: u32) -> u32
Sets the current position by sending a
pbm::SetPos message, returning the previous
position.
Sourcepub fn set_range(&self, min: u32, max: u32)
pub fn set_range(&self, min: u32, max: u32)
Sets the minimum and maximum values by sending a
pbm::SetRange32 message. Default values
are 0 and 100.
Sourcepub fn set_state(&self, state: PBST) -> PBST
pub fn set_state(&self, state: PBST) -> PBST
Sets the current state by sending a
pbm::SetState message, retuning the
previous state.
Sourcepub fn state(&self) -> PBST
pub fn state(&self) -> PBST
Retrieves the current state by sending a
pbm::GetState message.