pub struct StatusBar {
pub handle: ControlHandle,
/* private fields */
}
Expand description
A status bar is a horizontal window at the bottom of a parent window in which an application can display various kinds of status information. Status bar cannot stack, so there must be only one per window.
Requires the status-bar
feature.
Builder parameters:
parent
: Required. The status bar parent container.text
: The status bar text.font
: The font used for the status bar text
Control events:
MousePress(_)
: Generic mouse press events on the status barOnMouseMove
: Generic mouse mouse eventOnMouseWheel
: Generic mouse wheel event
use native_windows_gui as nwg;
fn build_status(status: &mut nwg::StatusBar, window: &nwg::Window, font: &nwg::Font) {
nwg::StatusBar::builder()
.text("Hello")
.font(Some(font))
.parent(window)
.build(status);
}
Fields§
§handle: ControlHandle
Implementations§
Source§impl StatusBar
impl StatusBar
pub fn builder<'a>() -> StatusBarBuilder<'a>
Sourcepub fn set_min_height(&self, height: u32)
pub fn set_min_height(&self, height: u32)
Set the minimum height of the statusbar (in pixels)
Sourcepub fn text<'a>(&self, index: u8) -> String
pub fn text<'a>(&self, index: u8) -> String
Return the text in one of the region of the status bar
Sourcepub fn set_text<'a>(&self, index: u8, text: &'a str)
pub fn set_text<'a>(&self, index: u8, text: &'a str)
Set the text in one of the region of the status bar
Sourcepub fn class_name(&self) -> &'static str
pub fn class_name(&self) -> &'static str
Winapi class name used during control creation
Sourcepub fn forced_flags(&self) -> u32
pub fn forced_flags(&self) -> u32
Winapi flags required by the control
Sourcepub fn hook_parent_resize(&self)
pub fn hook_parent_resize(&self)
Status bar do not resize automatically. Instead, a resize message must be manually sent by the parent window to trigger the resize action.
Trait Implementations§
Source§impl From<&StatusBar> for ControlHandle
impl From<&StatusBar> for ControlHandle
Source§impl From<&mut StatusBar> for ControlHandle
impl From<&mut StatusBar> for ControlHandle
Source§impl PartialEq<ControlHandle> for StatusBar
impl PartialEq<ControlHandle> for StatusBar
Source§impl PartialEq<StatusBar> for ControlHandle
impl PartialEq<StatusBar> for ControlHandle
Auto Trait Implementations§
impl !Freeze for StatusBar
impl !RefUnwindSafe for StatusBar
impl !Send for StatusBar
impl !Sync for StatusBar
impl Unpin for StatusBar
impl UnwindSafe for StatusBar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more