[][src]Struct gravitas::Scroll

pub struct Scroll { /* fields omitted */ }

a combination of friction and springs to create a touch-driven scrolling simulation.

Gravitas JavaScript example of the scrolling simulation.

Methods

impl Scroll[src]

pub fn new(extent: f32) -> Scroll[src]

Create a new scroll simulation which allows scrolls between 0 and the given extent.

pub fn set(&mut self, x: f32, v: f32)[src]

Start a gesture-based scroll from the scroll position x with velocity v.

pub fn extent(&self) -> f32[src]

Return the maximum extent which can be scrolled to.

Trait Implementations

impl Simulation for Scroll[src]

impl Clone for Scroll[src]

impl Copy for Scroll[src]

Auto Trait Implementations

impl Send for Scroll

impl Sync for Scroll

impl Unpin for Scroll

impl UnwindSafe for Scroll

impl RefUnwindSafe for Scroll

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]