FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Animation

    struct · ferroui-base · v0.5.0

    struct Animation
    

    Tracks the progress of an animation.

    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<Animation>
    

    Returns a strong reference to this object.

    Source

    duration_property

    fn duration_property() -> &'static DirectProperty<Animation, SignedDuration>
    

    Defines the Duration property: the active time of one iteration.

    Source

    duration

    fn duration(self: &Self) -> SignedDuration
    

    Source

    set_duration

    fn set_duration(self: &Self, value: SignedDuration)
    

    Source

    iteration_count_property

    fn iteration_count_property() -> &'static DirectProperty<Animation, IterationCount>
    

    Defines the IterationCount property: the repeat count.

    Source

    iteration_count

    fn iteration_count(self: &Self) -> IterationCount
    

    Source

    set_iteration_count

    fn set_iteration_count(self: &Self, value: IterationCount)
    

    Source

    playback_direction_property

    fn playback_direction_property() -> &'static DirectProperty<Animation, PlaybackDirection>
    

    Defines the PlaybackDirection property.

    Source

    playback_direction

    fn playback_direction(self: &Self) -> PlaybackDirection
    

    Source

    set_playback_direction

    fn set_playback_direction(self: &Self, value: PlaybackDirection)
    

    Source

    playback_behavior_property

    fn playback_behavior_property() -> &'static DirectProperty<Animation, PlaybackBehavior>
    

    Defines the PlaybackBehavior property: whether the animation pauses when its target is not effectively visible.

    Source

    playback_behavior

    fn playback_behavior(self: &Self) -> PlaybackBehavior
    

    Source

    set_playback_behavior

    fn set_playback_behavior(self: &Self, value: PlaybackBehavior)
    

    Source

    fill_mode_property

    fn fill_mode_property() -> &'static DirectProperty<Animation, FillMode>
    

    Defines the FillMode property: the value fill mode.

    Source

    fill_mode

    fn fill_mode(self: &Self) -> FillMode
    

    Source

    set_fill_mode

    fn set_fill_mode(self: &Self, value: FillMode)
    

    Source

    delay_property

    fn delay_property() -> &'static DirectProperty<Animation, SignedDuration>
    

    Defines the Delay property: the initial delay time.

    Source

    delay

    fn delay(self: &Self) -> SignedDuration
    

    Source

    set_delay

    fn set_delay(self: &Self, value: SignedDuration)
    

    Source

    delay_between_iterations_property

    fn delay_between_iterations_property() -> &'static DirectProperty<Animation, SignedDuration>
    

    Defines the DelayBetweenIterations property.

    Source

    delay_between_iterations

    fn delay_between_iterations(self: &Self) -> SignedDuration
    

    Source

    set_delay_between_iterations

    fn set_delay_between_iterations(self: &Self, value: SignedDuration)
    

    Source

    easing_property

    fn easing_property() -> &'static DirectProperty<Animation, Easing>
    

    Defines the Easing property: the easing function to be used.

    Source

    speed_ratio_property

    fn speed_ratio_property() -> &'static DirectProperty<Animation, f64>
    

    Defines the SpeedRatio property: the speed multiple.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    easing

    fn easing(self: &Self) -> Easing
    

    The easing function to be used for this animation.

    Source

    set_easing

    fn set_easing(self: &Self, value: impl Into<Easing>)
    

    Source

    speed_ratio

    fn speed_ratio(self: &Self) -> f64
    

    The speed multiple for this animation.

    Source

    set_speed_ratio

    fn set_speed_ratio(self: &Self, value: f64)
    

    Source

    children

    fn children(self: &Self) -> KeyFrames
    

    The children of the animation: its key frames.

    Source

    apply

    fn apply(self: &Self, control: &Animatable, clock: Option<Rc<dyn IClock>>, match_: Rc<dyn IObservable<bool>>, on_complete: Option<Rc<dyn Fn() -> ()>>, is_manually_started: bool) -> Rc<dyn IDisposable>
    

    Applies the animation to control: it runs while match_ is true, on clock (or on the control's clock, or on the global clock). on_complete runs when the animation ends by itself. is_manually_started tells an animation started by code from one started by a style. Disposing the result removes the animation.

    Source

    apply_for_preview

    fn apply_for_preview(self: &Self, control: &Animatable, clock: Option<Rc<dyn IClock>>, on_complete: Option<Rc<dyn Fn() -> ()>>) -> Rc<dyn IDisposable>
    

    Applies an isolated snapshot using the framework animators, retaining final fill and automatically created transforms at animation priority. Disposing the result restores the control's underlying values and bindings, including after completion. This is intended for interactive authoring and inspection; ordinary apply retains its application semantics, including committing forward fill to a local value.

    Source

    run_async

    fn run_async(self: &Self, control: &Animatable, cancellation_token: CancellationToken) -> AnimationTask
    

    Starts the animation on control and returns a task that completes when it has ended or cancellation_token was cancelled.

    Source

    run_async_with_clock

    fn run_async_with_clock(self: &Self, control: &Animatable, clock: Option<Rc<dyn IClock>>, cancellation_token: CancellationToken) -> AnimationTask
    

    run_async on an explicit clock.

    Source

    set_animator

    fn set_animator(setter: &Rc<dyn IAnimationSetter>, value: Rc<dyn ICustomAnimator>)
    

    Sets the value of the Animator attached property for a setter: the custom animator that animates the setter's property instead of the one selected by the property's type.

    Source

    register_custom_animator

    fn register_custom_animator<TAnimator: InterpolatingAnimator + Default>()
    

    Registers a user-provided animator for properties of its value type. It takes precedence over the animators registered before it.

    Source

    Trait implementations

    Availability

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