iced_core::widget::operation::scrollable

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,
    );
}
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§