Skip to main content

ScrollHandleOffsetable

Trait ScrollHandleOffsetable 

Source
pub trait ScrollHandleOffsetable {
    // Required methods
    fn offset(&self) -> Point<Pixels>;
    fn set_offset(&self, offset: Point<Pixels>);
    fn content_size(&self) -> Size<Pixels>;
}
Expand description

Trait for types that can be used as scroll handles with offset tracking

Required Methods§

Source

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

Get the current scroll offset

Source

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

Set the scroll offset

Source

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

Get the full content size

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§