SwitchCaseBehavior
struct · ferroui-xaml-interactions-custom · v0.5.0
struct SwitchCaseBehavior
A trigger that executes the actions of the first of its cases (its content
in markup) whose value equals value, or its
default_actions when none does: once when it is initialized, then
in a job of the dispatcher after each change of the value.
While the trigger is in the logical tree its cases and its styled element default actions are its logical children (one way).
Members
TYPEto_refvalue_propertycases_propertydefault_actions_propertyconstructnewvalueset_switch_valuecasesset_casesdefault_actionsset_default_actions
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<SwitchCaseBehavior>
Returns a strong reference to this object.
value_property
fn value_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the Value property.
cases_property
fn cases_property() -> &'static StyledProperty<Option<CaseCollection>>
Identifies the Cases property.
default_actions_property
fn default_actions_property() -> &'static StyledProperty<Option<ActionCollection>>
Identifies the DefaultActions property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a trigger.
value
fn value(self: &Self) -> Option<BoxedValue>
Gets or sets the value compared with the values of the cases. This is a property of the object model.
set_switch_value
fn set_switch_value(self: &Self, value: Option<BoxedValue>)
Sets the value compared with the values of the cases (named apart from the setter of every property of the object, as the condition of the object model names its own).
cases
fn cases(self: &Self) -> Option<CaseCollection>
Gets or sets the cases. This is a property of the object model.
set_cases
fn set_cases(self: &Self, value: Option<CaseCollection>)
default_actions
fn default_actions(self: &Self) -> Option<ActionCollection>
Gets or sets the actions executed when no case matches. This is a property of the object model.
set_default_actions
fn set_default_actions(self: &Self, value: Option<ActionCollection>)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherStyledElementBehaviorImplExtDerefUpcast<T>Upcast<SwitchCaseBehavior>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplStyledElementBehaviorImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.