Drag-Drop
drag-drop feature is used to enable system drag-drop events. After enabling, views can receive drag enter, hover, leave and release through event builder.
Basic Usage
Drag-drop is event capability, entry in Event Builder.
Events:
Complete signature and current dispatch status see Handler API's Drag-Drop Events.
Related Types
Drag-drop events will directly encounter these types:
on_drag_enter(...) and on_drag_over(...) get &[DragFormat], suitable for first checking whether the data can be accepted; on_drop(...) gets &DragData, suitable for reading the real data.
DropEffect
DropEffect is used to tell the system how the current view intends to handle the drag content. Values include:
In on_drag_enter, on_drag_over and on_drop can modify feedback through &mut DropEffect.
DragFormat and DragData
DragFormat is used in the enter and hover phase, indicating what formats the current drag object declares it can provide:
DragData is used in the final release phase, indicating the real data handed to the view:

