pub struct ScrollAreaState { /* private fields */ }Expand description
Scroll area state tracker with one-shot offset jumps.
Implementations§
Source§impl ScrollAreaState
impl ScrollAreaState
Sourcepub fn jump_to(&mut self, offset: Vec2)
pub fn jump_to(&mut self, offset: Vec2)
Request a one-shot jump to the given offset on the next frame.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset tracked state and request that the next frame jump back to the origin.
Sourcepub fn show<R>(
&mut self,
scroll_area: ScrollArea,
ui: &mut Ui,
id: impl Into<String>,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> ScrollAreaOutput<R>
pub fn show<R>( &mut self, scroll_area: ScrollArea, ui: &mut Ui, id: impl Into<String>, add_contents: impl FnOnce(&mut Ui) -> R, ) -> ScrollAreaOutput<R>
Show a scroll area, record DevMCP metadata, and update the tracked offset.
Sourcepub fn show_viewport<R>(
&mut self,
scroll_area: ScrollArea,
ui: &mut Ui,
id: impl Into<String>,
add_contents: impl FnOnce(&mut Ui, Rect) -> R,
) -> ScrollAreaOutput<R>
pub fn show_viewport<R>( &mut self, scroll_area: ScrollArea, ui: &mut Ui, id: impl Into<String>, add_contents: impl FnOnce(&mut Ui, Rect) -> R, ) -> ScrollAreaOutput<R>
Show a scroll area with viewport access, record DevMCP metadata, and update the offset.
Trait Implementations§
Source§impl Clone for ScrollAreaState
impl Clone for ScrollAreaState
Source§fn clone(&self) -> ScrollAreaState
fn clone(&self) -> ScrollAreaState
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 ScrollAreaState
impl Debug for ScrollAreaState
Auto Trait Implementations§
impl Freeze for ScrollAreaState
impl RefUnwindSafe for ScrollAreaState
impl Send for ScrollAreaState
impl Sync for ScrollAreaState
impl Unpin for ScrollAreaState
impl UnsafeUnpin for ScrollAreaState
impl UnwindSafe for ScrollAreaState
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