LavaUI docs GitHub

struct MenuBarStrip

Swift

Constructors

init(model: MenuModel, openMenuID: Binding<MenuID?>, onActivate: @escaping (MenuID) -> Void, style: MenuBarStyle = .standard(), icons: [MenuID : UIImage] = [:], externalMenus: Bool = false)

Creates a strip. Every parameter matches the property of the same name.

Sources/LavaUI/MenuBarView.swift:232

Properties

var body: some View { get }

Not documented.

Sources/LavaUI/MenuBarView.swift:248

var externalMenus: Bool

The dropdown is not drawn into this surface.

A 32pt panel has nowhere under the title to put one. The binding still tracks which title is open — hover moves between them — and whoever owns it asks the compositor to draw the menu.

Sources/LavaUI/MenuBarView.swift:229

var icons: [MenuID : UIImage]

Already-decoded pictures for icon titles, keyed by menu id. A MenuIcon.path is used when this has nothing for that id.

Sources/LavaUI/MenuBarView.swift:223

var model: MenuModel

The menus whose titles the strip shows.

Sources/LavaUI/MenuBarView.swift:214

var onActivate: (MenuID) -> Void

Called with the item's id when a menu item is chosen.

Sources/LavaUI/MenuBarView.swift:218

var openMenuID: Binding<MenuID?>

The id of the menu whose dropdown is open, or nil.

Sources/LavaUI/MenuBarView.swift:216

var style: MenuBarStyle

How the strip and its dropdowns look.

Sources/LavaUI/MenuBarView.swift:220