pub struct WindowConfig {
pub style: UInt,
pub initial_dimensions: NSRect,
pub defer: bool,
pub toolbar_style: NSWindowToolbarStyle,
}Expand description
A config for a window.
Fields§
§style: UIntThe style the window should have.
initial_dimensions: NSRectThe initial dimensions for the window.
defer: boolWhen true, the window server defers creating the window device until the window is moved onscreen. All display messages sent to the window or its views are postponed until the window is created, just before it’s moved onscreen.
toolbar_style: NSWindowToolbarStyleThe style of the toolbar
Implementations§
Source§impl WindowConfig
impl WindowConfig
Sourcepub fn set_styles(&mut self, styles: &[NSWindowStyleMask])
pub fn set_styles(&mut self, styles: &[NSWindowStyleMask])
Given a set of styles, converts them to NSUInteger and sets them on the
window config.
Sourcepub fn set_initial_dimensions(
&mut self,
top: f64,
left: f64,
width: f64,
height: f64,
)
pub fn set_initial_dimensions( &mut self, top: f64, left: f64, width: f64, height: f64, )
Set the initial dimensions of this window.
Sourcepub fn set_toolbar_style(&mut self, style: NSWindowToolbarStyle)
pub fn set_toolbar_style(&mut self, style: NSWindowToolbarStyle)
Sets the toolbar style of this window.
Trait Implementations§
Source§impl Debug for WindowConfig
impl Debug for WindowConfig
Auto Trait Implementations§
impl Freeze for WindowConfig
impl RefUnwindSafe for WindowConfig
impl Send for WindowConfig
impl Sync for WindowConfig
impl Unpin for WindowConfig
impl UnwindSafe for WindowConfig
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