pub struct Menu(/* private fields */);
Expand description
Menu holds info for menus
Implementations§
Source§impl Menu
impl Menu
Destroys a menu. Currently not implemented
Adds a sub menu to the current menu
Sourcepub fn add_separator(&mut self)
pub fn add_separator(&mut self)
Adds a menu separator
Adds an item to the menu
Sourcepub fn add_item(&mut self, name: &str, id: usize) -> MenuItem<'_>
pub fn add_item(&mut self, name: &str, id: usize) -> MenuItem<'_>
Adds an item to the menu. Notice that you need to call “build” to finish the add
§Examples
menu.add_item("test", 1).shortcut(Key::A, 0).build()
Sourcepub fn remove_item(&mut self, item: &MenuItemHandle)
pub fn remove_item(&mut self, item: &MenuItemHandle)
Removes an item from the menu
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Menu
impl RefUnwindSafe for Menu
impl Send for Menu
impl Sync for Menu
impl Unpin for Menu
impl UnwindSafe for Menu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more