pub struct ScrollbarDrag {
pub entity: Entity,
pub axis: ScrollbarAxisPick,
pub grab: f32,
pub start_offset: Vec2,
}Expand description
An in-flight thumb drag (pointer captured by the scrollbar).
Fields§
§entity: EntityScroll container whose bar is being dragged.
axis: ScrollbarAxisPickBar axis.
grab: f32Pointer offset from the thumb’s leading edge at press time, in logical pixels along the bar axis. Keeps the grab point glued to the same spot on the thumb for the whole drag (absolute 1:1 mapping).
start_offset: Vec2The container’s ScrollOffset when the drag began, so Escape
can cancel the drag and restore the pre-drag scroll position
(Qt drag-cancel contract).
Trait Implementations§
Source§impl Clone for ScrollbarDrag
impl Clone for ScrollbarDrag
Source§fn clone(&self) -> ScrollbarDrag
fn clone(&self) -> ScrollbarDrag
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScrollbarDrag
impl Debug for ScrollbarDrag
impl Copy for ScrollbarDrag
Auto Trait Implementations§
impl Freeze for ScrollbarDrag
impl RefUnwindSafe for ScrollbarDrag
impl Send for ScrollbarDrag
impl Sync for ScrollbarDrag
impl Unpin for ScrollbarDrag
impl UnsafeUnpin for ScrollbarDrag
impl UnwindSafe for ScrollbarDrag
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,
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.