pub struct MenuPath(/* private fields */);Expand description
Which menu of a MenuBar is open, and how deep: the index of the open menu on the
bar, then of the open submenu in it, and so on. Empty when every menu is closed.
Implementations§
Source§impl MenuPath
impl MenuPath
Sourcepub fn from_indices(indices: impl Into<Vec<usize>>) -> Self
pub fn from_indices(indices: impl Into<Vec<usize>>) -> Self
The path of indices, from the bar down.
Sourcepub fn depth(&self) -> usize
pub fn depth(&self) -> usize
How many menus are open: 1 for a menu off the bar, 2 with a submenu in it.
Sourcepub fn opened(&self, level: usize, index: usize) -> Self
pub fn opened(&self, level: usize, index: usize) -> Self
The path with entry index open at level, and whatever was open below it closed.
Trait Implementations§
impl Eq for MenuPath
impl StructuralPartialEq for MenuPath
Auto Trait Implementations§
impl Freeze for MenuPath
impl RefUnwindSafe for MenuPath
impl Send for MenuPath
impl Sync for MenuPath
impl Unpin for MenuPath
impl UnsafeUnpin for MenuPath
impl UnwindSafe for MenuPath
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