pub enum FileDropPhase {
Hover,
Drop,
Cancel,
Ended,
}Expand description
The phase of a desktop OS file drag entering, hovering over, dropping on,
or leaving the window — see InputEvent::FileDrop.
A shell publishes only the first three. Ended is
the root’s own broadcast follow-up to every Drop/Cancel, handled or
not — see FileDropEvent’s Broadcast follow-up section.
Variants§
Hover
The drag is hovering the window — it just entered, or moved while
still over it. Carries no paths; see FileDropEvent::paths.
Drop
The files were released over the window. Carries every dropped path.
Cancel
The drag left the window, or the OS otherwise called it off, without a drop. Carries no paths.
Ended
Broadcast-only, never sent by a shell: the OS drag is over — a
Drop or Cancel was just dispatched hit-tested, whether or not a
widget handled it — so crate::app::RenderRoot::event re-dispatches
this phase to every widget. Carries no paths and no meaningful
position (Point::ZERO, never translated). A widget holding state
the drag opened (a drop target’s external drag session) ends whatever
of it is still open here, so a release over a region nothing handles —
or over a widget other than the one whose state the drag opened —
still ends the drag everywhere.
Trait Implementations§
Source§impl Clone for FileDropPhase
impl Clone for FileDropPhase
impl Copy for FileDropPhase
Source§impl Debug for FileDropPhase
impl Debug for FileDropPhase
impl Eq for FileDropPhase
Source§impl PartialEq for FileDropPhase
impl PartialEq for FileDropPhase
impl StructuralPartialEq for FileDropPhase
Auto Trait Implementations§
impl Freeze for FileDropPhase
impl RefUnwindSafe for FileDropPhase
impl Send for FileDropPhase
impl Sync for FileDropPhase
impl Unpin for FileDropPhase
impl UnsafeUnpin for FileDropPhase
impl UnwindSafe for FileDropPhase
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.