LavaUI docs

struct WindowDragArea

Swift

struct WindowDragArea<Content> where Content : View

Makes a view's empty space a place the window can be dragged by.

The other half of client-side decoration, and the half that is easy to forget: without it a window with no title bar can be closed and maximized but never moved. Put it on the toolbar, the header, or whatever row the controls sit in — anything interactive inside still wins, because the hit test reaches children first.

The press is all it takes. From the moment the compositor is told, the pointer is the compositor's: the motion never reaches this process, the window follows the cursor, and the drag ends when the button comes up somewhere this app will never hear about. That is why nothing here tracks a drag — there is none to track on this side.

Sources/LavaUI/WindowControls.swift:382

Constructors

init(content: Content, doubleClickMaximizes: Bool = true)

Not documented.

Sources/LavaUI/WindowControls.swift:392

Properties

var content: Content

Not documented.

Sources/LavaUI/WindowControls.swift:383

var doubleClickMaximizes: Bool

Whether a double-click toggles maximize, the way a title bar does.

Sources/LavaUI/WindowControls.swift:385

var dumpDetail: String { get }

Not documented.

Sources/LavaUI/WindowControls.swift:397

Methods

func mountPrimitive() -> any AnyViewNode

Not documented.

Sources/LavaUI/WindowControls.swift:406

func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode

Not documented.

Sources/LavaUI/WindowControls.swift:410

func structureLines(indent: Int = 0) -> [String]

Not documented.

Sources/LavaUI/WindowControls.swift:399