#include <CDataExchangeController.h>
|
| static void | Purge (int32 level, void *refPtr) |
| |
|
| enum | { kDefaultIID = IID_IDATAEXCHANGECONTROLLER } |
| |
CDataExchangeController Shared implementation for Clipboard, DragDrop, Mac OSX Services and LibraryScrap controllers. Should also serve as the base class for all custom data exchange controller implementations
- See Also
- IDataExchangeController
| virtual void CDataExchangeController::Cleanup | ( | | ) | |
| virtual |
| virtual IDataBase* CDataExchangeController::CreateDataBase | ( | | ) | const |
| protectedpure virtual |
Create the actual database. This solves a link circularity. Subclasses must set magic bytes to something appropriate!
| virtual void CDataExchangeController::GetInternalizeableFlavors | ( | OrderedFlavorList & | flavorList | ) | const |
| virtual |
Iterate over all IDataExchangeHandlers in the object model and return the collection of internalizeable flavors.
Implements IDataExchangeController.
| virtual IDataBase* CDataExchangeController::GetScrapDataBase | ( | | ) | const |
| virtual |
| virtual PMString CDataExchangeController::GetScrapDBFileName | ( | | ) | const |
| protectedpure virtual |
Return name to use for this scrap db file - must be unique to each controller implementation
| virtual ClassID CDataExchangeController::GetScrapDocBossID | ( | | ) | const |
| protectedvirtual |
Return the bossID of the doc boss to use, default is kScrapDocBoss
| virtual ErrorCode CDataExchangeController::Initialize | ( | | ) | |
| virtual |
Initialize the controller (includes creation of the scrap database, and handler registration).
Implements IDataExchangeController.
| virtual ErrorCode CDataExchangeController::InitializeScrap | ( | | ) | |
| protectedvirtual |
Initialize scrap to a standard state. Similar to document initialization, uses document signal responders and sends kDuringNewScrapDocSignalResponderService signal
| virtual bool16 CDataExchangeController::IsClipboardExternal | ( | | ) | const |
| inlineprotectedvirtual |
| virtual bool16 CDataExchangeController::IsValid | ( | | ) | const |
| virtual |
| virtual bool16 CDataExchangeController::NeedsToInternalize | ( | | ) | const |
| 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)
- Returns
- kTrue if external data is awaiting internalization
Implements IDataExchangeController.
Implemented in IDragDropController, IClipboardController, and ILibraryScrapController.
Create an instance of a specific IDataExchangeHandler boss, in this controllers managed scrap database.
| virtual void CDataExchangeController::Purge | ( | int32 | level | ) | |
| virtual |
| static void CDataExchangeController::Purge | ( | int32 | level, | | | void * | refPtr | | ) | | |
| static |
| virtual IDataExchangeHandler* CDataExchangeController::QueryHandler | ( | const PMFlavor & | scrapFlavor | ) | const |
| virtual |
| virtual IDataExchangeHandler* CDataExchangeController::QueryHandler | ( | const ExternalPMFlavor & | fromFlavor, | | | const PMFlavor & | toFlavor | | ) | | const |
| virtual |
Query for a handler capable of performing a specific conversion for internalizing external scrap data.
Implements IDataExchangeController.
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.
- Parameters
| 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. |
- Returns
- a handler (if any) capable of performing the internalization.
Implements IDataExchangeController.
Implemented in IDragDropController, IClipboardController, and ILibraryScrapController.
Given a dataobject with external data and a desired internal flavor, query for a handler that can perform this operation
- Parameters
| whichItem | IN data object representing the external data |
| response | OUT response from the returned handler |
| toFlavor | IN desired flavor for the data to be converted to |
- Returns
- the handler best suited to perform the internalization
Given a dataobject with external data and a desired internal flavor, query for a handler that can perform this operation
- Parameters
| dataIter | IN iterator over the data objects representing the external data |
| response | OUT response from the returned handler |
| toFlavor | IN desired flavor for the data to be converted to |
- Returns
- the handler best suited to perform the internalization
| virtual void CDataExchangeController::RegisterAllHandlers | ( | | ) | |
| virtual |
| virtual bool16 CDataExchangeController::RegisterDataHandler | ( | ClassID | dataClass | ) | |
| virtual |
| virtual void CDataExchangeController::ResetMagicBytes | ( | | ) | const |
| protectedpure virtual |
Set the database's magic bytes. This solves a link circularity. Subclasses must set magic bytes to something appropriate!
| virtual ErrorCode CDataExchangeController::RevertScrap | ( | | ) | |
| protectedvirtual |
Revert scrap database back to the standard state.
| virtual void CDataExchangeController::RunNewScrapResponders | ( | | ) | |
| protectedvirtual |
Add standard colors, styles etc. to scrap.