FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Animatable

    struct · ferroui-base · v0.5.0

    struct Animatable
    

    Base class for all animatable objects.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Animatable>
    

    Returns a strong reference to this object.

    Source

    clock_property

    fn clock_property() -> &'static StyledProperty<Option<Rc<dyn IClock>>>
    

    Defines the Clock property.

    Source

    transitions_property

    fn transitions_property() -> &'static StyledProperty<Option<Transitions>>
    

    Defines the Transitions property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    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.

    Source

    set_clock

    fn set_clock(self: &Self, value: Option<Rc<dyn IClock>>)
    

    Source

    transitions

    fn transitions(self: &Self) -> Option<Transitions>
    

    The property transitions of the object.

    Source

    set_transitions

    fn set_transitions(self: &Self, value: Option<Transitions>)
    

    Source

    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.

    Source

    disable_transitions

    fn disable_transitions(self: &Self)
    

    Disables transitions for the object.

    This is called when the object is detached from the visual tree.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.