pub struct MenuView {
pub items: Vec<MenuItemView>,
pub first_shown: usize,
pub shown: usize,
}Expand description
The whole menu, as it is this frame.
Fields§
§items: Vec<MenuItemView>The items, top to bottom: all of them, also those scrolled out of the box.
first_shown: usizeThe first item the box shows (0 unless the menu has scrolled).
shown: usizeHow many items the box shows from first_shown (all of them unless
the menu scrolls).
Implementations§
Source§impl MenuView
impl MenuView
Sourcepub fn new(items: Vec<MenuItemView>) -> Self
pub fn new(items: Vec<MenuItemView>) -> Self
A view of items that shows them all.
Sourcepub fn shown_items(&self) -> &[MenuItemView]
pub fn shown_items(&self) -> &[MenuItemView]
The items the box shows, top to bottom.
Sourcepub fn more_above(&self) -> bool
pub fn more_above(&self) -> bool
Whether items are scrolled out above the box, so a skin can mark it.
Sourcepub fn more_below(&self) -> bool
pub fn more_below(&self) -> bool
Whether items are scrolled out below the box.
Sourcepub fn focused(&self) -> Option<&MenuItemView>
pub fn focused(&self) -> Option<&MenuItemView>
The focused item, if there is one.
Trait Implementations§
impl Eq for MenuView
impl StructuralPartialEq for MenuView
Auto Trait Implementations§
impl Freeze for MenuView
impl RefUnwindSafe for MenuView
impl Send for MenuView
impl Sync for MenuView
impl Unpin for MenuView
impl UnsafeUnpin for MenuView
impl UnwindSafe for MenuView
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