Animatable
struct · ferroui-base · v0.5.0
struct Animatable
Base class for all animatable objects.
Members
TYPEto_refclock_propertytransitions_propertyconstructnewclockset_clocktransitionsset_transitionsenable_transitionsdisable_transitionstry_get_transition_instancetake_transition_interruption_statereport_transition_interruption_state
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Animatable>
Returns a strong reference to this object.
clock_property
fn clock_property() -> &'static StyledProperty<Option<Rc<dyn IClock>>>
Defines the Clock property.
transitions_property
fn transitions_property() -> &'static StyledProperty<Option<Transitions>>
Defines the Transitions property.
construct
fn construct() -> Self
Creates the class data; see FerroObject::construct.
new
fn new() -> Ref<Self>
clock
fn clock(self: &Self) -> Option<Rc<dyn IClock>>
The clock which controls the animations and transitions on the object and, by inheritance, on its descendants. The global clock is used when there is none.
set_clock
fn set_clock(self: &Self, value: Option<Rc<dyn IClock>>)
transitions
fn transitions(self: &Self) -> Option<Transitions>
The property transitions of the object.
set_transitions
fn set_transitions(self: &Self, value: Option<Transitions>)
enable_transitions
fn enable_transitions(self: &Self)
Enables transitions for the object.
This is called when the object is attached to the visual tree, so that transitions do not run on its initial property values.
disable_transitions
fn disable_transitions(self: &Self)
Disables transitions for the object.
This is called when the object is detached from the visual tree.
try_get_transition_instance
fn try_get_transition_instance(self: &Self, transition: &Rc<dyn ITransition>) -> Option<Rc<TransitionInstance>>
The progress of the transition that transition is currently
running on this object: the instance created when the transition was
last applied. None when the transition is not one of the object's
transitions or has not been applied.
take_transition_interruption_state
fn take_transition_interruption_state<T: Any>(self: &Self) -> Option<Rc<T>>
Takes state left by the preceding application of the same transition on this object.
This is only available synchronously inside ITransition::apply. A spring transition
can retain its last sampled velocity here, without storing mutable animation state in
a transition definition that may be shared by several controls. Removal or visual-tree
detachment discards the state. Normal duration-based transitions do not use this hook.
report_transition_interruption_state
fn report_transition_interruption_state<T: Any>(self: &Self, state: Rc<T>)
Reports state to carry into the next application of this transition on this object.
Call only from ITransition::apply. The state may be updated by the running animation,
but must not strongly own the target object. Outside a transition application this has
no effect. Store zero velocity when an animation completes or is accessibility-canceled.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeFerroObjectImplExtClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDerefUpcast<T>Upcast<Animatable>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.