loom & weft
Made for Swift.

Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.

LOOM Unreleased (PR #2) / WIDGETS

PopupMenuItem

A label plus supporting detail. Values and actions associated with choices remain in your app.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Example

let choice = PopupMenuItem("Open", detail: "Choose a file")
_ = PopupMenu([choice])
Members on this page

Feature guides and release status

PopupMenuItem

Structure
struct PopupMenuItem

Conforms to: Swift.Sendable, Swift.SendableMetatype.

One choice in a popup list.

Application-specific values and actions stay with the caller.

Source · PopupMenu.swift:6

label

Instance Property
var label: String

Visible item label.

Source · PopupMenu.swift:7

detail

Instance Property
var detail: String

Supporting popup detail.

Source · PopupMenu.swift:8

init(_:detail:)

Initializer
init(_ label: String, detail: String = "")

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (2)
label
Argument type and any default are shown in the declaration; see the behavior notes above.
detail
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · PopupMenu.swift:10