InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IScrapItem.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Robin_Briggs
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 // This is the clipboard interface for all selectable objects. It
24 // supports the generic commands DeleteCmd, PasteCmd, CopyCmd. Each
25 // object on the selection list will be requested to return an
26 // IScrapItem interface. The interface is used to get a command that
27 // can delete, copy, or paste the item.
28 //
29 //========================================================================================
30 
31 #ifndef __ISCRAPITEM__
32 #define __ISCRAPITEM__
33 
34 #include "IPMUnknown.h"
35 #include "GenericID.h"
36 #include "PMPoint.h"
37 
38 class ICommand;
39 class UIDList;
40 
44 class IScrapItem : public IPMUnknown {
45 public:
49  enum { kDefaultIID = IID_ISCRAPITEM };
50 
58  virtual ICommand *GetDeleteCmd(bool16 includeRegisteredItems = kTrue) = 0;
59 
70  virtual ICommand *GetCopyCmd(ICommand *cmd, IDataBase *destinationDB, UID destParent, PMPoint* offset = nil, bool16 includeRegisteredItems = kTrue) = 0;
71 
82  virtual ICommand *GetPasteCmd(ICommand *cmd, IDataBase *destinationDB, UID destParent, PMPoint* offset = nil, bool16 includeRegisteredItems = kTrue) = 0;
83 
84 
93 
102 
103 
112  virtual bool16 RegisterScrapItem( UID nOtherItem ) = 0;
113 
120  virtual bool16 UnregisterScrapItem( UID nOtherItem ) = 0;
121 
128  virtual bool16 IsRegistered( UID nOtherItem ) const = 0;
129 
130 
136  virtual bool16 HasRegisteredItems() const = 0;
137 
138 
144  virtual const UIDList* GetRegisteredItemsList() const = 0;
145 };
146 
147 #endif // __ISCRAPITEM__