pub enum MenuOutcome {
Continue,
Unchanged,
Changed,
Hide,
Selected(usize),
Activated(usize),
MenuSelected(usize, usize),
MenuActivated(usize, usize),
}Expand description
Outcome for menuline.
Variants§
Continue
The given event was not handled at all.
Unchanged
The event was handled, no repaint necessary.
Changed
The event was handled, repaint necessary.
Hide
Popup should be hidden.
Used by PopupMenu.
Selected(usize)
A menuitem was select.
Used by MenuLine and PopupMenu. Used by Menubar for results from the main menu.
Activated(usize)
A menuitem was activated.
Used by MenuLine and PopupMenu. Used by Menubar for results from the main menu.
MenuSelected(usize, usize)
A popup-menuitem was selected.
Used by Menubar for results from a popup-menu. Is (main-idx, popup-idx).
MenuActivated(usize, usize)
A popup-menuitem was activated.
Used by Menubar for results from a popup-menu. Is (main-idx, popup-idx);
Trait Implementations§
Source§impl Clone for MenuOutcome
impl Clone for MenuOutcome
Source§fn clone(&self) -> MenuOutcome
fn clone(&self) -> MenuOutcome
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 ConsumedEvent for MenuOutcome
impl ConsumedEvent for MenuOutcome
Source§fn is_consumed(&self) -> bool
fn is_consumed(&self) -> bool
Is this the ‘consumed’ result.
Source§fn or_else_try<F, E>(self, f: F) -> Result<Self, E>
fn or_else_try<F, E>(self, f: F) -> Result<Self, E>
Or-Else chaining with
is_consumed() as the split.Source§impl Debug for MenuOutcome
impl Debug for MenuOutcome
Source§impl From<MenuOutcome> for Outcome
impl From<MenuOutcome> for Outcome
Source§fn from(value: MenuOutcome) -> Self
fn from(value: MenuOutcome) -> Self
Converts to this type from the input type.
Source§impl From<Outcome> for MenuOutcome
impl From<Outcome> for MenuOutcome
Source§impl From<PopupOutcome> for MenuOutcome
impl From<PopupOutcome> for MenuOutcome
Source§fn from(value: PopupOutcome) -> Self
fn from(value: PopupOutcome) -> Self
Converts to this type from the input type.
Source§impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenuLineState
impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenuLineState
Source§impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenubarState
impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenubarState
Source§impl HandleEvent<Event, MouseOnly, MenuOutcome> for PopupMenuState
impl HandleEvent<Event, MouseOnly, MenuOutcome> for PopupMenuState
Source§impl HandleEvent<Event, Popup, MenuOutcome> for MenubarState
impl HandleEvent<Event, Popup, MenuOutcome> for MenubarState
Source§impl HandleEvent<Event, Popup, MenuOutcome> for PopupMenuState
impl HandleEvent<Event, Popup, MenuOutcome> for PopupMenuState
Source§impl HandleEvent<Event, Regular, MenuOutcome> for MenuLineState
impl HandleEvent<Event, Regular, MenuOutcome> for MenuLineState
Source§impl Ord for MenuOutcome
impl Ord for MenuOutcome
Source§fn cmp(&self, other: &MenuOutcome) -> Ordering
fn cmp(&self, other: &MenuOutcome) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MenuOutcome
impl PartialEq for MenuOutcome
Source§impl PartialOrd for MenuOutcome
impl PartialOrd for MenuOutcome
impl Copy for MenuOutcome
impl Eq for MenuOutcome
impl StructuralPartialEq for MenuOutcome
Auto Trait Implementations§
impl Freeze for MenuOutcome
impl RefUnwindSafe for MenuOutcome
impl Send for MenuOutcome
impl Sync for MenuOutcome
impl Unpin for MenuOutcome
impl UnwindSafe for MenuOutcome
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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