Struct scroll_controller::ScrollController[][src]

pub struct ScrollController {
    pub offset: [f64; 2],
    pub bounds: [f64; 4],
    pub area: [f64; 2],
    pub speed: f64,
    // some fields omitted
}

Stores information for scrolling.

Fields

The offset of visible area.

Visible bounds.

The size of the scrollable area.

The scroll speed.

Methods

impl ScrollController
[src]

Creates a new ScrollController.

Returns the visible rectangle that intersects with the area. This is used to find what part of the area the user is looking at.

Transform a rectangle from area coordinates to view.

Handles event.

Trait Implementations

impl Clone for ScrollController
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for ScrollController
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations