ToggleButton
struct · ferroui-controls · v0.5.0
struct ToggleButton
Represents a control that a user can select (check) or clear (uncheck). Base class for controls that can switch states.
Members
TYPEto_reftoggleon_is_checked_changedPSEUDO_CLASSESis_checked_propertyis_three_state_propertyis_checked_changed_eventconstructnewis_checked_changedis_checkedset_is_checkedis_three_stateset_is_three_state
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ToggleButton>
Returns a strong reference to this object.
toggle
fn toggle(self: &Self)
Toggles the IsChecked property.
on_is_checked_changed
fn on_is_checked_changed(self: &Self, e: &RoutedEventArgs)
Called when IsChecked changes. e are the event arguments for
the routed event that is raised by the default implementation of
this method.
PSEUDO_CLASSES
const PSEUDO_CLASSES: PseudoClassesAttribute
The pseudoclasses set by the class.
is_checked_property
fn is_checked_property() -> &'static StyledProperty<Option<bool>>
Defines the IsChecked property.
is_three_state_property
fn is_three_state_property() -> &'static StyledProperty<bool>
Defines the IsThreeState property.
is_checked_changed_event
fn is_checked_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the IsCheckedChanged event.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a toggle button.
is_checked_changed
fn is_checked_changed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Raised when the IsChecked property value changes.
is_checked
fn is_checked(self: &Self) -> Option<bool>
Whether the toggle button is checked; None is the indeterminate
state.
set_is_checked
fn set_is_checked(self: &Self, value: Option<bool>)
is_three_state
fn is_three_state(self: &Self) -> bool
A value that indicates whether the control supports three states.
set_is_three_state
fn set_is_three_state(self: &Self, value: bool)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtToggleButtonImplExtContentControlImplExtControlImplExtButtonImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<ToggleButton>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplVisualImplLayoutableImplInteractiveImplInputElementImplTemplatedControlImplContentControlImplControlImplFerroObjectImplButtonImplToggleButtonImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.