Skip to main content

Module model

Module model 

Source
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::new walks it to build the muda::Menu that macOS and Windows attach natively.
  • super::egui_menu::AppMenuUi walks the same model to draw the in-app menu on platforms that cannot attach a native menu bar (Linux/BSD, where muda needs a gtk::Window that winit never creates — see super::linux).

Neither renderer owns a list of commands, so the two cannot drift apart.

Structs§

MenuItemSpec
A single activatable menu command.
MenuSection
A top-level menu (File, Tab, Edit, …).
ProfileEntry
One dynamically generated profile entry.

Enums§

MenuEntry
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. ⌘N or Ctrl+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::Profiles into one entry per configured profile.