Struct rat_widget::popup_menu::PopupMenuState
source · pub struct PopupMenuState {
pub focus: FocusFlag,
pub area: Rect,
pub z_areas: [ZRect; 1],
pub item_areas: Vec<Rect>,
pub navchar: Vec<Option<char>>,
pub selected: Option<usize>,
pub non_exhaustive: NonExhaustive,
}Expand description
State of the popup-menu.
Fields§
§focus: FocusFlagFocusflag is used to decide the visible/not-visible state.
area: RectTotal area
z_areas: [ZRect; 1]Area with z-index for Focus.
item_areas: Vec<Rect>Areas for each item.
Letter navigation
selected: Option<usize>Selected item.
non_exhaustive: NonExhaustiveImplementations§
source§impl PopupMenuState
impl PopupMenuState
sourcepub fn flip_active(&mut self)
pub fn flip_active(&mut self)
Show the popup.
sourcepub fn set_active(&self, active: bool)
pub fn set_active(&self, active: bool)
Show the popup.
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
source§impl HasFocusFlag for PopupMenuState
impl HasFocusFlag for PopupMenuState
If the widget is focusable, but doesn’t want to partake
in keyboard navigation it returns false here. Read more
source§fn is_focused(&self) -> bool
fn is_focused(&self) -> bool
Focused?
source§fn lost_focus(&self) -> bool
fn lost_focus(&self) -> bool
Just lost focus.
source§fn gained_focus(&self) -> bool
fn gained_focus(&self) -> bool
Just gained focus.
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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