pub struct ScrollStates(pub OrderedMap<ExternalScrollId, ScrollState>);Expand description
Map of active scroll states, keyed by their external scroll ID.
Tuple Fields§
§0: OrderedMap<ExternalScrollId, ScrollState>Implementations§
Source§impl ScrollStates
impl ScrollStates
pub fn new() -> Self
pub fn get_scroll_position( &self, scroll_id: &ExternalScrollId, ) -> Option<LogicalPosition>
Sourcepub fn set_scroll_position(
&mut self,
node: &OverflowingScrollNode,
scroll_position: LogicalPosition,
)
pub fn set_scroll_position( &mut self, node: &OverflowingScrollNode, scroll_position: LogicalPosition, )
Set the scroll amount - does not update the entry.used_this_frame,
since that is only relevant when we are actually querying the renderer.
Sourcepub fn scroll_node(
&mut self,
node: &OverflowingScrollNode,
scroll_by_x: f32,
scroll_by_y: f32,
)
pub fn scroll_node( &mut self, node: &OverflowingScrollNode, scroll_by_x: f32, scroll_by_y: f32, )
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.
Trait Implementations§
Source§impl Debug for ScrollStates
impl Debug for ScrollStates
Source§impl Default for ScrollStates
impl Default for ScrollStates
Source§fn default() -> ScrollStates
fn default() -> ScrollStates
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScrollStates
impl RefUnwindSafe for ScrollStates
impl Send for ScrollStates
impl Sync for ScrollStates
impl Unpin for ScrollStates
impl UnsafeUnpin for ScrollStates
impl UnwindSafe for ScrollStates
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more