FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IAnimation

    trait · ferroui-base · v0.5.0

    trait IAnimation: 'static
    

    Interface for animation objects.

    View source

    Members

    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 the specified control: it runs while match_ is true. on_complete runs when it 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

    run_async

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

    Runs the animation on the specified control. The result completes when the animation has ended or was cancelled.

    Source

    as_object

    fn as_object(self: &Self) -> Option<crate::Ref<crate::FerroObject>>
    

    The object of the object model that implements the contract, if one does: the equivalent of is/as on the interface. Cast the object to the class looked for (as_object()?.cast::<T>()).

    Source

    Availability

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