WindowConfig

Struct WindowConfig 

Source
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: UInt

The style the window should have.

§initial_dimensions: NSRect

The initial dimensions for the window.

§defer: bool

When 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: NSWindowToolbarStyle

The style of the toolbar

Implementations§

Source§

impl WindowConfig

Source

pub fn set_styles(&mut self, styles: &[NSWindowStyleMask])

Given a set of styles, converts them to NSUInteger and sets them on the window config.

Source

pub fn set_initial_dimensions( &mut self, top: f64, left: f64, width: f64, height: f64, )

Set the initial dimensions of this window.

Source

pub fn set_toolbar_style(&mut self, style: NSWindowToolbarStyle)

Sets the toolbar style of this window.

Trait Implementations§

Source§

impl Debug for WindowConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WindowConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.