pub struct VirtualListScrollHandle { /* private fields */ }Expand description
A scroll handle with VirtualList-specific helpers (scroll-to-item).
Implementations§
Source§impl VirtualListScrollHandle
impl VirtualListScrollHandle
pub fn new() -> Self
pub fn base_handle(&self) -> &ScrollHandle
pub fn scroll_to_item(&self, index: usize, strategy: ScrollStrategy)
pub fn scroll_to_index(&self, index: usize, strategy: ScrollStrategy)
pub fn scroll_to_bottom(&self)
Methods from Deref<Target = ScrollHandle>§
pub fn offset(&self) -> Point
Sourcepub fn revision(&self) -> u64
pub fn revision(&self) -> u64
Monotonic revision counter that increments when the scroll offset changes via
ScrollHandle::set_offset (or helpers that call it).
The declarative runtime uses this to detect out-of-band scroll changes (e.g. component-driven “scroll into view”) and invalidate the bound scroll nodes, even when the element instances themselves did not change.
pub fn max_offset(&self) -> Point
pub fn clamp_offset(&self, offset: Point) -> Point
pub fn set_offset(&self, offset: Point)
pub fn scroll_to_offset(&self, offset: Point)
pub fn viewport_size(&self) -> Size
pub fn set_viewport_size(&self, viewport: Size)
pub fn content_size(&self) -> Size
pub fn set_content_size(&self, content: Size)
pub fn scroll_to_range_y( &self, start_y: Px, end_y: Px, strategy: ScrollStrategy, )
Trait Implementations§
Source§impl Clone for VirtualListScrollHandle
impl Clone for VirtualListScrollHandle
Source§fn clone(&self) -> VirtualListScrollHandle
fn clone(&self) -> VirtualListScrollHandle
Returns a duplicate 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 VirtualListScrollHandle
impl Debug for VirtualListScrollHandle
Source§impl Default for VirtualListScrollHandle
impl Default for VirtualListScrollHandle
Source§fn default() -> VirtualListScrollHandle
fn default() -> VirtualListScrollHandle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VirtualListScrollHandle
impl !RefUnwindSafe for VirtualListScrollHandle
impl !Send for VirtualListScrollHandle
impl !Sync for VirtualListScrollHandle
impl Unpin for VirtualListScrollHandle
impl UnsafeUnpin for VirtualListScrollHandle
impl !UnwindSafe for VirtualListScrollHandle
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