Top-level window container node.
Holds window-level configuration (title, size, position, decorations,
etc.) and wraps the child widget tree for that window. The runtime
detects window nodes by their "window" type string and synchronizes
open/close/update operations with the Rust binary via the bridge.
Props
title(string) -- window title bar text.size({width, height}) -- initial window size in pixels.width(number) -- window width in pixels (alternative tosize).height(number) -- window height in pixels (alternative tosize).position({x, y}) -- initial window position.min_size({width, height}) -- minimum window dimensions.max_size({width, height}) -- maximum window dimensions.maximized(boolean) -- start maximized.fullscreen(boolean) -- start in fullscreen mode.visible(boolean) -- whether the window is visible.resizable(boolean) -- whether the window can be resized.closeable(boolean) -- whether the window close button is shown.minimizable(boolean) -- whether the window can be minimized.decorations(boolean) -- whether to show window decorations (title bar, borders).transparent(boolean) -- whether the window background is transparent.blur(boolean) -- whether to blur the window background.level(atom) -- window stacking level (:normal,:always_on_top,:always_on_bottom).exit_on_close_request(boolean) -- whether closing the window exits the app.scale_factor(number) -- window scale factor override.theme-- per-window theme. A built-in theme atom (e.g.:dark,:nord),:systemto follow OS preference, or a custom palette map fromPlushie.Type.Theme.custom/2. Overrides the app-level theme fromsettings/0for this window only.
Summary
Functions
Sets whether to blur the window background.
Converts this window struct to a ui_node() map via the Plushie.Widget protocol.
Sets whether the window close button is shown.
Sets whether to show window decorations.
Sets whether closing the window exits the app.
Appends multiple children to the window.
Sets whether the window starts in fullscreen.
Sets the window height.
Sets the window stacking level.
Sets the maximum window size.
Sets whether the window starts maximized.
Sets the minimum window size.
Sets whether the window can be minimized.
Creates a new window struct with optional keyword opts.
Sets the initial window position.
Appends a child to the window.
Sets whether the window is resizable.
Sets the window scale factor.
Sets the window size as a {width, height} tuple.
Sets the per-window theme.
Sets the window title.
Sets whether the window background is transparent.
Sets whether the window is visible.
Sets the window width.
Applies keyword options to an existing window struct.
Types
@type option() :: {:title, String.t()} | {:size, {number(), number()}} | {:width, number()} | {:height, number()} | {:position, {number(), number()}} | {:min_size, {number(), number()}} | {:max_size, {number(), number()}} | {:maximized, boolean()} | {:fullscreen, boolean()} | {:visible, boolean()} | {:resizable, boolean()} | {:closeable, boolean()} | {:minimizable, boolean()} | {:decorations, boolean()} | {:transparent, boolean()} | {:blur, boolean()} | {:level, atom()} | {:exit_on_close_request, boolean()} | {:scale_factor, number()} | {:theme, Plushie.Type.Theme.t()}
@type t() :: %Plushie.Widget.Window{ blur: boolean() | nil, children: [Plushie.Widget.child()], closeable: boolean() | nil, decorations: boolean() | nil, exit_on_close_request: boolean() | nil, fullscreen: boolean() | nil, height: number() | nil, id: String.t(), level: atom() | nil, max_size: {number(), number()} | nil, maximized: boolean() | nil, min_size: {number(), number()} | nil, minimizable: boolean() | nil, position: {number(), number()} | nil, resizable: boolean() | nil, scale_factor: number() | nil, size: {number(), number()} | nil, theme: Plushie.Type.Theme.t() | nil, title: String.t() | nil, transparent: boolean() | nil, visible: boolean() | nil, width: number() | nil }
Functions
Sets whether to blur the window background.
@spec build(window :: t()) :: Plushie.Widget.ui_node()
Converts this window struct to a ui_node() map via the Plushie.Widget protocol.
Sets whether the window close button is shown.
Sets whether to show window decorations.
Sets whether closing the window exits the app.
@spec extend(window :: t(), children :: [Plushie.Widget.child()]) :: t()
Appends multiple children to the window.
Sets whether the window starts in fullscreen.
Sets the window height.
Sets the window stacking level.
Sets the maximum window size.
Sets whether the window starts maximized.
Sets the minimum window size.
Sets whether the window can be minimized.
Creates a new window struct with optional keyword opts.
Sets the initial window position.
@spec push(window :: t(), child :: Plushie.Widget.child()) :: t()
Appends a child to the window.
Sets whether the window is resizable.
Sets the window scale factor.
Sets the window size as a {width, height} tuple.
@spec theme(window :: t(), theme :: Plushie.Type.Theme.t()) :: t()
Sets the per-window theme.
Sets the window title.
Sets whether the window background is transparent.
Sets whether the window is visible.
Sets the window width.
Applies keyword options to an existing window struct.