pub struct ScrollState { /* private fields */ }Expand description
Inertial scroll state (single axis Y).
Implementations§
Source§impl ScrollState
impl ScrollState
pub fn new() -> Self
pub fn set_overscroll_enabled(&mut self, enabled: bool)
pub fn overscroll_offset(&self) -> f32
pub fn set_nested_scroll_parent(&self, conn: NestedScrollConnection)
pub fn set_show_scrollbar(&self, show: bool)
pub fn set_viewport_height(&self, h: f32)
pub fn set_content_height(&self, h: f32)
pub fn set_overscroll(&self, val: f32)
pub fn set_offset(&self, off: f32)
pub fn get(&self) -> f32
pub fn scroll_immediate(&self, dy: f32) -> f32
pub fn tick(&self) -> bool
pub fn show_scrollbar(&self) -> bool
Sourcepub fn to_binding(&self) -> ScrollBinding
pub fn to_binding(&self) -> ScrollBinding
Build a ScrollBinding::Vertical from this state for use with Modifier::vertical_scroll.
Trait Implementations§
Source§impl Clone for ScrollState
impl Clone for ScrollState
Source§fn clone(&self) -> ScrollState
fn clone(&self) -> ScrollState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ScrollState
impl !RefUnwindSafe for ScrollState
impl !Send for ScrollState
impl !Sync for ScrollState
impl !UnwindSafe for ScrollState
impl Unpin for ScrollState
impl UnsafeUnpin 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