pub struct MenuBar {
pub menus: &'static [Menu],
}Expand description
All application menus
Fields§
Implementations§
Source§impl MenuBar
impl MenuBar
Get the number of menus
Get a menu by index
Get menu label key
Sourcepub fn get_item_count(&self, menu_index: usize) -> usize
pub fn get_item_count(&self, menu_index: usize) -> usize
Get item count for a menu
Sourcepub fn get_action(
&self,
menu_index: usize,
item_index: usize,
) -> Option<MenuAction>
pub fn get_action( &self, menu_index: usize, item_index: usize, ) -> Option<MenuAction>
Get a specific menu action
Auto Trait Implementations§
impl Freeze for MenuBar
impl RefUnwindSafe for MenuBar
impl Send for MenuBar
impl Sync for MenuBar
impl Unpin for MenuBar
impl UnwindSafe 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more