pub struct ButtonGroupAction<State: 'static> { /* private fields */ }Expand description
A declarative description of one member — M3EButtonGroupAction
(models/m3e_button_group_action.dart:12).
Built with button_group_action (labelled) or
button_group_icon_action (icon-only); the reference’s
icon != null || label != null assertion is a constructor choice here
rather than a runtime check.
Implementations§
Source§impl<State: 'static> ButtonGroupAction<State>
impl<State: 'static> ButtonGroupAction<State>
Sourcepub fn icon<F: Fn() -> AnyView<State> + 'static>(self, icon: F) -> Self
pub fn icon<F: Fn() -> AnyView<State> + 'static>(self, icon: F) -> Self
The icon shown while unchecked (and while checked too, unless
Self::checked_icon is set).
Sourcepub fn checked_icon<F: Fn() -> AnyView<State> + 'static>(self, icon: F) -> Self
pub fn checked_icon<F: Fn() -> AnyView<State> + 'static>(self, icon: F) -> Self
The icon shown while checked. Falls back to Self::icon when unset.
Sourcepub fn label(self, label: impl Into<String>) -> Self
pub fn label(self, label: impl Into<String>) -> Self
The label shown while unchecked (and while checked too, unless
Self::checked_label is set).
Sourcepub fn checked_label(self, label: impl Into<String>) -> Self
pub fn checked_label(self, label: impl Into<String>) -> Self
The label shown while checked. Falls back to Self::label when unset.
Sourcepub fn checked(self, checked: bool) -> Self
pub fn checked(self, checked: bool) -> Self
The uncontrolled checked flag: consulted only when the group wires
neither a selected index nor a selected-index set (the third arm of
_resolveToggleActionSelected).
Auto Trait Implementations§
impl<State> !RefUnwindSafe for ButtonGroupAction<State>
impl<State> !Send for ButtonGroupAction<State>
impl<State> !Sync for ButtonGroupAction<State>
impl<State> !UnwindSafe for ButtonGroupAction<State>
impl<State> Freeze for ButtonGroupAction<State>
impl<State> Unpin for ButtonGroupAction<State>
impl<State> UnsafeUnpin for ButtonGroupAction<State>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.