MenuItem::Role
Preset defaults for common menu items.
Type | string |
For common menu items like Copy
and Paste
, manually implementing them for
all platforms is very boring work. You can instead specify a role
for a menu
item, and Yue will automatically set labels, accelerators and actions for the
menu item.
This type can have following values:
"copy"
"cut"
"paste"
"select-all"
"undo"
"redo"
"minimize"
"maximize"
"close-window"
"about"
- Only available on macOS."hide"
- Only available on macOS."hide-others"
- Only available on macOS."unhide"
- Only available on macOS."help"
- Only available on macOS."window"
- Only available on macOS."services"
- Only available on macOS.