pub struct ByteAnimator { /* private fields */ }Expand description
Animator that handles u8 properties.
Implementations§
Trait Implementations§
Source§impl Animator for ByteAnimator
impl Animator for ByteAnimator
Source§type Value = u8
type Value = u8
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 interpolate(&self, progress: f64, old_value: &u8, new_value: &u8) -> u8
fn interpolate(&self, progress: f64, old_value: &u8, new_value: &u8) -> u8
Interpolates between two values using the specified progress.
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.
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.Auto Trait Implementations§
impl !Freeze for ByteAnimator
impl !RefUnwindSafe for ByteAnimator
impl !Send for ByteAnimator
impl !Sync for ByteAnimator
impl !UnwindSafe for ByteAnimator
impl Unpin for ByteAnimator
impl UnsafeUnpin for ByteAnimator
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.