Struct wry::application::menu::ContextMenu
source · [−]pub struct ContextMenu(_);Expand description
Object that allows you to create a ContextMenu.
Platform-specific
Implementations
sourceimpl ContextMenu
impl ContextMenu
sourcepub fn new() -> ContextMenu
pub fn new() -> ContextMenu
Creates a new Menu for context (popup, tray etc..).
Add a submenu.
sourcepub fn add_item(&mut self, item: MenuItemAttributes<'_>) -> CustomMenuItem
pub fn add_item(&mut self, item: MenuItemAttributes<'_>) -> CustomMenuItem
Add new item to this menu.
sourcepub 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
sourceimpl Default for ContextMenu
impl Default for ContextMenu
sourcepub fn default() -> ContextMenu
pub fn default() -> ContextMenu
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ContextMenu
impl Send for ContextMenu
impl Sync for ContextMenu
impl Unpin for ContextMenu
impl UnwindSafe for ContextMenu
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more