Struct dioxus_desktop::tao::menu::ContextMenu
pub struct ContextMenu(_);Expand description
Object that allows you to create a ContextMenu.
Platform-specific
Implementations§
§impl ContextMenu
impl ContextMenu
pub fn new() -> ContextMenu
pub fn new() -> ContextMenu
Creates a new Menu for context (popup, tray etc..).
Add a submenu.
title could optionally contain an & before a character to assign this character as the mnemonic
for this menu item. To display a & without assigning a mnemenonic, use &&
Platform-specific:
- macOS: mnemonics are not supported but single
&will be rmeoved anyways for consistency with other platforms.
pub fn add_item(&mut self, item: MenuItemAttributes<'_>) -> CustomMenuItem
pub fn add_item(&mut self, item: MenuItemAttributes<'_>) -> CustomMenuItem
Add new item to this menu.
pub fn add_native_item(&mut self, item: MenuItem) -> Option<CustomMenuItem>
pub fn add_native_item(&mut self, item: MenuItem) -> Option<CustomMenuItem>
Add new item to this menu.
Trait Implementations§
§impl Default for ContextMenu
impl Default for ContextMenu
§fn default() -> ContextMenu
fn default() -> ContextMenu
Returns the “default value” for a type. Read more