InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDragDropTextSuite Class Referenceabstract

#include <IDragDropTextSuite.h>

Inheritance diagram for IDragDropTextSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDRAGDROPTEXTSUITE }
 

Public Member Functions

virtual bool16 CanDrag (IControlView *view, const SysPoint mousePt, const IPMUnknown *hitObj)=0
 
virtual bool16 TextRangeOverlapsSelection (UIDRef &sourceStoryUIDRef, UIDRef &destStoryUIDRef, RangeData &destRange, DragDrop::eCommandType type)=0
 
virtual ErrorCode PrepareDragDataSource (IDataExchangeHandler *handler, IDragDropSource *source)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface abstract interaction between DnD text and selection architecture

Member Function Documentation

virtual bool16 IDragDropTextSuite::CanDrag (IControlViewview,
const SysPoint mousePt,
const IPMUnknownhitObj 
)
pure virtual

Description: Can start text drag based on current selection?

Parameters
viewpointer to the control view under the mouse
mousePtlocation of current mouse position
hitObjan IPMUnknown pointer from a frame from hittesting at the mousePt. May be nil.
Returns
bool16 kTrue / kFalse if drag can be started.
virtual ErrorCode IDragDropTextSuite::PrepareDragDataSource (IDataExchangeHandlerhandler,
IDragDropSourcesource 
)
pure virtual

Description: Prepare text data source for drag and drop operation

Parameters
handlerpointer to IDataExchangeHandler
Returns
ErrorCode the result of adding source data to the exchange handler. An alert will be displayed if kSuccess is not returned.
virtual bool16 IDragDropTextSuite::TextRangeOverlapsSelection (UIDRefsourceStoryUIDRef,
UIDRefdestStoryUIDRef,
RangeDatadestRange,
DragDrop::eCommandType type 
)
pure virtual

Description: Does the indicated text range overlap the text selection (in the destination)?

Parameters
sourceStoryUIDRefReference to the source story (may be kInvalidUIDRef)
destStoryUIDRefReference to the story to drop into
destRangetext range at hit location (length of 1)
typean enum of type DragDrop::eCommandType. kDragMove for moving text, otherwise use kDrop to copy.
Returns
bool16 kTrue if selection contains text range, kFalse otherwise.