# `Plushie.Widget.Window`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.6.0/lib/plushie/widget/window.ex#L1)

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 to `size`).
- `height` (number) -- window height in pixels (alternative to `size`).
- `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`), `:system` to follow OS preference, or a custom palette map
  from `Plushie.Type.Theme.custom/2`. Overrides the app-level theme
  from `settings/0` for this window only.

# `option`

```elixir
@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()}
```

# `t`

```elixir
@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
}
```

# `blur`

```elixir
@spec blur(window :: t(), blur :: boolean()) :: t()
```

Sets whether to blur the window background.

# `build`

```elixir
@spec build(window :: t()) :: Plushie.Widget.ui_node()
```

Converts this window struct to a `ui_node()` map via the `Plushie.Widget` protocol.

# `closeable`

```elixir
@spec closeable(window :: t(), closeable :: boolean()) :: t()
```

Sets whether the window close button is shown.

# `decorations`

```elixir
@spec decorations(window :: t(), decorations :: boolean()) :: t()
```

Sets whether to show window decorations.

# `exit_on_close_request`

```elixir
@spec exit_on_close_request(window :: t(), exit_on_close_request :: boolean()) :: t()
```

Sets whether closing the window exits the app.

# `extend`

```elixir
@spec extend(window :: t(), children :: [Plushie.Widget.child()]) :: t()
```

Appends multiple children to the window.

# `fullscreen`

```elixir
@spec fullscreen(window :: t(), fullscreen :: boolean()) :: t()
```

Sets whether the window starts in fullscreen.

# `height`

```elixir
@spec height(window :: t(), height :: number()) :: t()
```

Sets the window height.

# `level`

```elixir
@spec level(window :: t(), level :: atom()) :: t()
```

Sets the window stacking level.

# `max_size`

```elixir
@spec max_size(window :: t(), max_size :: {number(), number()}) :: t()
```

Sets the maximum window size.

# `maximized`

```elixir
@spec maximized(window :: t(), maximized :: boolean()) :: t()
```

Sets whether the window starts maximized.

# `min_size`

```elixir
@spec min_size(window :: t(), min_size :: {number(), number()}) :: t()
```

Sets the minimum window size.

# `minimizable`

```elixir
@spec minimizable(window :: t(), minimizable :: boolean()) :: t()
```

Sets whether the window can be minimized.

# `new`

```elixir
@spec new(id :: String.t(), opts :: [option()]) :: t()
```

Creates a new window struct with optional keyword opts.

# `position`

```elixir
@spec position(window :: t(), position :: {number(), number()}) :: t()
```

Sets the initial window position.

# `push`

```elixir
@spec push(window :: t(), child :: Plushie.Widget.child()) :: t()
```

Appends a child to the window.

# `resizable`

```elixir
@spec resizable(window :: t(), resizable :: boolean()) :: t()
```

Sets whether the window is resizable.

# `scale_factor`

```elixir
@spec scale_factor(window :: t(), scale_factor :: number()) :: t()
```

Sets the window scale factor.

# `size`

```elixir
@spec size(window :: t(), size :: {number(), number()}) :: t()
```

Sets the window size as a `{width, height}` tuple.

# `theme`

```elixir
@spec theme(window :: t(), theme :: Plushie.Type.Theme.t()) :: t()
```

Sets the per-window theme.

# `title`

```elixir
@spec title(window :: t(), title :: String.t()) :: t()
```

Sets the window title.

# `transparent`

```elixir
@spec transparent(window :: t(), transparent :: boolean()) :: t()
```

Sets whether the window background is transparent.

# `visible`

```elixir
@spec visible(window :: t(), visible :: boolean()) :: t()
```

Sets whether the window is visible.

# `width`

```elixir
@spec width(window :: t(), width :: number()) :: t()
```

Sets the window width.

# `with_options`

```elixir
@spec with_options(window :: t(), opts :: [option()]) :: t()
```

Applies keyword options to an existing window struct.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
