[][src]Struct azul_core::window::ScrollStates

pub struct ScrollStates(pub FastHashMap<ExternalScrollId, ScrollState>);

Implementations

impl ScrollStates[src]

pub fn new() -> ScrollStates[src]

#[must_use]pub fn get_scroll_position(
    &self,
    scroll_id: &ExternalScrollId
) -> Option<LayoutPoint>
[src]

pub fn set_scroll_position(
    &mut self,
    node: &OverflowingScrollNode,
    scroll_position: LayoutPoint
)
[src]

Set the scroll amount - does not update the entry.used_this_frame, since that is only relevant when we are actually querying the renderer.

#[must_use]pub fn get_scroll_position_and_mark_as_used(
    &mut self,
    scroll_id: &ExternalScrollId
) -> Option<LayoutPoint>
[src]

NOTE: This has to be a getter, because we need to update

pub fn scroll_node(
    &mut self,
    node: &OverflowingScrollNode,
    scroll_by_x: f32,
    scroll_by_y: f32
)
[src]

Updating (add to) the existing scroll amount does not update the entry.used_this_frame, since that is only relevant when we are actually querying the renderer.

pub fn remove_unused_scroll_states(&mut self)[src]

Removes all scroll states that weren't used in the last frame

Trait Implementations

impl Debug for ScrollStates[src]

impl Default for ScrollStates[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, 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.