MenuItem::Role
Preset defaults for common menu items.
Header | #include "nativeui/menu_item.h" |
Namespace | namespace nu |
Type | enum class |
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:
MenuItem::Role::Copy
MenuItem::Role::Cut
MenuItem::Role::Paste
MenuItem::Role::SelectAll
MenuItem::Role::Undo
MenuItem::Role::Redo
MenuItem::Role::Minimize
MenuItem::Role::Maximize
MenuItem::Role::CloseWindow
MenuItem::Role::About
- Only available on macOS.MenuItem::Role::Hide
- Only available on macOS.MenuItem::Role::HideOthers
- Only available on macOS.MenuItem::Role::Unhide
- Only available on macOS.MenuItem::Role::Help
- Only available on macOS.MenuItem::Role::Window
- Only available on macOS.MenuItem::Role::Services
- Only available on macOS.