#[repr(C)]pub struct SystemAnimations {
pub caret_tween: CaretTweenCallback,
pub selection_tween: SelectionTweenCallback,
pub caret_tween_data: RefAny,
pub selection_tween_data: RefAny,
pub scroll_physics: OptionScrollPhysics,
pub caret_tween_duration_ms: u32,
pub selection_tween_duration_ms: u32,
pub focus_ring_duration_ms: u32,
pub caret_scroll_glide: bool,
}Expand description
Configuration of the SYSTEM-driven animations: physics-based scrolling
and the caret / selection tweens. Lives on AppConfig so a platform or
application can tune the feel without rebuilding azul.
The scroll physics override is applied ON TOP of the platform-discovered
SystemStyle at App::create time (None keeps the per-platform
preset). The tween slots always apply; set a duration to 0 to disable
that tween (the caret / selection then jumps, the classic behavior).
Fields§
§caret_tween: CaretTweenCallbackThe caret tween MATH: called every animation frame with the past /
current caret rectangles and linear progress t; returns the
rectangle to render. Default: ease-out cubic lerp.
selection_tween: SelectionTweenCallbackThe selection tween MATH: called every animation frame with the
past / current selection band rectangles and linear progress t;
returns the rectangles to render (must match the current count).
Default: ease-out cubic lerp, rectangles paired by index.
caret_tween_data: RefAnyUser data passed to caret_tween on every invocation.
selection_tween_data: RefAnyUser data passed to selection_tween on every invocation.
scroll_physics: OptionScrollPhysicsOverrides SystemStyle.scroll_physics (momentum, overscroll /
rubber-band, wheel-vs-trackpad curves). None = platform default.
caret_tween_duration_ms: u32Duration of the caret-move tween in ms. 0 disables the tween.
While the tween runs, caret blinking is suppressed (caret stays
solid while it moves).
selection_tween_duration_ms: u32Duration of the selection tween in ms. 0 disables the tween.
focus_ring_duration_ms: u32Focus-ring glide duration in ms (ledger #29). 0 (the DEFAULT)
disables the ring entirely — no visual change for existing apps;
an app that opts in gets a focus outline that GLIDES between
focused elements using the caret_tween interpolator (the ring is
suppressed while a text-editing session owns focus — there the
caret is the indicator).
caret_scroll_glide: boolWhether “scroll the caret into view” glides via the scroll-physics
spring (true, the Word feel) or jumps instantly (false — also what
Self::disabled sets, keeping e2e screenshots deterministic).
Implementations§
Trait Implementations§
Source§impl Clone for SystemAnimations
impl Clone for SystemAnimations
Source§fn clone(&self) -> SystemAnimations
fn clone(&self) -> SystemAnimations
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more