#[repr(C)]pub struct WindowFlags {Show 16 fields
pub frame: WindowFrame,
pub close_requested: bool,
pub decorations: WindowDecorations,
pub is_visible: bool,
pub is_always_on_top: bool,
pub is_resizable: bool,
pub has_focus: bool,
pub background_material: WindowBackgroundMaterial,
pub smooth_scroll_enabled: bool,
pub autotab_enabled: bool,
pub window_type: WindowType,
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,
}Fields§
§frame: WindowFrameIs the window currently maximized, minimized or fullscreen
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
decorations: WindowDecorationsWindow decoration style (title bar, native controls)
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)
background_material: WindowBackgroundMaterialCompositor blur/transparency effect material
smooth_scroll_enabled: boolIs smooth scrolling enabled for this window?
autotab_enabled: boolIs automatic TAB switching supported?
window_type: WindowTypeWindow type classification (Normal, Menu, Tooltip, Dialog)
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
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 · 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 · 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§impl PartialOrd for WindowFlags
impl PartialOrd for WindowFlags
impl Copy for WindowFlags
impl Eq for WindowFlags
impl StructuralPartialEq for WindowFlags
Auto Trait Implementations§
impl Freeze for WindowFlags
impl RefUnwindSafe for WindowFlags
impl Send for WindowFlags
impl Sync for WindowFlags
impl Unpin for WindowFlags
impl UnwindSafe for WindowFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more