pub struct MenuLineState {
pub area: Rect,
pub item_areas: Vec<Rect>,
pub navchar: Vec<Option<char>>,
pub disabled: Vec<bool>,
pub selected: Option<usize>,
pub focus: FocusFlag,
pub mouse: MouseFlags,
pub non_exhaustive: NonExhaustive,
}Expand description
State & event handling.
Fields§
§area: RectArea for the whole widget. readonly. renewed for each render.
item_areas: Vec<Rect>Areas for each item. readonly. renewed for each render.
Hot keys readonly. renewed for each render.
disabled: Vec<bool>Disable menu-items.
selected: Option<usize>Selected item. read+write
focus: FocusFlagCurrent focus state. read+write
mouse: MouseFlagsFlags for mouse handling. used for mouse interaction
non_exhaustive: NonExhaustiveImplementations§
Source§impl MenuLineState
impl MenuLineState
Trait Implementations§
Source§impl Clone for MenuLineState
impl Clone for MenuLineState
Source§impl Debug for MenuLineState
impl Debug for MenuLineState
Source§impl Default for MenuLineState
impl Default for MenuLineState
Source§impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenuLineState
impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenuLineState
Source§impl HandleEvent<Event, Regular, MenuOutcome> for MenuLineState
impl HandleEvent<Event, Regular, MenuOutcome> for MenuLineState
Source§impl HasFocus for MenuLineState
impl HasFocus for MenuLineState
Source§fn build(&self, builder: &mut FocusBuilder)
fn build(&self, builder: &mut FocusBuilder)
Build the focus-structure for the container.
Declares how the widget interacts with focus. 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 MenuLineState
impl !RefUnwindSafe for MenuLineState
impl !Send for MenuLineState
impl !Sync for MenuLineState
impl Unpin for MenuLineState
impl !UnwindSafe for MenuLineState
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