pub enum MenuRole {
Show 15 variants
Cut,
Copy,
Paste,
SelectAll,
Undo,
Redo,
Delete,
About,
Quit,
Preferences,
Minimize,
CloseWindow,
Fullscreen,
NewWindow,
CheckForUpdates,
}Expand description
A standard/system command. The backend supplies the native item, a selector on AppKit/UIKit
(cut:/copy:/paste:…) or a stock action on GTK/Qt/XAML, so it targets the focused
control, gets the platform’s default label + shortcut, and enables/disables itself
automatically. This is how default items (Edit ▸ Cut/Copy/Paste, the app’s Quit/About) are
accommodated without the app re-implementing them.
Variants§
Cut
Copy
Paste
SelectAll
Undo
Redo
Delete
About
The app’s About command (docs/settings.md). With an About registered through
day::register_about the item lowers to that dispatch action (a Day-rendered About
window, or the toolkit’s own About dialog where one exists); without one AppKit shows
its stock Info.plist panel and the other desktops show the label alone.
Quit
Preferences
Minimize
CloseWindow
Fullscreen
NewWindow
File ▸ New Window (docs/windows.md): opens another window through the builder the
app registered with day::register_new_window. No platform has a native selector
for it, so the item lowers to the registered dispatch action (disabled when none).
CheckForUpdates
Check for Updates… (docs/settings.md): placed directly under About in the macOS App
menu (the Sparkle convention) and in Help elsewhere. Lowers to the action an updater
registered with day::register_check_for_updates; absent from the bar when none did.