[−][src]Struct scroll_controller::ScrollController
Stores information for scrolling.
Fields
offset: [f64; 2]
The offset of visible area.
bounds: [f64; 4]
Visible bounds.
area: [f64; 2]
The size of the scrollable area.
speed: f64
The scroll speed.
Methods
impl ScrollController
[src]
pub fn new(
bounds: [f64; 4],
area: [f64; 2],
settings: &ScrollSettings
) -> ScrollController
[src]
bounds: [f64; 4],
area: [f64; 2],
settings: &ScrollSettings
) -> ScrollController
Creates a new ScrollController
.
pub fn visible_area_rect(&self) -> [f64; 4]
[src]
Returns the visible rectangle that intersects with the area. This is used to find what part of the area the user is looking at.
pub fn rect_from_area_to_view(&self, rect: [f64; 4]) -> [f64; 4]
[src]
Transform a rectangle from area coordinates to view.
pub fn event<E: GenericEvent>(&mut self, e: &E)
[src]
Handles event.
Trait Implementations
impl Clone for ScrollController
[src]
fn clone(&self) -> ScrollController
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ScrollController
[src]
Auto Trait Implementations
impl Send for ScrollController
impl Sync for ScrollController
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,