Struct nannou::ui::event::Drag [−][src]
pub struct Drag { pub button: MouseButton, pub origin: [f64; 2], pub from: [f64; 2], pub to: [f64; 2], pub delta_xy: [f64; 2], pub total_delta_xy: [f64; 2], pub modifiers: ModifierKey, }
Contains all the relevant information for a mouse drag.
Fields
Which mouse button was being held during the drag
origin: [f64; 2]
The point from which the current series of drag events began.
This will be the position of the pointing device whenever the dragging press began.
from: [f64; 2]
The point from which this drag event began.
to: [f64; 2]
The point at which this drag event ended.
delta_xy: [f64; 2]
The magnitude of the vector between from
and to
.
total_delta_xy: [f64; 2]
The magnitude of the vector between origin
and to
.
modifiers: ModifierKey
Which modifier keys are being held during the mouse drag.
Methods
impl Drag
[src]
impl Drag
pub fn relative_to(&self, xy: [f64; 2]) -> Drag
[src]
pub fn relative_to(&self, xy: [f64; 2]) -> Drag
Returns a copy of the Drag relative to the given xy
Trait Implementations
impl Clone for Drag
[src]
impl Clone for Drag
fn clone(&self) -> Drag
[src]
fn clone(&self) -> Drag
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Drag
[src]
impl Debug for Drag
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl From<Drag> for Widget
[src]
impl From<Drag> for Widget
impl Copy for Drag
[src]
impl Copy for Drag
impl PartialEq<Drag> for Drag
[src]
impl PartialEq<Drag> for Drag