pub struct MenuItemBuilder { /* private fields */ }Expand description
Configuration handle returned by menu_item.
Implementations§
Source§impl MenuItemBuilder
impl MenuItemBuilder
Configure menu before this component executes.
Configure menu before this component executes.
Sourcepub fn label(&self, value: impl Into<String>) -> Self
pub fn label(&self, value: impl Into<String>) -> Self
Configure label before this component executes.
Sourcepub fn label_optional(&self, value: Option<String>) -> Self
pub fn label_optional(&self, value: Option<String>) -> Self
Configure label before this component executes.
Sourcepub fn supporting_text(&self, value: impl Into<String>) -> Self
pub fn supporting_text(&self, value: impl Into<String>) -> Self
Configure supporting_text before this component executes.
Sourcepub fn supporting_text_optional(&self, value: Option<String>) -> Self
pub fn supporting_text_optional(&self, value: Option<String>) -> Self
Configure supporting_text before this component executes.
Sourcepub fn trailing_text(&self, value: impl Into<String>) -> Self
pub fn trailing_text(&self, value: impl Into<String>) -> Self
Configure trailing_text before this component executes.
Sourcepub fn trailing_text_optional(&self, value: Option<String>) -> Self
pub fn trailing_text_optional(&self, value: Option<String>) -> Self
Configure trailing_text before this component executes.
Sourcepub fn leading_icon(&self, value: impl Into<Painter>) -> Self
pub fn leading_icon(&self, value: impl Into<Painter>) -> Self
Configure leading_icon before this component executes.
Sourcepub fn leading_icon_optional(&self, value: Option<Painter>) -> Self
pub fn leading_icon_optional(&self, value: Option<Painter>) -> Self
Configure leading_icon before this component executes.
Sourcepub fn trailing_icon(&self, value: impl Into<Painter>) -> Self
pub fn trailing_icon(&self, value: impl Into<Painter>) -> Self
Configure trailing_icon before this component executes.
Sourcepub fn trailing_icon_optional(&self, value: Option<Painter>) -> Self
pub fn trailing_icon_optional(&self, value: Option<Painter>) -> Self
Configure trailing_icon before this component executes.
Configure submenu_content before this component executes.
Configure submenu_content before this component executes.
Configure submenu_content before this component executes.
Configure submenu_placement before this component executes.
Configure submenu_placement before this component executes.
Sourcepub fn selected_optional(&self, value: Option<bool>) -> Self
pub fn selected_optional(&self, value: Option<bool>) -> Self
Configure selected before this component executes.
Sourcepub fn selection_mode(&self, value: MenuItemSelectionMode) -> Self
pub fn selection_mode(&self, value: MenuItemSelectionMode) -> Self
Configure selection_mode before this component executes.
Sourcepub fn selection_mode_optional(
&self,
value: Option<MenuItemSelectionMode>,
) -> Self
pub fn selection_mode_optional( &self, value: Option<MenuItemSelectionMode>, ) -> Self
Configure selection_mode before this component executes.
Sourcepub fn position(&self, value: MenuPosition) -> Self
pub fn position(&self, value: MenuPosition) -> Self
Configure position before this component executes.
Sourcepub fn position_optional(&self, value: Option<MenuPosition>) -> Self
pub fn position_optional(&self, value: Option<MenuPosition>) -> Self
Configure position before this component executes.
Sourcepub fn shape_optional(&self, value: Option<Shape>) -> Self
pub fn shape_optional(&self, value: Option<Shape>) -> Self
Configure shape before this component executes.
Sourcepub fn container_color(&self, value: Color) -> Self
pub fn container_color(&self, value: Color) -> Self
Configure container_color before this component executes.
Sourcepub fn container_color_optional(&self, value: Option<Color>) -> Self
pub fn container_color_optional(&self, value: Option<Color>) -> Self
Configure container_color before this component executes.
Sourcepub fn color_style(&self, value: MenuColorStyle) -> Self
pub fn color_style(&self, value: MenuColorStyle) -> Self
Configure color_style before this component executes.
Sourcepub fn color_style_optional(&self, value: Option<MenuColorStyle>) -> Self
pub fn color_style_optional(&self, value: Option<MenuColorStyle>) -> Self
Configure color_style before this component executes.
Sourcepub fn enabled_optional(&self, value: Option<bool>) -> Self
pub fn enabled_optional(&self, value: Option<bool>) -> Self
Configure enabled before this component executes.
Sourcepub fn close_on_click(&self, value: bool) -> Self
pub fn close_on_click(&self, value: bool) -> Self
Configure close_on_click before this component executes.
Sourcepub fn close_on_click_optional(&self, value: Option<bool>) -> Self
pub fn close_on_click_optional(&self, value: Option<bool>) -> Self
Configure close_on_click before this component executes.
Sourcepub fn height_optional(&self, value: Option<Dp>) -> Self
pub fn height_optional(&self, value: Option<Dp>) -> Self
Configure height before this component executes.
Sourcepub fn label_color(&self, value: Color) -> Self
pub fn label_color(&self, value: Color) -> Self
Configure label_color before this component executes.
Sourcepub fn label_color_optional(&self, value: Option<Color>) -> Self
pub fn label_color_optional(&self, value: Option<Color>) -> Self
Configure label_color before this component executes.
Sourcepub fn supporting_color(&self, value: Color) -> Self
pub fn supporting_color(&self, value: Color) -> Self
Configure supporting_color before this component executes.
Sourcepub fn supporting_color_optional(&self, value: Option<Color>) -> Self
pub fn supporting_color_optional(&self, value: Option<Color>) -> Self
Configure supporting_color before this component executes.
Sourcepub fn disabled_color(&self, value: Color) -> Self
pub fn disabled_color(&self, value: Color) -> Self
Configure disabled_color before this component executes.
Sourcepub fn disabled_color_optional(&self, value: Option<Color>) -> Self
pub fn disabled_color_optional(&self, value: Option<Color>) -> Self
Configure disabled_color before this component executes.
Configure on_click before this component executes.
Sourcepub fn on_click_optional(&self, value: Option<Callback>) -> Self
pub fn on_click_optional(&self, value: Option<Callback>) -> Self
Configure on_click before this component executes.
Auto Trait Implementations§
impl Freeze for MenuItemBuilder
impl RefUnwindSafe for MenuItemBuilder
impl Send for MenuItemBuilder
impl Sync for MenuItemBuilder
impl Unpin for MenuItemBuilder
impl UnsafeUnpin for MenuItemBuilder
impl UnwindSafe for MenuItemBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.