[−][src]Struct druid::WindowConfig
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
impl RefUnwindSafe for WindowConfig
[src]
impl Send for WindowConfig
[src]
impl Sync for WindowConfig
[src]
impl Unpin for WindowConfig
[src]
impl UnwindSafe for WindowConfig
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,