InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDataExchangeHandler.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Dave Burnard
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Interface definition for handlers used to manage data for data exchange operations
24 //
25 //========================================================================================
26 
27 #ifndef __IDataExchangeHandler__
28 #define __IDataExchangeHandler__
29 
30 #include "IPMUnknown.h"
31 #include "PMFlavorTypes.h"
32 
33 #include "DragDropID.h"
34 
35 class IPMDataObject;
36 class IPMStream;
37 
48 {
49  public:
53  enum { kDefaultIID = IID_IDATAEXCHANGEHANDLER };
54 
55  // ----- Initialization
56  public:
62  virtual void CreateScrapStorage() = 0;
63 
64  // ----- Accessors
65  public:
71  virtual void Clear() = 0;
72 
78  virtual bool16 IsEmpty() const = 0;
79 
85  virtual PMFlavor GetFlavor() const = 0;
86 
93  virtual DataExchangeResponse CanInternalizeData(IPMDataObject* whichItem) const = 0;
94 
101  virtual bool16 CanConvertExternalFlavor(ExternalPMFlavor fromWhichFlavor) const = 0;
102 
109  virtual void AddInternalizeableFlavorsToList(OrderedFlavorList& flavorList) const = 0;
110 
117  virtual void AddExternalizeableFlavorsToList(OrderedFlavorList& flavorList) const = 0;
118 
119  // ----- Conversion to platform data exchange (clipboard and drag/drop)
120  public:
127  virtual ErrorCode ExternalizePromises(IPMDataObject* whichItem) = 0;
128 
137  virtual ErrorCode Externalize(IPMDataObject* whichItem, ExternalPMFlavor toWhichFlavor, IPMStream* s) = 0;
138 
145  virtual ErrorCode Internalize(IPMDataObject* whichItem) = 0;
146 
155  virtual ErrorCode Internalize(IPMDataObject* whichItem, ExternalPMFlavor fromWhichFlavor, IPMStream* s) = 0;
156 };
157 
158 #endif