LavaUI docs GitHub

enum MenuBuilder

Swift

Methods

static func buildArray(_ parts: [[MenuContent]]) -> [MenuContent]

A for loop: every iteration's rows, in order.

Sources/LavaMenu/Menu.swift:523

static func buildBlock(_ parts: [MenuContent]...) -> [MenuContent]

Joins the rows of each statement, in order.

Sources/LavaMenu/Menu.swift:503

static func buildEither(first part: [MenuContent]) -> [MenuContent]

The if branch of an if/else.

Sources/LavaMenu/Menu.swift:513

static func buildEither(second part: [MenuContent]) -> [MenuContent]

The else branch of an if/else.

Sources/LavaMenu/Menu.swift:518

static func buildExpression(_ item: MenuItem) -> [MenuContent]

A menu item.

Sources/LavaMenu/Menu.swift:483

static func buildExpression(_: MenuSeparator) -> [MenuContent]

A separator.

Sources/LavaMenu/Menu.swift:488

static func buildExpression(_ menu: Menu) -> [MenuContent]

A submenu.

Sources/LavaMenu/Menu.swift:493

static func buildExpression(_ contents: [MenuContent]) -> [MenuContent]

Rows built elsewhere, spliced in.

Sources/LavaMenu/Menu.swift:498

static func buildLimitedAvailability(_ part: [MenuContent]) -> [MenuContent]

An if #available block: its rows unchanged.

Sources/LavaMenu/Menu.swift:528

static func buildOptional(_ part: [MenuContent]?) -> [MenuContent]

An if without else: its rows, or none.

Sources/LavaMenu/Menu.swift:508