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: Vec2Positive offset means scrolling down/right
offset_target: [Option<ScrollingToTarget>; 2]If set, quickly but smoothly scroll to this target offset.
show_scroll: Vec2bWere the scroll bars visible last frame?
content_is_too_large: Vec2bThe content were to large to fit large frame.
scroll_bar_interaction: Vec2bDid the user interact (hover or drag) the scroll bars last frame?
vel: Vec2Momentum, 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: Vec2bIs 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