iced::advanced::widget::operation

Trait Scrollable

Source
pub trait Scrollable {
    // Required methods
    fn snap_to(&mut self, offset: RelativeOffset);
    fn scroll_to(&mut self, offset: AbsoluteOffset);
    fn scroll_by(
        &mut self,
        offset: AbsoluteOffset,
        bounds: Rectangle,
        content_bounds: Rectangle,
    );
}
Available on crate feature advanced only.
Expand description

The internal state of a widget that can be scrolled.

Required Methods§

Source

fn snap_to(&mut self, offset: RelativeOffset)

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

Source

fn scroll_to(&mut self, offset: AbsoluteOffset)

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

Source

fn scroll_by( &mut self, offset: AbsoluteOffset, bounds: Rectangle, content_bounds: Rectangle, )

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

Implementors§