InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPageCmdData.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 // Data interface for new/delete pages.
24 //
25 //========================================================================================
26 
27 #ifndef __IPageCmdData__
28 #define __IPageCmdData__
29 
30 #include "IPMUnknown.h"
31 #include "SpreadID.h"
32 #include "UIDRef.h"
33 #include "PMRect.h"
34 #include "PMPageSize.h"
35 #include "PMMatrix.h"
36 //#include "IPageSetupPrefs.h"
37 #include "ILayoutUtils.h" // for kDefaultBinding
38 
45 class IPageCmdData : public IPMUnknown
46 {
47 public:
48  enum { kDefaultIID = IID_IPAGECMDDATA };
49 
50  inline void SetNewPageCmdData( const UIDRef& spreadToAddTo, int32 numberOfPagesToInsert, int32 insertPosition /*zero-based*/, const PMPageSize& pageSize = kPMPageSizeNeighbor) /* kPMPageSizeNeighbor means use the page size of location where spread is inserting. kPMPageSizeDefault means use document default page size. */
51  {
52  SetNewPageCmdData_( spreadToAddTo, numberOfPagesToInsert, insertPosition, nil, nil, pageSize);
53 
54  }
55  inline void SetNewPageCmdData(const UIDRef& spreadToAddTo, int32 numberOfPagesToInsert, int32 insertPosition /*zero-based*/,
56  const K2Vector< PMRect>* pageBoundingBoxes, const K2Vector<PMMatrix>* pageTransforms)
57  {
58  SetNewPageCmdData_(spreadToAddTo, numberOfPagesToInsert, insertPosition, pageBoundingBoxes, pageTransforms, kPMPageSizeDefine /*use pageBoundingBoxes and pageTransforms*/);
59  }
60 
61 
62 
63  virtual UIDRef GetNewPageSpread() const = 0;
64  virtual int32 GetNewPageInsertCount() const = 0;
65  virtual int32 GetNewPageInsertPosition() const = 0;
66  virtual const K2Vector<PMRect>* GetNewPageBoundingBoxes() const = 0;
67  virtual const K2Vector<PMMatrix>* GetNewPageTransforms() const = 0;
68  virtual PMPageSize GetNewPageSize() const = 0;
69 
70  // TEMPORARY api
71  virtual void SetNewPageCmdData_(const UIDRef& spreadToAddTo, int32 numberOfPagesToInsert, int32 insertPosition /*zero-based*/,
72  const K2Vector< PMRect>* pageBoundingBoxes /* nil for default size*/, const K2Vector<PMMatrix>* pageTransforms /*nil for default placement*/, const PMPageSize& pageSize) = 0;
73 };
74 
75 
76 
77 #endif // __IPageCmdData__