Skip to main content

ScrollbarHandle

Trait ScrollbarHandle 

Source
pub trait ScrollbarHandle: 'static {
    // Required methods
    fn offset(&self) -> Point<Pixels>;
    fn set_offset(&self, offset: Point<Pixels>);
    fn content_size(&self) -> Size<Pixels>;

    // Provided methods
    fn start_drag(&self) { ... }
    fn end_drag(&self) { ... }
}
Expand description

A trait for scroll handles that can get and set offset.

Required Methods§

Source

fn offset(&self) -> Point<Pixels>

Get the current offset of the scroll handle.

Source

fn set_offset(&self, offset: Point<Pixels>)

Set the offset of the scroll handle.

Source

fn content_size(&self) -> Size<Pixels>

The full size of the content, including padding.

Provided Methods§

Source

fn start_drag(&self)

Called when start dragging the scrollbar thumb.

Source

fn end_drag(&self)

Called when end dragging the scrollbar thumb.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ScrollbarHandle for ListState

Source§

impl ScrollbarHandle for ScrollHandle

Source§

impl ScrollbarHandle for UniformListScrollHandle

Implementors§