pub struct WindowOptions {Show 16 fields
pub window_bounds: Option<WindowBounds>,
pub titlebar: Option<TitlebarOptions>,
pub focus: bool,
pub show: bool,
pub kind: WindowKind,
pub is_movable: bool,
pub app_owns_titlebar_drag: bool,
pub is_resizable: bool,
pub is_minimizable: bool,
pub display_id: Option<DisplayId>,
pub window_background: WindowBackgroundAppearance,
pub app_id: Option<String>,
pub window_min_size: Option<Size<Pixels>>,
pub window_decorations: Option<WindowDecorations>,
pub icon: Option<Arc<RgbaImage>>,
pub tabbing_identifier: Option<String>,
}Expand description
The variables that can be configured when creating a new window
Fields§
§window_bounds: Option<WindowBounds>Specifies the state and bounds of the window in screen coordinates.
None: Inherit the bounds.Some(WindowBounds): Open a window with corresponding state and its restore size.
titlebar: Option<TitlebarOptions>The titlebar configuration of the window
focus: boolWhether the window should be focused when created
show: boolWhether the window should be shown when created
kind: WindowKindThe kind of window to create
is_movable: boolWhether the window can be moved by the user. When false, the user cannot drag
the window (on macOS this sets NSWindow.isMovable, which also disables the
Window-menu tiling items); programmatic moves are still allowed.
app_owns_titlebar_drag: boolWhether the application owns dragging of the (custom) titlebar, rather than AppKit. Only has an effect on macOS.
Set this to true for windows that draw their own titlebar and move the window
themselves via Window::start_window_move. It marks the whole content view as
app-owned titlebar content, so AppKit neither drags the window from the titlebar
nor delays titlebar clicks while disambiguating double-clicks (a delay first
observed on macOS 27). It is independent of is_movable, so such windows stay
user-movable (via their own drag) and keep the Window-menu tiling items enabled.
Leave this false for windows that rely on AppKit’s native titlebar dragging.
is_resizable: boolWhether the window should be resizable by the user
is_minimizable: boolWhether the window should be minimized by the user
display_id: Option<DisplayId>The display to create the window on, if this is None, the window will be created on the main display
window_background: WindowBackgroundAppearanceThe appearance of the window background.
app_id: Option<String>Application identifier of the window. Can by used by desktop environments to group applications together.
window_min_size: Option<Size<Pixels>>Window minimum size
window_decorations: Option<WindowDecorations>Whether to use client or server-side decorations on X11 and Wayland. The platform may ignore requests it cannot satisfy.
icon: Option<Arc<RgbaImage>>Icon image (X11 only)
tabbing_identifier: Option<String>Tab group name, allows opening the window as a native tab on macOS 10.12+. Windows with the same tabbing identifier will be grouped together.
Trait Implementations§
Source§impl Debug for WindowOptions
impl Debug for WindowOptions
Auto Trait Implementations§
impl Freeze for WindowOptions
impl RefUnwindSafe for WindowOptions
impl Send for WindowOptions
impl Sync for WindowOptions
impl Unpin for WindowOptions
impl UnsafeUnpin for WindowOptions
impl UnwindSafe for WindowOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().