pub struct DragPreviewCtx {
pub pointer: Vec2,
pub start_pointer: Vec2,
pub source_rect: Rect,
pub grab_offset: Vec2,
pub payload: DragPayload,
}Expand description
Context passed to a drag preview painter each frame while dragging.
Fields§
§pointer: Vec2Current pointer position (px).
start_pointer: Vec2Pointer position when the drag started (px).
source_rect: RectSource hit-region rect at drag start (px).
grab_offset: Vec2pointer_at_start - source_rect.origin so the ghost sticks under the finger/cursor.
payload: DragPayloadActive payload (clone of session payload).
Trait Implementations§
Source§impl Clone for DragPreviewCtx
impl Clone for DragPreviewCtx
Source§fn clone(&self) -> DragPreviewCtx
fn clone(&self) -> DragPreviewCtx
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for DragPreviewCtx
impl !Send for DragPreviewCtx
impl !Sync for DragPreviewCtx
impl !UnwindSafe for DragPreviewCtx
impl Freeze for DragPreviewCtx
impl Unpin for DragPreviewCtx
impl UnsafeUnpin for DragPreviewCtx
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