LavaUI docs GitHub

struct WindowControls

Swift

struct WindowControls

The three controls as one cluster, in the order this desktop puts them.

Hover is shared: pointing at any one of them reveals all three glyphs, the way a group of controls behaves when it is read as a group. Which controls appear — and in what order — is the app's, so a window that cannot be resized simply does not list .maximize rather than showing a button that lies.

Sources/LavaUI/WindowControls.swift:312

Constructors

init(_ kinds: [WindowControlKind] = [.close, .minimize, .maximize], style: WindowControlsStyle = WindowControlsStyle(), beforeClose: (() -> Void)? = nil)

Creates the cluster. List only the controls the window supports.

Sources/LavaUI/WindowControls.swift:324

Properties

var beforeClose: (() -> Void)?

Cleanup performed on an accepted close, before the host destroys the window.

Sources/LavaUI/WindowControls.swift:318

var body: some View { get }

Not documented.

Sources/LavaUI/WindowControls.swift:334

var kinds: [WindowControlKind]

Which controls to show, in order.

Sources/LavaUI/WindowControls.swift:314

var style: WindowControlsStyle

Size, colours and glyph behaviour.

Sources/LavaUI/WindowControls.swift:316