InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BscDNDDropTarget Class Reference
Inheritance diagram for BscDNDDropTarget:
CDragDropTargetIDragDropTargetIPMUnknown

Public Member Functions

 BscDNDDropTarget (IPMUnknown *boss)
 
void DoDragEnter ()
 
DragDrop::TargetResponse CouldAcceptTypes (DataObjectIterator *dataIter, const IDragDropSource *fromSource, const IDragDropController *controller) const
 
ErrorCode ProcessDragDropCommand (IDragDropController *controller, DragDrop::eCommandType type)
 
- Public Member Functions inherited from CDragDropTarget
 CDragDropTarget (IPMUnknown *boss)
 
virtual SysWireframe DoMakeDropHiliteRegion () const
 
virtual IDataBaseGetTargetDataBase () const
 
bool16 SameAsDragSource (const IDragDropSource *dragSource) const
 
bool16 AffectsSameDataAsDragSource (const IDragDropSource *dragSource) const
 
virtual bool16 HitTest_OutsideBounds (const SysPoint &) const
 
virtual IDragDropTargetQueryInternalDropTarget (const SysPoint &windowPoint, PMPoint &localPoint, DataObjectIterator *dataIter, const IDragDropSource *iSource, const IDragDropController *iController)
 
virtual PMMatrix GetInternalTransform () const
 
virtual void SetInternalTransform (PMMatrix)
 
virtual void RegisterTargetCallback (IDropTargetCallback *)
 
virtual void ReleaseTargetCallback (IDropTargetCallback *)
 
virtual void SetActiveContext ()
 
virtual void ResetActiveContext ()
 
virtual void SetDocument (IDocument *)
 
virtual void DrawTargetOutline ()
 
virtual bool16 IsTargetModifiable () const
 
virtual DragDrop::TargetResponse HandleCouldAcceptTypes (DataObjectIterator *, const IDragDropSource *, const IDragDropController *)
 
virtual void HandleDoDragEnter ()
 
virtual void HandleDoDragWithin (const PMPoint &localPt)
 
virtual void HandleDoDragLeave ()
 
virtual ErrorCode HandleProcessDragDropCommand (IDragDropController *, DragDrop::eCommandType)
 

Additional Inherited Members

- Public Types inherited from IDragDropTarget
enum  { kDefaultIID = IID_IDRAGDROPTARGET }
 
- Protected Member Functions inherited from CDragDropTarget
virtual void PrepareTargetForDrag ()
 
virtual void DoDragWithin (const PMPoint &localPt)
 
virtual void DoDragLeave ()
 
virtual void NotifyTargetCallbacks (IDropTargetCallback::eCallbackState state, const PMPoint &localPt)
 
virtual PMRect HandleGetDragDataBounds () const
 
virtual PMRect GetDragDataBounds () const
 
const DragDrop::TargetResponseGetCachedResponse () const
 
DropTargetCallbackListGetTargetCallbackList ()
 
- Protected Attributes inherited from CDragDropTarget
DragDrop::TargetResponse fCachedResponse
 

Detailed Description

BscDNDDropTarget Provides the drop behaviour. Our drag and drop target accepts page items and reasons about their shape. We override the DoDragWithin method to replace the custom cursor behaviour (open hand rather than copy). This drag and drop target is bound to a panel...

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * BscDNDDropTarget::BscDNDDropTarget (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.

Member Function Documentation

DragDrop::TargetResponse BscDNDDropTarget::CouldAcceptTypes (DataObjectIteratordataIter,
const IDragDropSourcefromSource,
const IDragDropControllercontroller 
) const
virtual

this method defines the target response to the drag. It is called when the mouse enters the panel. We inidcate we can accept drags with a kPageItem flavor, that we do not want the default cursor and we do want the default panel highlight behaviour.

Parameters
dataIterIN iterator providing access to the data objects within the drag.
fromSourceIN the source of the drag.
controllerIN the drag drop controller mediating the drag.
Returns
a target response (either won't accept or drop will copy).
See Also
DragDrop::TargetResponse

Reimplemented from CDragDropTarget.

void BscDNDDropTarget::DoDragEnter ()
virtual

when we enter the panel, we change the cursor to be an open hand. If we had some dynamic cursor behaviour (the cursor changing dependent on where the mouse is within the panel), we would provide this behaviour in the DoDragWithin method.

Reimplemented from CDragDropTarget.

ErrorCode BscDNDDropTarget::ProcessDragDropCommand (IDragDropControllercontroller,
DragDrop::eCommandType type 
)
virtual

When the drop is performed, this method is called. We get the data item from the scrap and test its shape. We then change the static text widget associated with the panel to reflect the shape of this widget.

Parameters
controllerIN the drag drop controller mediating the drag.
typeIN drag and drop command type
See Also
DragDrop::eCommandType

Reimplemented from CDragDropTarget.