Struct drag_controller::DragController
[−]
[src]
pub struct DragController {
pub drag: bool,
pub pos: [f64; 2],
}Controls dragging.
Fields
drag: bool
Whether to drag or not.
pos: [f64; 2]
The current positon of dragging.
Methods
impl DragController[src]
fn new() -> DragController
Creates a new drag controller.
fn event<E: GenericEvent, F>(&mut self, e: &E, f: F) where F: FnMut(Drag) -> bool
Handles event.
Calls closure when events for dragging happen.
If the drag event callback returns false, it will cancel dragging.
Trait Implementations
impl Clone for DragController[src]
fn clone(&self) -> DragController
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more