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

Public Types | |
| enum | { kDefaultIID = IID_IDATAEXCHANGECONTROLLER } |
Public Member Functions | |
| virtual void | RegisterAllHandlers ()=0 |
| virtual IDataExchangeHandler * | QueryHandler (const PMFlavor &flavor) const =0 |
| virtual IDataExchangeHandler * | QueryHandler (const ExternalPMFlavor &fromFlavor, const PMFlavor &toFlavor) const =0 |
| virtual IDataExchangeHandler * | QueryHandlerForInternalize (DataExchangeResponse &response, const PMFlavor &internalizeToThisFlavor=kNoFlavor) const =0 |
| virtual IDataExchangeHandler * | QueryActiveHandler () const =0 |
| virtual void | SetActiveHandler (IDataExchangeHandler *activeHandler)=0 |
| virtual ErrorCode | FulfillPromise (IPMDataObject *whichItem, const ExternalPMFlavor &whichFlavor) const =0 |
| virtual bool16 | NeedsToInternalize () const =0 |
| virtual IDataBase * | GetScrapDataBase () const =0 |
| virtual ErrorCode | Initialize ()=0 |
| virtual bool16 | IsValid () const =0 |
| virtual void | Cleanup ()=0 |
| virtual void | GetInternalizeableFlavors (OrderedFlavorList &flavorList) const =0 |
| virtual bool16 | IsClipboardExternal () const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
IDataExchangeController interface, represents the controlling entity in a data exchange operation, and the common behavior shared by all such controllers
The partial implementation class CDataExchangeController should be used when deriving a new controller type. class CDataExchangeController. Implementations of IDataExchangeController provide the glue between various external data exchange mechanisms (Clipboard, drag drop, OSX services, external databases, etc) and the platform independent data exchange framework within InDesign.
| pure virtual |
Cleanup the controller. Usually called at shutdown Release any referenced handlers and delete the scrap database (or revert it to a pristene state if it persists).
Implemented in ILibraryScrapController, and CDataExchangeController.
| pure virtual |
Render the contents of a data item to the given external data format. FulfillPromise is called by the framework in response to an external request for a specific flavor.
| whichItem | IN the IPMDataObject representing the data to be exchanged. |
| whichFlavor | IN which flavor to provide data for |
Implemented in IDragDropController, IClipboardController, and ILibraryScrapController.
| pure virtual |
Get a list of all internalizeable flavors (compute by iterating over the registered handlers)
FOR INTERNAL USE ONLY **
Implemented in CDataExchangeController.
| pure virtual |
Return the database . This is the database where the data exchange handlers and thus where the scrap data (used to store the internalized contents of the clipboard, drag/drop, etc.) resides. Note that this is NOT the same as calling GetDataBase on the IDataExchangeController, which will likely return the application database.
Implemented in CDataExchangeController.
| pure virtual |
Initialize the controller and the scrap database
Implemented in CDataExchangeController.
| pure virtual |
Get is the data on clipboard from external source or and internal copy from InDesign
Implemented in CDataExchangeController, and IClipboardController.
| pure virtual |
Is the controller in a valid state. Typically IsValid makes sure the controller has been initialized and that the scrap database is OK.
Implemented in CDataExchangeController.
| pure virtual |
Is external data waiting to be internalized? This method is useful for clients that would like to peek at the actual data to be pasted/dropped/whatever if it has already been internalized, or is internal data. Internalizing can be expensive and should not be called to give user feedback (i.e. menu enabling, drag feedbacck)
Implemented in IDragDropController, IClipboardController, CDataExchangeController, and ILibraryScrapController.
| pure virtual |
Query for the active handler.
Implemented in CDataExchangeController.
| pure virtual |
Query for the handler for a particular internal flavor (there can only be one handler per flavor)
| flavor | IN which flavor |
Implemented in CDataExchangeController.
| pure virtual |
Query for a handler that can convert a specific external flavor into an internal one
| fromFlavor | IN the source external flavor |
| toFlavor | IN the desired flavor |
Implemented in CDataExchangeController.
| pure virtual |
Query for the handler best suited to internalize data. Since no context is specified to identify the data to be internalized - this method is overridden in the controller subclasses to apply to the data in the current drag, or clipboard operation.
| response | OUT the response from the handler best suited to internalize the data |
| internalizeToThisFlavor | IN the desired destination flavor for the data, or kNoFlavor to let the framework choose the best one. |
Implemented in IDragDropController, IClipboardController, CDataExchangeController, and ILibraryScrapController.
| pure virtual |
Register all data exchange handlers, IDataExchangeHandler, for this controller
Implemented in CDataExchangeController.
| pure virtual |
Set the active handler. The active handler is usually set for the duration of a data exchange operation
| activeHandler | IN the handler to become active, or nil to clear the active handler. |
Implemented in CDataExchangeController.