InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IClipboardController.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 
24 #ifndef __IClipboardController__
25 #define __IClipboardController__
26 
27 #include "CDataExchangeController.h"
28 #include "ShuksanID.h"
29 #include "DragDropID.h"
30 
31 #include "IDataExchangeHandler.h"
32 
33 #ifdef MACINTOSH
34 //#define USE_CARBONSCRAPCALLS 1
35 #endif
36 
37 //========================================================================================
38 // Forward declarations
39 //========================================================================================
40 
42 class IDataBase;
43 
44 //========================================================================================
45 // CLASS IClipboardController
46 //========================================================================================
47 
57 {
58  public:
59  enum { kDefaultIID = IID_ICLIPBOARDCONTROLLER };
60 
61  // ----- Constructor/Destructor
63  virtual ~IClipboardController() {};
64 
65  // ----- Active handler (compatibility methods - use QueryActiveHandler/SetActiveHandler instead)
66  public:
68  virtual IDataExchangeHandler* QueryActiveScrapHandler() const = 0;
74  virtual void SetActiveScrapHandler(IDataExchangeHandler* activeHandler) = 0;
75 
76 
82  virtual bool16 IsClipboardExternal()const = 0;
83 
88  virtual void SetIsClipboardExternal(bool16 isClipboardExternal=kTrue) =0;
89 
90  // ----- Scrap Conversion
91  public:
100  virtual ErrorCode FulfillPromise(IPMDataObject* whichItem, const ExternalPMFlavor& whichFlavor) const = 0;
101 
106  virtual void SetShouldExternalize(bool16 should = kTrue) = 0;
107 
111  virtual ErrorCode Externalize() const = 0;
112 
118  virtual void SetShouldInternalize(bool16 should = kTrue) = 0;
119 
125  virtual bool16 NeedsToInternalize() const = 0;
126 
131  virtual ErrorCode Internalize() = 0;
132 
139  virtual bool16 GetPreferredClipboardFlavor(ExternalPMFlavor& preferredFlavor) = 0;
140 
150  virtual IDataExchangeHandler* QueryHandlerForInternalize(DataExchangeResponse& response, const PMFlavor& internalizedFlavor = kNoFlavor) const = 0;
151 
152  // ----- Clipboard Copy operations: PrepareForCopy and CopyHasCompleted
158  virtual ErrorCode PrepareForCopy() = 0;
159 
164  virtual ErrorCode CopyHasCompleted() = 0;
165 
168  virtual bool16 IsExternalizeInProgress() const = 0;
169 
173  virtual bool16 IsCutOperation() const = 0;
174 
179  virtual void SetCutOperation(bool16 isCut) = 0;
180 
184  virtual PMString GetClipboardsContentSourceApp() const = 0;
185 
186 };
187 
188 #endif