Struct native_windows_gui::StatusBar
source · [−]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
sourceimpl 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
sourceimpl From<&StatusBar> for ControlHandle
impl From<&StatusBar> for ControlHandle
sourceimpl From<&mut StatusBar> for ControlHandle
impl From<&mut StatusBar> for ControlHandle
sourceimpl PartialEq<ControlHandle> for StatusBar
impl PartialEq<ControlHandle> for StatusBar
sourcefn eq(&self, other: &ControlHandle) -> bool
fn eq(&self, other: &ControlHandle) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<StatusBar> for ControlHandle
impl PartialEq<StatusBar> for ControlHandle
Auto Trait Implementations
impl !RefUnwindSafe for StatusBar
impl !Send for StatusBar
impl !Sync for StatusBar
impl Unpin for StatusBar
impl UnwindSafe for StatusBar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more