Skip to main content

Scrollable

Trait Scrollable 

pub trait Scrollable {
    // Required methods
    fn snap_to(
        &mut self,
        offset: RelativeOffset<Option<f32>>,
        animation: Animation,
        bounds: Rectangle,
        content: Size,
    );
    fn scroll_to(
        &mut self,
        offset: AbsoluteOffset<Option<f32>>,
        animation: Animation,
        bounds: Rectangle,
        content: Size,
    );
    fn scroll_by(
        &mut self,
        offset: AbsoluteOffset,
        animation: Animation,
        bounds: Rectangle,
        content: Size,
    );
}
Available on crate feature advanced only.
Expand description

The internal state of a widget that can be scrolled.

Required Methods§

fn snap_to( &mut self, offset: RelativeOffset<Option<f32>>, animation: Animation, bounds: Rectangle, content: Size, )

Snaps the scroll of the widget to the given percentage along the horizontal & vertical axis.

fn scroll_to( &mut self, offset: AbsoluteOffset<Option<f32>>, animation: Animation, bounds: Rectangle, content: Size, )

Scroll the widget to the given AbsoluteOffset along the horizontal & vertical axis.

fn scroll_by( &mut self, offset: AbsoluteOffset, animation: Animation, bounds: Rectangle, content: Size, )

Scroll the widget by the given AbsoluteOffset along the horizontal & vertical axis.

Implementors§