pub struct VirtualListScrollHandle { /* private fields */ }
Implementations§
Source§impl VirtualListScrollHandle
impl VirtualListScrollHandle
pub fn new() -> Self
pub fn base_handle(&self) -> &ScrollHandle
Sourcepub fn scroll_to_item(&self, ix: usize, strategy: ScrollStrategy)
pub fn scroll_to_item(&self, ix: usize, strategy: ScrollStrategy)
Scroll to the item at the given index.
Sourcepub fn scroll_to_bottom(&self)
pub fn scroll_to_bottom(&self)
Scrolls to the bottom of the list.
Methods from Deref<Target = ScrollHandle>§
Sourcepub fn max_offset(&self) -> Size<Pixels>
pub fn max_offset(&self) -> Size<Pixels>
Get the maximum scroll offset.
Sourcepub fn bottom_item(&self) -> usize
pub fn bottom_item(&self) -> usize
Get the bottom child that’s scrolled into view.
Sourcepub fn bounds_for_item(&self, ix: usize) -> Option<Bounds<Pixels>>
pub fn bounds_for_item(&self, ix: usize) -> Option<Bounds<Pixels>>
Get the bounds for a specific child.
Sourcepub fn scroll_to_item(&self, ix: usize)
pub fn scroll_to_item(&self, ix: usize)
Update [ScrollHandleState]’s active item for scrolling to in prepaint
Sourcepub fn scroll_to_top_of_item(&self, ix: usize)
pub fn scroll_to_top_of_item(&self, ix: usize)
Update [ScrollHandleState]’s active item for scrolling to in prepaint This scrolls the minimal amount to ensure that the child is the first visible element
Sourcepub fn scroll_to_bottom(&self)
pub fn scroll_to_bottom(&self)
Scrolls to the bottom.
Sourcepub fn set_offset(&self, position: Point<Pixels>)
pub fn set_offset(&self, position: Point<Pixels>)
Set the offset explicitly. The offset is the distance from the top left of the parent container to the top left of the first child. As you scroll further down the offset becomes more negative.
Sourcepub fn logical_scroll_top(&self) -> (usize, Pixels)
pub fn logical_scroll_top(&self) -> (usize, Pixels)
Get the logical scroll top, based on a child index and a pixel offset.
Sourcepub fn logical_scroll_bottom(&self) -> (usize, Pixels)
pub fn logical_scroll_bottom(&self) -> (usize, Pixels)
Get the logical scroll bottom, based on a child index and a pixel offset.
Sourcepub fn children_count(&self) -> usize
pub fn children_count(&self) -> usize
Get the count of children for scrollable item.
Trait Implementations§
Source§impl AsRef<ScrollHandle> for VirtualListScrollHandle
impl AsRef<ScrollHandle> for VirtualListScrollHandle
Source§fn as_ref(&self) -> &ScrollHandle
fn as_ref(&self) -> &ScrollHandle
Source§impl Clone for VirtualListScrollHandle
impl Clone for VirtualListScrollHandle
Source§fn clone(&self) -> VirtualListScrollHandle
fn clone(&self) -> VirtualListScrollHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Deref for VirtualListScrollHandle
impl Deref for VirtualListScrollHandle
Source§impl From<ScrollHandle> for VirtualListScrollHandle
impl From<ScrollHandle> for VirtualListScrollHandle
Source§fn from(handle: ScrollHandle) -> Self
fn from(handle: ScrollHandle) -> Self
Auto Trait Implementations§
impl Freeze for VirtualListScrollHandle
impl !RefUnwindSafe for VirtualListScrollHandle
impl !Send for VirtualListScrollHandle
impl !Sync for VirtualListScrollHandle
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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