pub struct MenuItem {
pub id: String,
pub label: Option<String>,
pub icon: Option<Icon>,
pub keys: Vec<String>,
pub detail: Option<String>,
pub checked: Option<bool>,
pub radio: Option<String>,
pub disabled: Option<Disabled>,
pub danger: Option<bool>,
pub items: Vec<MenuEntry>,
}Expand description
A menu row. Choosing it sends action with id as act (and the new
checked of a check or radio row).
Fields§
§id: StringWhat the action event sends as act.
label: Option<String>The row’s text (default from id).
icon: Option<Icon>A leading icon.
keys: Vec<String>Shortcut keys drawn at the right (display only).
detail: Option<String>A second line under the label (a rich row).
checked: Option<bool>Makes it a check row, checked while true.
radio: Option<String>Makes it a radio row of this group.
disabled: Option<Disabled>Dimmed, not choosable; a reason is the tooltip.
danger: Option<bool>A destructive action, drawn in --bad.
items: Vec<MenuEntry>A submenu (the row itself sends nothing).
Implementations§
Trait Implementations§
impl Eq for MenuItem
impl StructuralPartialEq for MenuItem
Auto Trait Implementations§
impl Freeze for MenuItem
impl RefUnwindSafe for MenuItem
impl Send for MenuItem
impl Sync for MenuItem
impl Unpin for MenuItem
impl UnsafeUnpin for MenuItem
impl UnwindSafe for MenuItem
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> Equivalent<K> for Q
impl<Q, K> Equivalent<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.