#[repr(C)]pub struct ScrollbarDrag {
pub scroll_container_node: NodeId,
pub axis: ScrollbarAxis,
pub start_mouse_position: LogicalPosition,
pub start_scroll_offset: f32,
pub current_mouse_position: LogicalPosition,
pub track_length_px: f32,
pub content_length_px: f32,
pub viewport_length_px: f32,
}Expand description
Scrollbar thumb drag state.
Tracks which scrollbar is being dragged and the current offset.
Fields§
§scroll_container_node: NodeIdThe scroll container node being scrolled
axis: ScrollbarAxisWhether this is the vertical or horizontal scrollbar
start_mouse_position: LogicalPositionMouse Y position where drag started (for calculating delta)
start_scroll_offset: f32Scroll offset when drag started
current_mouse_position: LogicalPositionCurrent mouse position
track_length_px: f32Track length in pixels (for calculating scroll ratio)
content_length_px: f32Content length in pixels (for calculating scroll ratio)
viewport_length_px: f32Viewport length in pixels (for calculating scroll ratio)
Trait Implementations§
Source§impl Clone for ScrollbarThumbDrag
impl Clone for ScrollbarThumbDrag
Source§fn clone(&self) -> ScrollbarThumbDrag
fn clone(&self) -> ScrollbarThumbDrag
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 ScrollbarThumbDrag
impl Debug for ScrollbarThumbDrag
Source§impl PartialEq for ScrollbarThumbDrag
impl PartialEq for ScrollbarThumbDrag
impl Copy for ScrollbarThumbDrag
impl StructuralPartialEq for ScrollbarThumbDrag
Auto Trait Implementations§
impl Freeze for ScrollbarThumbDrag
impl RefUnwindSafe for ScrollbarThumbDrag
impl Send for ScrollbarThumbDrag
impl Sync for ScrollbarThumbDrag
impl Unpin for ScrollbarThumbDrag
impl UnwindSafe for ScrollbarThumbDrag
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more