pub struct AnimationState { /* private fields */ }Expand description
Manages multiple animated values by widget ID
Implementations§
Source§impl AnimationState
impl AnimationState
Sourcepub fn set_default_duration(&mut self, duration: f64)
pub fn set_default_duration(&mut self, duration: f64)
Set default animation duration
Sourcepub fn set_default_easing(&mut self, easing: EasingFn)
pub fn set_default_easing(&mut self, easing: EasingFn)
Set default easing function
Sourcepub fn animate_value(&mut self, id: &WidgetId, target: f64, time: f64) -> f64
pub fn animate_value(&mut self, id: &WidgetId, target: f64, time: f64) -> f64
Animate a value and return current interpolated value
Sourcepub fn animate_bool(&mut self, id: &WidgetId, target: bool, time: f64) -> f64
pub fn animate_bool(&mut self, id: &WidgetId, target: bool, time: f64) -> f64
Animate a boolean value (0.0 = false, 1.0 = true)
Sourcepub fn is_animating(&self, id: &WidgetId, time: f64) -> bool
pub fn is_animating(&self, id: &WidgetId, time: f64) -> bool
Check if a specific widget has an active animation
Sourcepub fn any_animating(&self, time: f64) -> bool
pub fn any_animating(&self, time: f64) -> bool
Check if any animation is in progress
Trait Implementations§
Source§impl Clone for AnimationState
impl Clone for AnimationState
Source§fn clone(&self) -> AnimationState
fn clone(&self) -> AnimationState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnimationState
impl Debug for AnimationState
Auto Trait Implementations§
impl Freeze for AnimationState
impl RefUnwindSafe for AnimationState
impl Send for AnimationState
impl Sync for AnimationState
impl Unpin for AnimationState
impl UnsafeUnpin for AnimationState
impl UnwindSafe for AnimationState
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