Drop
TheDropmethod should move or copy the dragged data into this part.
ODDropResult Drop (in ODDragItemIterator dropInfo, in ODFacet facet, in ODPoint where);
dropInfo- A reference to a drag-item iterator that describes the content, as well as the types and values, of the dragged data.
facet- A reference to a facet where the drop has occurred.
where- The location of the drop point, expressed in frame coordinates.
- return value
- The result of the drop operation. The return value is one of the following:
kODDropFail,kODDropCopy,kODDropMove, orkODDropUnfinished.DISCUSSION
The return valuekODDropFailindicates an unsuccessful synchronous drop. On platforms that support asynchronous drag-and-drop operations, the return valuekODDropUnfinishedindicates that an asynchronous drop is in progress. The return valuekODDropCopyindicates a successful synchronous drop with copy semantics. The return valuekODDropMoveindicates a successful synchronous drop with move semantics. These copy and move semantics are determined by examining the drag attributes and determining whether to display the Paste As dialog box. If a link is created, then your part'sDropmethod should returnkODDropCopy, regardless of the drag attributes.OpenDoc calls this method when the mouse button is released while the drag point is within a facet that can accept a drop.
Your part's
Dropmethod should examine the part kinds of the dragged data (using the drag-item iterator specified by thedropInfoparameter) and determine whether it can accept the dragged data. If your part can accept a drop, this method should incorporate or embed the dropped data and return an appropriate return value indicating the result of the drop operation. If your part cannot accept a drop, this method should returnkODDropFail.OVERRIDING
When you subclassODPart, you can override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrDoesNotDrop- This part does not support drag and drop.
SEE ALSO
TheODDropResulttype (page 922).
TheODPointtype (page 885).
TheODDragAndDrop::GetDragAttributesmethod (page 191).
TheODDragAndDrop::ShowPasteAsDialogmethod (page 192).
TheODPart::DropCompletedmethod (page 508).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Paste As" on page 250 in OpenDoc Programmer's Guide.
"Dropping" on page 364 in OpenDoc Programmer's Guide.