pub struct DragAndDropTarget { /* private fields */ }Expand description
What a node does with a transfer that reaches it. Positions are in the surface that draws the target.
Implementations§
Source§impl DragAndDropTarget
impl DragAndDropTarget
Sourcepub fn on_entered(self, handler: impl Fn(&DragAndDropPayload) + 'static) -> Self
pub fn on_entered(self, handler: impl Fn(&DragAndDropPayload) + 'static) -> Self
Called when a transfer arrives over the node.
Sourcepub fn on_moved(
self,
handler: impl Fn(&DragAndDropPayload, Point) + 'static,
) -> Self
pub fn on_moved( self, handler: impl Fn(&DragAndDropPayload, Point) + 'static, ) -> Self
Called with every pointer sample over the node.
Sourcepub fn on_exited(self, handler: impl Fn(&DragAndDropPayload) + 'static) -> Self
pub fn on_exited(self, handler: impl Fn(&DragAndDropPayload) + 'static) -> Self
Called when a transfer leaves the node without dropping.
Sourcepub fn on_drop(
self,
handler: impl Fn(&DragAndDropPayload, Point) -> bool + 'static,
) -> Self
pub fn on_drop( self, handler: impl Fn(&DragAndDropPayload, Point) -> bool + 'static, ) -> Self
Called on release over the node; returns whether the drop was
accepted, which the source hears as DragAndDropOutcome::Dropped.
Trait Implementations§
Source§impl Clone for DragAndDropTarget
impl Clone for DragAndDropTarget
Source§impl Debug for DragAndDropTarget
impl Debug for DragAndDropTarget
Auto Trait Implementations§
impl !RefUnwindSafe for DragAndDropTarget
impl !Send for DragAndDropTarget
impl !Sync for DragAndDropTarget
impl !UnwindSafe for DragAndDropTarget
impl Freeze for DragAndDropTarget
impl Unpin for DragAndDropTarget
impl UnsafeUnpin for DragAndDropTarget
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