loom & weft
Made for Swift.

Published release 0.2.1. Unreleased PR #2 reference.

LOOM 0.2.1 / WIDGETS

Menu

Renders one row per item, clipped to the area. selectedIndex is caller-owned; nil means no selected row. Selected rows use reverse video. Hints disappear in narrow regions. item(at:in:) returns an index only for cells within an actual visible item row.

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 menu = Menu([MenuItem("Open"), MenuItem("Quit")], selectedIndex: 0)
_ = menu.item(at: Point(x: 1, y: 1), in: Rect(width: 20, height: 2))
Members on this page

Feature guides and release status