pub struct MenuBar(_);
Expand description
Object that allows you to create a MenuBar
, menu.
Platform-specific
macOs: The menu will show in the Menu Bar. Linux / Windows: The menu will be show at the top of the window.
Implementations
sourceimpl MenuBar
impl MenuBar
sourcepub fn new() -> MenuBar
pub fn new() -> MenuBar
Creates a new Menubar (Window) menu for platforms where this is appropriate.
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
Auto Trait Implementations
impl RefUnwindSafe for MenuBar
impl Send for MenuBar
impl Sync for MenuBar
impl Unpin for MenuBar
impl UnwindSafe for MenuBar
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