DropletLiquidPopoverRequest
What a droplet's popover asks the host for (DroppyKit 1.30.0).
@MainActor struct DropletLiquidPopoverRequest
What a droplet's popover asks the host for (DroppyKit 1.30.0). Built by dropletPopover(isPresented:attachment:acceptsKeyboardInput:content:); hosts read it.
Initializers
init(anchorView:attachment:acceptsKeyboardInput:content:onClose:)
@MainActor init(anchorView: NSView, attachment: DropletLiquidMenuAttachment = .automatic, acceptsKeyboardInput: Bool = false, content: @escaping @MainActor () -> AnyView, onClose: @escaping @MainActor () -> Void = {})
Properties
acceptsKeyboardInput
@MainActor let acceptsKeyboardInput: Bool
The popover holds a text field: the glass takes the keyboard while it is open.
anchorView
@MainActor let anchorView: NSView
The view the glass grows out of.
attachment
@MainActor let attachment: DropletLiquidMenuAttachment
The corner of the anchor it attaches to; .automatic lets the host decide (away from the notch or island on the shelf).
content
@MainActor let content: @MainActor () -> AnyView
The content, built when the glass opens. The host measures it.
onClose
@MainActor let onClose: @MainActor () -> Void
Called once when the glass has closed, whoever closed it.