pub struct PopupMenuState {
pub popup: PopupCoreState,
pub item_areas: Vec<Rect>,
pub sep_areas: Vec<Rect>,
pub navchar: Vec<Option<char>>,
pub disabled: Vec<bool>,
pub selected: Option<usize>,
pub mouse: MouseFlags,
pub non_exhaustive: NonExhaustive,
}Expand description
State & event handling.
Fields§
§popup: PopupCoreStatePopup data.
item_areas: Vec<Rect>Areas for each item. readonly. renewed for each render.
sep_areas: Vec<Rect>Area for the separator after each item. The area has height 0 if there is no separator. readonly. renewed for each render.
Letter navigation readonly. renewed for each render.
disabled: Vec<bool>Disabled menu-items.
selected: Option<usize>Selected item. read+write
mouse: MouseFlagsMouse flags used for mouse interaction
non_exhaustive: NonExhaustiveImplementations§
Source§impl PopupMenuState
impl PopupMenuState
Sourcepub fn set_popup_z(&mut self, z: u16)
pub fn set_popup_z(&mut self, z: u16)
Set the z-index for the popup-menu.
Sourcepub fn flip_active(&mut self)
pub fn flip_active(&mut self)
Show the popup.
Sourcepub fn set_active(&mut self, active: bool)
pub fn set_active(&mut self, active: bool)
Show the popup.
Sourcepub fn clear_areas(&mut self)
pub fn clear_areas(&mut self)
Clear the areas.
Select by navigation key.
Trait Implementations§
Source§impl Clone for PopupMenuState
impl Clone for PopupMenuState
Source§fn clone(&self) -> PopupMenuState
fn clone(&self) -> PopupMenuState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PopupMenuState
impl Debug for PopupMenuState
Source§impl Default for PopupMenuState
impl Default for PopupMenuState
Source§impl HandleEvent<Event, MouseOnly, MenuOutcome> for PopupMenuState
impl HandleEvent<Event, MouseOnly, MenuOutcome> for PopupMenuState
Source§impl HandleEvent<Event, Popup, MenuOutcome> for PopupMenuState
impl HandleEvent<Event, Popup, MenuOutcome> for PopupMenuState
Auto Trait Implementations§
impl !Freeze for PopupMenuState
impl !RefUnwindSafe for PopupMenuState
impl !Send for PopupMenuState
impl !Sync for PopupMenuState
impl Unpin for PopupMenuState
impl !UnwindSafe for PopupMenuState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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