ToggleSwitch
struct · ferroui-controls · v0.5.0
struct ToggleSwitch
A toggle switch control.
Members
TYPEto_refoff_content_propertyoff_content_template_propertyon_content_propertyon_content_template_propertyknob_transitions_propertyconstructnewon_contentset_on_contentoff_contentset_off_contentoff_content_presenteron_content_presenteroff_content_templateset_off_content_templateon_content_templateset_on_content_templateknob_transitionsset_knob_transitions
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ToggleSwitch>
Returns a strong reference to this object.
off_content_property
fn off_content_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the OffContent property.
off_content_template_property
fn off_content_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
Defines the OffContentTemplate property.
on_content_property
fn on_content_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the OnContent property.
on_content_template_property
fn on_content_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
Defines the OnContentTemplate property.
knob_transitions_property
fn knob_transitions_property() -> &'static StyledProperty<Option<Transitions>>
Defines the KnobTransitions property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
on_content
fn on_content(self: &Self) -> Option<BoxedValue>
The content that is displayed when in the on state.
set_on_content
fn set_on_content(self: &Self, value: Option<BoxedValue>)
off_content
fn off_content(self: &Self) -> Option<BoxedValue>
The content that is displayed when in the off state.
set_off_content
fn set_off_content(self: &Self, value: Option<BoxedValue>)
off_content_presenter
fn off_content_presenter(self: &Self) -> Option<Ref<ContentPresenter>>
The presenter of the off content from the control's template.
on_content_presenter
fn on_content_presenter(self: &Self) -> Option<Ref<ContentPresenter>>
The presenter of the on content from the control's template.
off_content_template
fn off_content_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
The data template used to display the off content.
set_off_content_template
fn set_off_content_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
on_content_template
fn on_content_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
The data template used to display the on content.
set_on_content_template
fn set_on_content_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
knob_transitions
fn knob_transitions(self: &Self) -> Option<Transitions>
The transitions of the switching knob.
set_knob_transitions
fn set_knob_transitions(self: &Self, value: Option<Transitions>)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtToggleButtonImplExtContentControlImplExtControlImplExtButtonImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<ToggleSwitch>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplVisualImplLayoutableImplInteractiveImplInputElementImplButtonImplToggleButtonImplControlImplTemplatedControlImplContentControlImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.