LavaUI docs GitHub

struct Menu

Swift

Constructors

init(_ title: String, id: MenuID? = nil, icon: MenuIcon? = nil, @MenuBuilder content: () -> [MenuContent])

Creates a menu from a @MenuBuilder block of items, separators and submenus.

Sources/LavaMenu/Menu.swift:410

init(_ title: String, id: String, icon: MenuIcon? = nil, @MenuBuilder content: () -> [MenuContent])

Creates a menu with a string id.

Sources/LavaMenu/Menu.swift:423

Properties

var content: [MenuContent]

The menu's rows, in order.

Sources/LavaMenu/Menu.swift:407

var icon: MenuIcon?

A picture drawn instead of the title in the in-window strip.

Sources/LavaMenu/Menu.swift:405

var id: MenuID?

The menu's id, or nil to derive one from its title and its parent's path.

Sources/LavaMenu/Menu.swift:403

var title: String

The menu's title.

Sources/LavaMenu/Menu.swift:401