[][src]Struct azul_core::window::ScrollState

pub struct ScrollState {
    pub scroll_position: LayoutPoint,
    pub used_this_frame: bool,
}

Fields

scroll_position: LayoutPoint

Amount in pixel that the current node is scrolled

used_this_frame: bool

Was the scroll amount used in this frame?

Implementations

impl ScrollState[src]

pub fn get(&self) -> LayoutPoint[src]

Return the current position of the scroll state

pub fn add(&mut self, x: f32, y: f32, child_rect: &LayoutRect)[src]

Add a scroll X / Y onto the existing scroll state

pub fn set(&mut self, x: f32, y: f32, child_rect: &LayoutRect)[src]

Set the scroll state to a new position

pub fn get_and_mark_as_used(&mut self) -> LayoutPoint[src]

Returns the scroll position and also set the "used_this_frame" flag

Trait Implementations

impl Clone for ScrollState[src]

impl Copy for ScrollState[src]

impl Debug for ScrollState[src]

impl Default for ScrollState[src]

impl PartialEq<ScrollState> for ScrollState[src]

impl PartialOrd<ScrollState> for ScrollState[src]

impl StructuralPartialEq for ScrollState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.