![]() | InDesign SDK 20.5 |
#include <IDragDropSourceContentHelper.h>

Public Types | |
| enum | { kDefaultIID = IID_IDRAGDROPSOURCECONTENTHELPER } |
Public Member Functions | |
| virtual DragDrop::eHelperType | GetHelperType () const =0 |
| virtual bool16 | CouldStartDrag (IDragDropSource *, IEvent *e) const =0 |
| virtual CursorSpec | GetDragCursor (IDragDropSource *, DragDrop::eTargetResponse, bool16 isDragLocal) const =0 |
| virtual SysWireframe | CreateDragOutlineRegion (IDragDropSource *) const =0 |
| virtual bool16 | DoAddDragContent (IDragDropSource *, IDragDropController *)=0 |
| virtual ErrorCode | ProcessDragDropCommand (IDragDropSource *, IDragDropController *, DragDrop::eCommandType)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
The IDragDropSourceContentHelper interface provides extensibility for drag drop sources. Drag source extensibility requires the source be derived from CDragDropSource_Extensible. Create a new boss with an IDragDropSourceContentHelper implementation combined with a IK2ServiceProvider implementation that corresponds to the service ID defined by the extensible drag source.
When the framework asks an extensible drag source if it is willing to start a drag, the source then asks each of it's content helpers if they could start a drag from the current mouse location. One helper is chosen based on willingness to begin a drag, and in the case of multiple helpers, prioritized by helper type. The extensible source then forwards the subsequent method calls that occur during the drag to the chosen helper.
| pure virtual |
Could this helper initiate a drag from the given mouse position?
| source | IN the drag drop source this helper is assisting |
| e | IN event containing current mouse position and modifiers |
| pure virtual |
Provide the outline region to be dragged with the cursor as feedback during the drag operation. Can return constants DragDrop::kNoDragOutline or DragDrop::kDefaultDragOutline when appropriate - caller is responsible for releasing the returned region, if any.
| source | IN the drag drop source this helper is assisting |
| pure virtual |
Add drag content for the current drag operation.
| source | IN the drag drop source this helper is assisting |
| controller | IN used to call IDragDropController::AddDragItem as necessary. |
| pure virtual |
Provide the cursor to be displayed during the drag based on the response from a target. Return DragDrop::kDefaultDragCursors to use the default platform cursors.
| source | IN the drag drop source this helper is assisting |
| targetResponse | IN what action the target intends to perform (nothing, copy, move, link) |
| isDragLocal | IN is the drag taking place within the source object (source and target are equivalent) |
| pure virtual |
Return the type or priority of the helper. This is used to resolve conflicts that can arise when more than one source content helper is capable of starting a drag drop operation. The presence of multiple helpers is not a conflict, a conflict would arise when one helper wants to replace or augment what another helper already does.
| pure virtual |
Create and process (or schedule) the commands needed to complete the drop operation. Normally called on the drop target, this method is also called on sources when the original data needs to be deleted, as in a drag to the trash.
| source | IN the drag drop source this helper is assisting |
| controller | IN drag drop controller for this operation |
| commandType | IN which operation to perform (sources will only receive kDrag to delete data) |