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
impl EffectAnimator
pub fn new() -> Self
Sourcepub fn ensure_registered()
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
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>>
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>>
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
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>>
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>
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>)
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>
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.
Auto Trait Implementations§
impl !Freeze for EffectAnimator
impl !RefUnwindSafe for EffectAnimator
impl !Send for EffectAnimator
impl !Sync for EffectAnimator
impl !UnwindSafe for EffectAnimator
impl Unpin for EffectAnimator
impl UnsafeUnpin for EffectAnimator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
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 moreSource§impl<A> IAnimator for Awhere
A: Animator,
impl<A> IAnimator for Awhere
A: Animator,
Source§fn property(&self) -> Option<&'static FerroProperty>
fn property(&self) -> Option<&'static FerroProperty>
The target property.
fn set_property(&self, value: Option<&'static FerroProperty>)
Source§fn get(&self, index: usize) -> Ref<AnimatorKeyFrame>
fn get(&self, index: usize) -> Ref<AnimatorKeyFrame>
The key frame at
index. Panics when out of range.Source§fn add(&self, item: Ref<AnimatorKeyFrame>)
fn add(&self, item: Ref<AnimatorKeyFrame>)
Adds a key frame. Key frames are expected in cue order.
Source§fn animator_type(&self) -> TypeId
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>>
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.