InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISpread.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Zak_Williamson
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 __ISPREAD__
25 #define __ISPREAD__
26 
27 #include "IPMUnknown.h"
28 #include "SpreadID.h"
29 #include "PMRect.h"
30 #include "TransformTypes.h"
31 
32 class IDocumentLayer;
33 class ISpreadLayer;
34 class IHierarchy;
35 class IGeometry;
36 class UIDList;
37 class IColumns;
38 
45 {
46 public:
56  virtual bool16 ManipulateItem(IHierarchy * itemHier) = 0;
57 };
58 
64 class LayerMask
65 {
66 public:
74  virtual bool16 MaskOutLayer(IHierarchy * layerHier) = 0;
75 };
76 
89 class ISpread : public IPMUnknown
90 {
91 public:
92  enum { kDefaultIID = IID_ISPREAD };
93 
94  typedef enum { kDefaultBinding = -1, kBindingAtBeginning = 0, kBindingAtEnd = -2} BindingLocation;
95  typedef enum { kDefaultBindingSide = -1, kLeftSideOfBinding = 0, kRightSideOfBinding = -2} BindingSide;
96  typedef enum { kFollowMasterColorUID = 1 } PageColorLabel;
97 
107  virtual ISpreadLayer * QueryLayer(const IDocumentLayer * docLayer, int32 * pPos = nil, bool16 wantGuideLayer = kFalse) const = 0;
108 
114  virtual IHierarchy * QueryPagesLayer() const = 0;
115 
116  enum { kAtTheEnd = -1 };
117 
131  virtual void GetItemsOnPage(int32 pgPos, UIDList * items, bool16 bIncludePage = kTrue, bool16 bIncludePasteboard = kFalse, bool16 bIncludeBleedAndSlug = kTrue) const = 0;
132 
160  virtual void PartitionPageItems( UIDList* partition[], bool16 bIncludePage, int32 pasteboardIndex, bool16 bIncludeBleedAndSlug) const = 0;
161 
162  virtual void PartitionPageItems( const K2Vector<PMRect>& rects, const K2Vector<PMMatrix>& rect2SpreadTransforms, UIDList* partition_[], int32 pasteboardIndex) const = 0;
163 
169  virtual int32 GetNumPages() const = 0;
170 
177  virtual IGeometry * QueryNthPage(int32 n) const = 0;
178 
185  virtual UID GetNthPageUID(int32 n) const = 0;
186 
194  virtual IGeometry * QueryNearestPage(const PBPMPoint& pt, int32 * pageIndex) const = 0;
195 
203  virtual int32 GetPageIndex(UID pageID) const = 0;
204 
217  virtual bool16 ForEachItem(ItemManipulator * manipulator, LayerMask * layerMask = nil) const = 0;
218 
226  virtual PMRect GetPagesBounds( const Transform::CoordinateSpace& coordinateSpace) const = 0;
227 
237  virtual PMRect GetPagesAndItemsBounds( const Transform::CoordinateSpace& coordinateSpace, bool16 includeGuides = kFalse) const = 0;
238 
239 
247  virtual PMPoint GetSpreadZeroPoint() const = 0;
248 
265  virtual IColumns * QueryNearestColumnBounds(const PBPMPoint& pt, bool16 bIsVertical, PMRect * pColumnBounds = nil,
266  int32 * pPageIndex = nil, int32 * pColumnIndex = nil) const = 0;
267 };
268 
269 #endif