pub struct WidgetAnimator<const TRACKS: usize, const BINDINGS: usize> { /* private fields */ }Implementations§
Source§impl<const TRACKS: usize, const BINDINGS: usize> WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> WidgetAnimator<TRACKS, BINDINGS>
pub const fn new() -> Self
pub fn set_callbacks(&mut self, callbacks: WidgetAnimationCallbacks)
pub fn animate_progress( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_meter( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_slider_value( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_slider_value_with_policy( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_scroll_offset_y( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_scroll_offset_y_with_policy( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_tab_selected( &mut self, widget_id: WidgetId, from: usize, to: usize, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_dropdown_selected( &mut self, widget_id: WidgetId, from: usize, to: usize, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_roller_selected( &mut self, widget_id: WidgetId, from: usize, to: usize, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_gauge_value( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_spinner_phase( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_x( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_x_with_policy( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_x_with_custom_interpolator( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, interpolator: fn(f32, f32, f32) -> f32, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_y( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_y_with_policy( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_y_with_custom_curve( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, curve: fn(f32) -> f32, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_width( &mut self, widget_id: WidgetId, from: u32, to: u32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_width_with_policy( &mut self, widget_id: WidgetId, from: u32, to: u32, duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_height( &mut self, widget_id: WidgetId, from: u32, to: u32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_height_with_policy( &mut self, widget_id: WidgetId, from: u32, to: u32, duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_opacity( &mut self, widget_id: WidgetId, from: u8, to: u8, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_opacity_with_policy( &mut self, widget_id: WidgetId, from: u8, to: u8, duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_opacity_with_custom_interpolator( &mut self, widget_id: WidgetId, from: u8, to: u8, duration_ms: u32, easing: Easing, interpolator: fn(f32, f32, f32) -> f32, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_widget_keyframes( &mut self, widget_id: WidgetId, initial: WidgetKeyframeState, keyframes: &[WidgetPropertyKeyframe], policy: AnimationConflictPolicy, ) -> Result<usize, WidgetAnimationError>
pub fn pulse_opacity( &mut self, widget_id: WidgetId, low: u8, high: u8, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn ping_pong_progress( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_corner_radius( &mut self, widget_id: WidgetId, from: u8, to: u8, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>
pub fn animate_accent_color( &mut self, widget_id: WidgetId, from: Rgb565, to: Rgb565, duration_ms: u32, easing: Easing, ) -> Result<[AnimationId; 3], WidgetAnimationError>
pub fn animate_widget_path( &mut self, widget_id: WidgetId, points: &[PathPoint], duration_ms: u32, easing: Easing, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>
pub fn animate_widget_path_with_policy( &mut self, widget_id: WidgetId, points: &[PathPoint], duration_ms: u32, easing: Easing, policy: AnimationConflictPolicy, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>
pub fn stagger_widget_x( &mut self, widget_ids: &[WidgetId], from: i32, to: i32, duration_ms: u32, stagger_ms: u32, easing: Easing, ) -> Result<usize, WidgetAnimationError>
pub fn preset_fade_in_up( &mut self, widget_id: WidgetId, from_y: i32, to_y: i32, duration_ms: u32, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>
pub fn preset_attention_shake( &mut self, widget_id: WidgetId, base_x: i32, amplitude: i32, duration_ms: u32, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>
pub fn preset_selection_bump_settle( &mut self, widget_id: WidgetId, base_y: i32, bump_px: i32, duration_ms: u32, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>
pub fn bind_property_with_policy( &mut self, widget_id: WidgetId, property: AnimatedProperty, animation: Animation, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>
pub fn bind_property( &mut self, widget_id: WidgetId, property: AnimatedProperty, animation: Animation, ) -> Result<AnimationId, WidgetAnimationError>
pub fn stop(&mut self, animation_id: AnimationId) -> bool
pub fn stop_widget(&mut self, widget_id: WidgetId) -> usize
pub fn stop_widget_property( &mut self, widget_id: WidgetId, property: AnimatedProperty, ) -> usize
pub fn is_animating_widget(&self, widget_id: WidgetId) -> bool
pub fn is_animating_widget_property( &self, widget_id: WidgetId, property: AnimatedProperty, ) -> bool
pub fn handles_for_widget<const M: usize>( &self, widget_id: WidgetId, out: &mut Vec<AnimationId, M>, ) -> usize
pub fn active_bindings<const M: usize>( &self, out: &mut Vec<BindingSnapshot, M>, ) -> usize
pub fn tick<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize>( &mut self, dt_ms: u32, gui: &mut GuiContext<'a, NODES, EVENTS, DIRTY>, ) -> Result<(), GuiError>
pub fn active_count(&self) -> usize
Trait Implementations§
Source§impl<const TRACKS: usize, const BINDINGS: usize> Clone for WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> Clone for WidgetAnimator<TRACKS, BINDINGS>
Source§fn clone(&self) -> WidgetAnimator<TRACKS, BINDINGS>
fn clone(&self) -> WidgetAnimator<TRACKS, BINDINGS>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const TRACKS: usize, const BINDINGS: usize> Copy for WidgetAnimator<TRACKS, BINDINGS>
Auto Trait Implementations§
impl<const TRACKS: usize, const BINDINGS: usize> Freeze for WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> RefUnwindSafe for WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> Send for WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> Sync for WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> Unpin for WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> UnsafeUnpin for WidgetAnimator<TRACKS, BINDINGS>
impl<const TRACKS: usize, const BINDINGS: usize> UnwindSafe for WidgetAnimator<TRACKS, BINDINGS>
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.