When a user releases the mouse button, a drop occurs on the target widget. Both the target and the source are notified. The target adapter first activates the dropCallback. The callData includes the source widget, the source model, the source items, the operation, and the mouse event. It also includes an offset for each source item relative to the mouse location. If, in response to the last
dragOverCallback, the application set the emphasis to XmTARGETEMPHASIS, the callData for the
dropCallback also contains the target item. If the emphasis was set to XmINSERTIONEMPHASIS, the callData contains the insertion index. Finally, the callData contains a
doit flag, which an application can set to
false if it is unable to perform the drop. In this case, the source adapter will activate its
dragCancelCallback. Otherwise, it is the application's responsibility to perform the appropriate operation on the target widget and the underlying objects.
After the target has triggered the dropCallback, the source adapter activates its
dragCompleteCallback. The callData includes the source items, the target widget, the target model, the target item (if any), and the operation. It is the application's responsibility to perform the appropriate operation on the source widget and the underlying objects. For example, if the operation was XmMOVE, the application should remove the items from the source widget.