Skip to main content

WidgetAnimator

Struct WidgetAnimator 

Source
pub struct WidgetAnimator<const TRACKS: usize, const BINDINGS: usize> { /* private fields */ }

Implementations§

Source§

impl<const TRACKS: usize, const BINDINGS: usize> WidgetAnimator<TRACKS, BINDINGS>

Source

pub const fn new() -> Self

Source

pub fn set_callbacks(&mut self, callbacks: WidgetAnimationCallbacks)

Source

pub fn animate_progress( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_meter( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_slider_value( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

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>

Source

pub fn animate_scroll_offset_y( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

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>

Source

pub fn animate_tab_selected( &mut self, widget_id: WidgetId, from: usize, to: usize, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_dropdown_selected( &mut self, widget_id: WidgetId, from: usize, to: usize, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_roller_selected( &mut self, widget_id: WidgetId, from: usize, to: usize, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_gauge_value( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_spinner_phase( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_widget_x( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

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>

Source

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>

Source

pub fn animate_widget_y( &mut self, widget_id: WidgetId, from: i32, to: i32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

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>

Source

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>

Source

pub fn animate_widget_width( &mut self, widget_id: WidgetId, from: u32, to: u32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

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>

Source

pub fn animate_widget_height( &mut self, widget_id: WidgetId, from: u32, to: u32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

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>

Source

pub fn animate_opacity( &mut self, widget_id: WidgetId, from: u8, to: u8, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

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>

Source

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>

Source

pub fn animate_widget_keyframes( &mut self, widget_id: WidgetId, initial: WidgetKeyframeState, keyframes: &[WidgetPropertyKeyframe], policy: AnimationConflictPolicy, ) -> Result<usize, WidgetAnimationError>

Source

pub fn pulse_opacity( &mut self, widget_id: WidgetId, low: u8, high: u8, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn ping_pong_progress( &mut self, widget_id: WidgetId, from: f32, to: f32, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_corner_radius( &mut self, widget_id: WidgetId, from: u8, to: u8, duration_ms: u32, easing: Easing, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn animate_accent_color( &mut self, widget_id: WidgetId, from: Rgb565, to: Rgb565, duration_ms: u32, easing: Easing, ) -> Result<[AnimationId; 3], WidgetAnimationError>

Source

pub fn animate_widget_path( &mut self, widget_id: WidgetId, points: &[PathPoint], duration_ms: u32, easing: Easing, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>

Source

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>

Source

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>

Source

pub fn preset_fade_in_up( &mut self, widget_id: WidgetId, from_y: i32, to_y: i32, duration_ms: u32, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>

Source

pub fn preset_attention_shake( &mut self, widget_id: WidgetId, base_x: i32, amplitude: i32, duration_ms: u32, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>

Source

pub fn preset_selection_bump_settle( &mut self, widget_id: WidgetId, base_y: i32, bump_px: i32, duration_ms: u32, ) -> Result<(AnimationId, AnimationId), WidgetAnimationError>

Source

pub fn bind_property_with_policy( &mut self, widget_id: WidgetId, property: AnimatedProperty, animation: Animation, policy: AnimationConflictPolicy, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn bind_property( &mut self, widget_id: WidgetId, property: AnimatedProperty, animation: Animation, ) -> Result<AnimationId, WidgetAnimationError>

Source

pub fn stop(&mut self, animation_id: AnimationId) -> bool

Source

pub fn stop_widget(&mut self, widget_id: WidgetId) -> usize

Source

pub fn stop_widget_property( &mut self, widget_id: WidgetId, property: AnimatedProperty, ) -> usize

Source

pub fn is_animating_widget(&self, widget_id: WidgetId) -> bool

Source

pub fn is_animating_widget_property( &self, widget_id: WidgetId, property: AnimatedProperty, ) -> bool

Source

pub fn handles_for_widget<const M: usize>( &self, widget_id: WidgetId, out: &mut Vec<AnimationId, M>, ) -> usize

Source

pub fn active_bindings<const M: usize>( &self, out: &mut Vec<BindingSnapshot, M>, ) -> usize

Source

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>

Source

pub fn active_count(&self) -> usize

Trait Implementations§

Source§

impl<const TRACKS: usize, const BINDINGS: usize> Clone for WidgetAnimator<TRACKS, BINDINGS>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<const TRACKS: usize, const BINDINGS: usize> Copy for WidgetAnimator<TRACKS, BINDINGS>

Source§

impl<const TRACKS: usize, const BINDINGS: usize> Debug for WidgetAnimator<TRACKS, BINDINGS>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const TRACKS: usize, const BINDINGS: usize> Default for WidgetAnimator<TRACKS, BINDINGS>

Source§

fn default() -> Self

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

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.