pub struct MenuBar { /* private fields */ }Expand description
Menus for the app (set_menu) or for one window: declared anywhere
in a window’s content, like a Toolbar, a MenuBar holds that
window’s own menus while it’s there. A window
shows the app’s menus and its own; on macOS, whose menu bar is the
app’s, a window’s menus are there while it’s the main window.
Platforms add their standard menus around them.
ⓘ
view! {
<MenuBar>
<Menu title="Machine">
<MenuItem shortcut=Shortcut::primary('r') @select=start>"Start"</MenuItem>
<MenuSeparator/>
<MenuItem bind=show_log>"Show Log"</MenuItem>
</Menu>
</MenuBar>
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MenuBar
impl !Send for MenuBar
impl !Sync for MenuBar
impl !UnwindSafe for MenuBar
impl Forget for MenuBar
impl Freeze for MenuBar
impl Unpin for MenuBar
impl UnsafeUnpin for MenuBar
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