Struct egui::containers::scroll_area::State
source · pub struct State {
pub offset: Vec2,
offset_target: [Option<ScrollingToTarget>; 2],
show_scroll: Vec2b,
content_is_too_large: Vec2b,
scroll_bar_interaction: Vec2b,
vel: Vec2,
scroll_start_offset_from_top_left: [Option<f32>; 2],
scroll_stuck_to_end: Vec2b,
interact_rect: Option<Rect>,
}
Fields§
§offset: Vec2
Positive offset means scrolling down/right
offset_target: [Option<ScrollingToTarget>; 2]
If set, quickly but smoothly scroll to this target offset.
show_scroll: Vec2b
Were the scroll bars visible last frame?
content_is_too_large: Vec2b
The content were to large to fit large frame.
scroll_bar_interaction: Vec2b
Did the user interact (hover or drag) the scroll bars last frame?
vel: Vec2
Momentum, used for kinetic scrolling
scroll_start_offset_from_top_left: [Option<f32>; 2]
Mouse offset relative to the top of the handle when started moving the handle.
scroll_stuck_to_end: Vec2b
Is the scroll sticky. This is true while scroll handle is in the end position
and remains that way until the user moves the scroll_handle
. Once unstuck (false)
it remains false until the scroll touches the end position, which reenables stickiness.
interact_rect: Option<Rect>
Area that can be dragged. This is the size of the content from the last frame.
Implementations§
Trait Implementations§
impl Copy for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)