Expand description
Declarative description of par-term’s menu.
This is the single source of truth for the menu’s contents. Two renderers consume it:
super::MenuManager::newwalks it to build themuda::Menuthat macOS and Windows attach natively.super::egui_menu::AppMenuUiwalks the same model to draw the in-app menu on platforms that cannot attach a native menu bar (Linux/BSD, where muda needs agtk::Windowthat winit never creates — seesuper::linux).
Neither renderer owns a list of commands, so the two cannot drift apart.
Structs§
- Menu
Item Spec - A single activatable menu command.
- Menu
Section - A top-level menu (File, Tab, Edit, …).
- Profile
Entry - One dynamically generated profile entry.
Enums§
- Menu
Entry - One entry inside a menu section.
Constants§
- HELP_
SECTION_ TITLE - Title of the Help section.
Functions§
- accelerator_
label - Render an accelerator the way a menu displays it, e.g.
⌘NorCtrl+Shift+N. - menu_
model - Build the menu model.
- platform_
menu_ model - Build the menu model for the current platform’s native menu.
- profile_
entries - Expand
MenuEntry::Profilesinto one entry per configured profile.