#[repr(C)]pub struct WindowFlags {Show 17 fields
pub frame: WindowFrame,
pub decorations: WindowDecorations,
pub background_material: WindowBackgroundMaterial,
pub window_type: WindowType,
pub close_requested: bool,
pub is_visible: bool,
pub is_always_on_top: bool,
pub is_resizable: bool,
pub has_focus: bool,
pub smooth_scroll_enabled: bool,
pub autotab_enabled: bool,
pub has_decorations: bool,
pub use_native_menus: bool,
pub use_native_context_menus: bool,
pub is_top_level: bool,
pub prevent_system_sleep: bool,
pub fullscreen_mode: FullScreenMode,
}Fields§
§frame: WindowFrameIs the window currently maximized, minimized or fullscreen
decorations: WindowDecorationsWindow decoration style (title bar, native controls)
background_material: WindowBackgroundMaterialCompositor blur/transparency effect material
window_type: WindowTypeWindow type classification (Normal, Menu, Tooltip, Dialog)
close_requested: boolUser clicked the close button (set by WindowDelegate, checked by event loop) The close_callback can set this to false to prevent closing
is_visible: boolIs the window currently visible?
is_always_on_top: boolIs the window always on top?
is_resizable: boolWhether the window is resizable
has_focus: boolWhether the window has focus or not (mutating this will request user attention)
smooth_scroll_enabled: boolIs smooth scrolling enabled for this window?
autotab_enabled: boolIs automatic TAB switching supported?
has_decorations: boolEnable client-side decorations (custom titlebar with CSD) Only effective when decorations == WindowDecorations::None
Use native menus (Win32 HMENU, macOS NSMenu) instead of Azul window-based menus Default: true on Windows/macOS, false on Linux
Use native context menus instead of Azul window-based context menus Default: true on Windows/macOS, false on Linux
is_top_level: boolKeep window above all others (even from other applications) Platform-specific: Uses SetWindowPos(HWND_TOPMOST) on Windows, [NSWindow setLevel:] on macOS, _NET_WM_STATE_ABOVE on X11, zwlr_layer_shell on Wayland
prevent_system_sleep: boolPrevent system from sleeping while window is open Platform-specific: Uses SetThreadExecutionState on Windows, IOPMAssertionCreateWithName on macOS, org.freedesktop.ScreenSaver.Inhibit on Linux
fullscreen_mode: FullScreenModeDesired fullscreen-transition style.
On macOS this controls whether entering/leaving fullscreen plays the
system animation (Slow*) or transitions immediately (Fast*). On
other platforms Slow* and Fast* behave identically.
The actual current frame state still lives in WindowFlags::frame; this
field only describes how the next transition should be performed.
Implementations§
Source§impl WindowFlags
impl WindowFlags
Check if window is a menu popup
Sourcepub fn is_tooltip_window(&self) -> bool
pub fn is_tooltip_window(&self) -> bool
Check if window is a tooltip
Sourcepub fn is_dialog_window(&self) -> bool
pub fn is_dialog_window(&self) -> bool
Check if window is a dialog
Sourcepub fn window_has_focus(&self) -> bool
pub fn window_has_focus(&self) -> bool
Check if window currently has focus
Sourcepub fn is_close_requested(&self) -> bool
pub fn is_close_requested(&self) -> bool
Check if close was requested via callback
Check if native menus should be used
Check if native context menus should be used
Trait Implementations§
Source§impl Clone for WindowFlags
impl Clone for WindowFlags
Source§fn clone(&self) -> WindowFlags
fn clone(&self) -> WindowFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WindowFlags
impl Debug for WindowFlags
Source§impl Default for WindowFlags
impl Default for WindowFlags
Source§impl Hash for WindowFlags
impl Hash for WindowFlags
Source§impl Ord for WindowFlags
impl Ord for WindowFlags
Source§fn cmp(&self, other: &WindowFlags) -> Ordering
fn cmp(&self, other: &WindowFlags) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WindowFlags
impl PartialEq for WindowFlags
Source§fn eq(&self, other: &WindowFlags) -> bool
fn eq(&self, other: &WindowFlags) -> bool
self and other values to be equal, and is used by ==.