pub struct ScrollState {
pub scroll_position: LogicalPosition,
}
Fields§
§scroll_position: LogicalPosition
Amount in pixel that the current node is scrolled
Implementations§
Source§impl ScrollState
impl ScrollState
Sourcepub fn get(&self) -> LogicalPosition
pub fn get(&self) -> LogicalPosition
Return the current position of the scroll state
Sourcepub fn add(&mut self, x: f32, y: f32, child_rect: &LogicalRect)
pub fn add(&mut self, x: f32, y: f32, child_rect: &LogicalRect)
Add a scroll X / Y onto the existing scroll state
Sourcepub fn set(&mut self, x: f32, y: f32, child_rect: &LogicalRect)
pub fn set(&mut self, x: f32, y: f32, child_rect: &LogicalRect)
Set the scroll state to a new position
Trait Implementations§
Source§impl Clone for ScrollState
impl Clone for ScrollState
Source§fn clone(&self) -> ScrollState
fn clone(&self) -> ScrollState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ScrollState
impl Debug for ScrollState
Source§impl Default for ScrollState
impl Default for ScrollState
Source§impl PartialEq for ScrollState
impl PartialEq for ScrollState
Source§impl PartialOrd for ScrollState
impl PartialOrd for ScrollState
impl Copy for ScrollState
impl StructuralPartialEq for ScrollState
Auto Trait Implementations§
impl Freeze for ScrollState
impl RefUnwindSafe for ScrollState
impl Send for ScrollState
impl Sync for ScrollState
impl Unpin for ScrollState
impl UnwindSafe for ScrollState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more