Skip to main content

HasScrollData

Trait HasScrollData 

Source
pub trait HasScrollData: Any {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn scroll_top(&self) -> f64;
    fn scroll_left(&self) -> f64;
    fn scroll_width(&self) -> i32;
    fn scroll_height(&self) -> i32;
    fn client_width(&self) -> i32;
    fn client_height(&self) -> i32;
}

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Return self as Any

Source

fn scroll_top(&self) -> f64

Get the vertical scroll position

Source

fn scroll_left(&self) -> f64

Get the horizontal scroll position

Source

fn scroll_width(&self) -> i32

Get the total scrollable width

Source

fn scroll_height(&self) -> i32

Get the total scrollable height

Source

fn client_width(&self) -> i32

Get the viewport width

Source

fn client_height(&self) -> i32

Get the viewport height

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl HasScrollData for SerializedScrollData

Available on crate feature serialize only.