pub struct Viewport { /* private fields */ }Expand description
The current Viewport of the Scrollable.
Implementations§
Source§impl Viewport
impl Viewport
Sourcepub fn absolute_offset(&self) -> AbsoluteOffset
pub fn absolute_offset(&self) -> AbsoluteOffset
Returns the AbsoluteOffset of the current Viewport.
Sourcepub fn absolute_offset_reversed(&self) -> AbsoluteOffset
pub fn absolute_offset_reversed(&self) -> AbsoluteOffset
Returns the AbsoluteOffset of the current Viewport, but with its
alignment reversed.
This method can be useful to switch the alignment of a Scrollable
while maintaining its scrolling position.
Sourcepub fn relative_offset(&self) -> RelativeOffset
pub fn relative_offset(&self) -> RelativeOffset
Returns the RelativeOffset of the current Viewport.
Sourcepub fn content_bounds(&self) -> Rectangle
pub fn content_bounds(&self) -> Rectangle
Returns the content bounds of the current Viewport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Viewport
impl RefUnwindSafe for Viewport
impl Send for Viewport
impl Sync for Viewport
impl Unpin for Viewport
impl UnsafeUnpin for Viewport
impl UnwindSafe for Viewport
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