pub struct StatusBar(/* private fields */);
Available on crate feature
gui
only.Expand description
Native status bar control, which has one or more parts.
Implementations§
source§impl StatusBar
impl StatusBar
sourcepub fn new(parent: &impl GuiParent, parts: &[SbPart]) -> Self
pub fn new(parent: &impl GuiParent, parts: &[SbPart]) -> Self
Instantiates a new StatusBar
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 StatusBar
in an event closure.
§Examples
use winsafe::{self as w, prelude::*, gui};
let wnd: gui::WindowMain; // initialized somewhere
let status_bar = gui::StatusBar::new(
&wnd,
&[
gui::SbPart::Fixed(200), // 200 pixels, never resizes
gui::SbPart::Proportional(1), // these two will fill the remaning space
gui::SbPart::Proportional(1),
],
);
sourcepub const fn parts(&self) -> StatusBarParts<'_>
pub const fn parts(&self) -> StatusBarParts<'_>
Exposes the part methods.
Trait Implementations§
source§impl GuiNativeControl for StatusBar
impl GuiNativeControl for StatusBar
source§fn on_subclass(&self) -> &WindowEvents
fn on_subclass(&self) -> &WindowEvents
Exposes the subclass events. If at least one event exists, the control
will be
subclassed. Read more
source§impl GuiNativeControlEvents<StatusBarEvents> for StatusBar
impl GuiNativeControlEvents<StatusBarEvents> for StatusBar
source§fn on(&self) -> &StatusBarEvents
fn on(&self) -> &StatusBarEvents
Exposes the specific control events. Read more
impl Send for StatusBar
Auto Trait Implementations§
impl Freeze for StatusBar
impl !RefUnwindSafe 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