#[non_exhaustive]pub struct ListScrollPosition {
pub index: u32,
pub offset: Points,
}Expand description
Where a list’s viewport starts among its rows
(ref.measureScrollPosition()), as GPUI’s ListOffset: the row there
and how far into it, along the list’s axis from the side item 0 is on
(the top, the bottom of an inverted list). Scrolling the list to row
index with a view offset of -offset puts the viewport’s start back
there, wherever the list’s sizes still are estimates.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.index: u32The first item of the row the viewport starts in (0 while it
starts in the header or before it).
offset: PointsHow far past the row’s start the viewport starts: negative before the first row, past the row’s size in the gap after it.
Trait Implementations§
Source§impl Clone for ListScrollPosition
impl Clone for ListScrollPosition
impl Copy for ListScrollPosition
Source§impl Debug for ListScrollPosition
impl Debug for ListScrollPosition
Source§impl Default for ListScrollPosition
impl Default for ListScrollPosition
Source§impl PartialEq for ListScrollPosition
impl PartialEq for ListScrollPosition
impl StructuralPartialEq for ListScrollPosition
Auto Trait Implementations§
impl Forget for ListScrollPosition
impl Freeze for ListScrollPosition
impl Move for ListScrollPosition
impl RefUnwindSafe for ListScrollPosition
impl Send for ListScrollPosition
impl Sync for ListScrollPosition
impl Unpin for ListScrollPosition
impl UnsafeUnpin for ListScrollPosition
impl UnwindSafe for ListScrollPosition
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