pub struct Drag {
pub phase: DragPhase,
pub pos: Vec2,
pub delta: Vec2,
pub parent: Rect,
pub cell: Option<(u32, u32)>,
pub line: Option<u32>,
pub byte: Option<usize>,
pub clicks: Option<u32>,
}Expand description
A {kind:"drag"} event: an onDrag node’s pointer capture.
Fields§
§phase: DragPhase§pos: Vec2Where the pointer is.
delta: Vec2How far it is from where it pressed — in every phase, so a value
is start + delta, never a sum.
parent: RectThe dragged node’s parent’s rect, for fractions without a query.
cell: Option<(u32, u32)>On a cells grid: the (row, col) under the pointer.
line: Option<u32>Inside an onKey sink that draws role="line" rows: the line, the
byte in its text, and the press’s click count.
byte: Option<usize>§clicks: Option<u32>Implementations§
Trait Implementations§
impl Copy for Drag
impl StructuralPartialEq for Drag
Auto Trait Implementations§
impl Freeze for Drag
impl RefUnwindSafe for Drag
impl Send for Drag
impl Sync for Drag
impl Unpin for Drag
impl UnsafeUnpin for Drag
impl UnwindSafe for Drag
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