[][src]Struct druid::WindowConfig

pub struct WindowConfig { /* fields omitted */ }

Window configuration that can be applied to a WindowBuilder, or to an existing WindowHandle. It does not include anything related to app data.

Implementations

impl WindowConfig[src]

pub fn window_size(self, size: impl Into<Size>) -> Self[src]

Set the window's initial drawing area size in display points.

You can pass in a tuple (width, height) or a Size, e.g. to create a window with a drawing area 1000dp wide and 500dp high:

window.window_size((1000.0, 500.0));

The actual window size in pixels will depend on the platform DPI settings.

This should be considered a request to the platform to set the size of the window. The platform might increase the size a tiny bit due to DPI.

pub fn with_min_size(self, size: impl Into<Size>) -> Self[src]

Set the window's minimum drawing area size in display points.

The actual minimum window size in pixels will depend on the platform DPI settings.

This should be considered a request to the platform to set the minimum size of the window. The platform might increase the size a tiny bit due to DPI.

To set the window's initial drawing area size use window_size.

pub fn resizable(self, resizable: bool) -> Self[src]

Set whether the window should be resizable.

pub fn show_titlebar(self, show_titlebar: bool) -> Self[src]

Set whether the window should have a titlebar and decorations.

pub fn set_position(self, position: Point) -> Self[src]

Sets the window position in virtual screen coordinates. position Position in pixels.

pub fn set_level(self, level: WindowLevel) -> Self[src]

Sets the WindowLevel of the window

pub fn set_window_state(self, state: WindowState) -> Self[src]

Sets the WindowState of the window.

pub fn apply_to_builder(&self, builder: &mut WindowBuilder)[src]

Apply this window configuration to the passed in WindowBuilder

pub fn apply_to_handle(&self, win_handle: &mut WindowHandle)[src]

Apply this window configuration to the passed in WindowHandle

Trait Implementations

impl Default for WindowConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.