pub struct SubmenuItem {
pub icon: Option<&'static Icon>,
pub label: String,
pub tooltip: String,
pub is_sel: bool,
pub is_favorite: bool,
pub is_checked: bool,
pub is_danger: bool,
pub on_click: Option<Box<dyn Fn() -> Option<DrawingToolbarAction>>>,
}Expand description
A single item in a submenu
Fields§
§icon: Option<&'static Icon>Glyph displayed by the component.
label: StringText displayed by the component.
tooltip: StringHelp text displayed on hover.
is_sel: boolDraw the row in the accent fill.
is_favorite: boolWhether the entry is marked as a favorite.
is_checked: boolShow a check mark in the right column.
is_danger: boolDraw the row in the error colour, for an action that destroys data.
on_click: Option<Box<dyn Fn() -> Option<DrawingToolbarAction>>>Callback invoked when the row is clicked, optionally returning an action.
Trait Implementations§
Source§fn default() -> SubmenuItem
fn default() -> SubmenuItem
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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