Skip to main content

EffectAnimator

Struct EffectAnimator 

Source
pub struct EffectAnimator { /* private fields */ }
Expand description

Animator that handles all animations on properties with an effect as their type: redirects them to the animator for the kind of effects in the key frames.

Implementations§

Source§

impl EffectAnimator

Source

pub fn new() -> Self

Source

pub fn ensure_registered()

The effect animator is part of the default animator registrations; there is nothing to do to make it available.

Trait Implementations§

Source§

impl Animator for EffectAnimator

Source§

fn interpolate( &self, progress: f64, old_value: &Option<Rc<dyn IEffect>>, new_value: &Option<Rc<dyn IEffect>>, ) -> Option<Rc<dyn IEffect>>

Fallback implementation of effect animation.

Source§

type Value = Option<Rc<dyn IEffect>>

The type of the values the animator produces, which is the value type of the properties it animates.
Source§

fn base(&self) -> &AnimatorBase

The key frames and the target property.
Source§

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

Applies the animation to control: it runs while match_ is true.
Source§

fn typed_value(&self, untyped: &dyn AnyValue) -> Option<Self::Value>

Reads a key frame value; None when it is not a value this animator can animate, in which case the neutral value is used in its place.
Source§

fn validate(&self, _item: &Ref<AnimatorKeyFrame>)

Validates a key frame that is being added. Panics to reject it.
Source§

fn bind_animation( &self, control: &Animatable, instance: Rc<dyn IObservable<Self::Value>>, ) -> Rc<dyn IDisposable>

Binds the values a running animation produces to the target property of the control, at animation priority.
Source§

impl Default for EffectAnimator

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A> IAnimator for A
where A: Animator,

Source§

fn property(&self) -> Option<&'static FerroProperty>

The target property.
Source§

fn set_property(&self, value: Option<&'static FerroProperty>)

Source§

fn count(&self) -> usize

The number of key frames.
Source§

fn get(&self, index: usize) -> Ref<AnimatorKeyFrame>

The key frame at index. Panics when out of range.
Source§

fn add(&self, item: Ref<AnimatorKeyFrame>)

Adds a key frame. Key frames are expected in cue order.
Source§

fn animator_type(&self) -> TypeId

The type of the animator, by which key frames find their animator.
Source§

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

Applies the animation to a control: the animation runs while match_ is true.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.