Skip to main content

Module model

Module model 

Source
Expand description

The MenuModel data type and its builders.

Structs§

MenuEntry
One leaf command in the menu tree. Both the builder and the stored spec.
MenuItems
Builder for the contents of one (sub)menu — a sequence of items, separators, and nested submenus.
MenuModel
A declarative menu tree shared by the in-window MenuBar and the native OS menu bar. Cloneable by handle (Rc inside); a clone shares the same nodes and version signal, so mutating one updates every view.
StandardMenu
A platform-standard menu (macOS App / Window / Help) with localized labels. The framework wires the system selectors (About / Hide / Quit, Minimize / Zoom); you supply the strings — defaults are English lit!s, so pass tr!-resolved [LocalizedString]s for a localized app menu. This keeps the OS menu bar inside the i18n net like every other widget.

Enums§

MenuItemState
Checkable / radio state for a menu item, mirroring the MenuItem modes.
MenuNode
One node of the menu tree.