pub struct ScrollPhysics {
pub offset: f32,
pub dragging: bool,
/* private fields */
}Fields§
§offset: f32§dragging: boolImplementations§
Source§impl ScrollPhysics
impl ScrollPhysics
pub fn begin(&mut self, y: f32, time: f64)
pub fn drag(&mut self, y: f32, time: f64, max: f32, viewport: f32)
pub fn release(&mut self, time: f64, reduced: bool)
pub fn cancel(&mut self)
Sourcepub fn scroll_to(
&mut self,
target: f32,
max: f32,
time: f64,
duration_s: f64,
reduced: bool,
)
pub fn scroll_to( &mut self, target: f32, max: f32, time: f64, duration_s: f64, reduced: bool, )
Smoothly animate offset to target (clamped to 0..=max) over duration_s
using Material’s Standard easing curve, or snap immediately under reduced.
Sourcepub fn finish_scroll_to(&mut self)
pub fn finish_scroll_to(&mut self)
Jump immediately to any active scroll_to destination, clearing the animation.
Sourcepub fn is_scrolling_to(&self) -> bool
pub fn is_scrolling_to(&self) -> bool
Whether a programmatic scroll_to animation is currently active.
pub fn touching(&self) -> bool
pub fn edge_stretch(&self) -> (f32, f32)
pub fn wheel(&mut self, delta: f32, max: f32, reduced: bool)
pub fn advance(&mut self, time: f64, max: f32, reduced: bool) -> bool
Trait Implementations§
Source§impl Clone for ScrollPhysics
impl Clone for ScrollPhysics
Source§impl Debug for ScrollPhysics
impl Debug for ScrollPhysics
Auto Trait Implementations§
impl Forget for ScrollPhysics
impl Freeze for ScrollPhysics
impl Move for ScrollPhysics
impl RefUnwindSafe for ScrollPhysics
impl Send for ScrollPhysics
impl Sync for ScrollPhysics
impl Unpin for ScrollPhysics
impl UnsafeUnpin for ScrollPhysics
impl UnwindSafe for ScrollPhysics
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