pub struct ScrollGeometry {
pub content_offset: (f64, f64),
pub content_size: (f64, f64),
pub content_insets: (f64, f64, f64, f64),
pub container_size: (f64, f64),
pub visible_rect: (f64, f64, f64, f64),
}Expand description
What a scroll view’s geometry looks like when it changes.
ScrollGeometry exports no accessors, but it does not need to: the fields
are stored, and the metadata says where.
+0 contentOffset CGPoint
+16 contentSize CGSize
+32 contentInsets EdgeInsets (top, leading, bottom, trailing)
+64 containerSize CGSize
+80 visibleRect CGRect (origin then size)Fields§
§content_offset: (f64, f64)How far the content has been scrolled.
content_size: (f64, f64)How large the scrollable content is.
content_insets: (f64, f64, f64, f64)The insets around it, as (top, leading, bottom, trailing).
container_size: (f64, f64)How large the scroll view itself is.
visible_rect: (f64, f64, f64, f64)What part of the content is on screen, as (x, y, width, height).
Trait Implementations§
Source§impl Clone for ScrollGeometry
impl Clone for ScrollGeometry
impl Copy for ScrollGeometry
Source§impl Debug for ScrollGeometry
impl Debug for ScrollGeometry
Source§impl Default for ScrollGeometry
impl Default for ScrollGeometry
Source§impl PartialEq for ScrollGeometry
impl PartialEq for ScrollGeometry
impl StructuralPartialEq for ScrollGeometry
Auto Trait Implementations§
impl Freeze for ScrollGeometry
impl RefUnwindSafe for ScrollGeometry
impl Send for ScrollGeometry
impl Sync for ScrollGeometry
impl Unpin for ScrollGeometry
impl UnsafeUnpin for ScrollGeometry
impl UnwindSafe for ScrollGeometry
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