pub enum FileDragEvent {
DragEntered {
paths: Vec<PathBuf>,
position: PhysicalPosition<f64>,
scale_factor: f64,
},
DragMoved {
position: PhysicalPosition<f64>,
scale_factor: f64,
},
DragDropped {
paths: Vec<PathBuf>,
position: PhysicalPosition<f64>,
scale_factor: f64,
},
DragLeft {
position: Option<PhysicalPosition<f64>>,
scale_factor: f64,
},
}Expand description
A standard DragEvent for file drag events.
Variants§
DragEntered
A file drag operation has entered the window.
Fields
position: PhysicalPosition<f64>(x,y) coordinates in pixels relative to the top-left corner of the window. May be negative on some platforms if something is dragged over a window’s decorations (title bar, frame, etc).
DragMoved
A file drag operation has moved over the window.
Fields
position: PhysicalPosition<f64>(x,y) coordinates in pixels relative to the top-left corner of the window. May be negative on some platforms if something is dragged over a window’s decorations (title bar, frame, etc).
DragDropped
The file drag operation has dropped file(s) on the window.
Fields
position: PhysicalPosition<f64>(x,y) coordinates in pixels relative to the top-left corner of the window. May be negative on some platforms if something is dragged over a window’s decorations (title bar, frame, etc).
DragLeft
The file drag operation has been cancelled or left the window.
Implementations§
Source§impl FileDragEvent
impl FileDragEvent
pub fn logical_point(&self) -> Option<Point>
Trait Implementations§
Source§impl Clone for FileDragEvent
impl Clone for FileDragEvent
Source§fn clone(&self) -> FileDragEvent
fn clone(&self) -> FileDragEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FileDragEvent
impl RefUnwindSafe for FileDragEvent
impl Send for FileDragEvent
impl Sync for FileDragEvent
impl Unpin for FileDragEvent
impl UnwindSafe for FileDragEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more