pub enum WindowPlacement {
Floating,
Maximized,
Fullscreen,
Minimized,
}Expand description
Top-level placement state for a window.
Transitions between any two variants are legal — the platform layer
is responsible for preserving the restored rect (held by the
size / position signals on WindowState) when crossing through
Maximized, Fullscreen, or Minimized.
Variants§
Floating
Regular overlapping window. Uses WindowState::size and
WindowState::position as the current geometry.
Maximized
Maximized to fill the current monitor’s work area (minus taskbar / dock / menu bar on platforms that have one).
Fullscreen
Exclusive fullscreen — covers the entire display, title bar and all chrome hidden. On macOS this is Space-based fullscreen.
Minimized
Minimized to the taskbar / dock. The window is not visible on-screen but retains its state and may be restored.
Implementations§
Source§impl WindowPlacement
impl WindowPlacement
Sourcepub fn is_fullscreen(self) -> bool
pub fn is_fullscreen(self) -> bool
Returns true when the window is currently in Fullscreen.
Sourcepub fn is_maximized(self) -> bool
pub fn is_maximized(self) -> bool
Returns true when the window is currently in Maximized.
Sourcepub fn is_minimized(self) -> bool
pub fn is_minimized(self) -> bool
Returns true when the window is currently in Minimized.
Sourcepub fn is_floating(self) -> bool
pub fn is_floating(self) -> bool
Returns true when the window is currently Floating — i.e.
neither maximized, fullscreen, nor minimized.
Trait Implementations§
Source§impl Clone for WindowPlacement
impl Clone for WindowPlacement
Source§fn clone(&self) -> WindowPlacement
fn clone(&self) -> WindowPlacement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more