InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPageList.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Tommy Donovan
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 // IPageList is a list of pages contained within a given document.
24 // It is used to get page number strings.
25 //
26 //========================================================================================
27 
28 #ifndef __IPAGELIST__
29 #define __IPAGELIST__
30 
32 #define kMinNumPages 1
33 
35 #define kMaxNumPages 9999
36 
38 #define kMinNumPagesPerSpread 1
39 
41 #define kMaxNumPagesPerSpread 10
42 
43 #ifndef __ODFRC__ // when used for core resource compilation, provide just the parameter range constants
44 
45 #include "IPMUnknown.h"
46 #include "SpreadID.h"
47 #include "ILayoutUtils.h"
48 #include "ITextDataValidation.h"
49 
50 class UIDList;
51 class PMString;
52 class IMargins;
53 class IColumns;
54 
62 enum PageNumberType { kDefaultPageType = 0, kActualType, kOrdinalType, kActualWithNamedLayoutType };
63 
65 const int kInvalidateMasterCache = kMaxInt32;
66 
67 class IPageNameToUIDCache;
68 
74 class IPageList : public IPMUnknown
75 {
76 public:
77  enum { kDefaultIID = IID_IPAGELIST };
78 
84  virtual int32 GetPageCount() const= 0;
85 
93  virtual UID GetNthPageUID(int32 pageIndex) const = 0;
94 
103  virtual int32 GetPageIndex(UID pageUID, bool16 includePagesOfHiddenSpread = kTrue) const = 0;
104 
111  virtual PageType GetPageType (UID pageUID) const = 0;
112 
119  virtual IMargins* QueryPageMargins (UID pageUID) const = 0;
120 
127  virtual IColumns* Query__PageColumns (UID pageUID) const = 0;
128 
140  virtual void GetPageString(UID pageUID, PMString* pPageString,
141  bool16 bIncludeSectionName = kTrue,
142  bool16 bUseIntegerStyle = kTrue,
143  PageNumberType pageNumberType = kDefaultPageType,
144  bool16 bAbbreviate = kTrue,
145  bool16 bIncludePagesOfHiddenSpread = kTrue) const = 0;
146 
159  virtual void GetPageRangeString(UIDList& pageUIDList, PMString* pPageString,
160  bool16 bIncludeSectionName = kFalse,
161  bool16 bUseIntegerStyle = kTrue,
162  PageNumberType pageNumberType = kDefaultPageType,
163  bool16 bSortPageUIDList = kFalse,
164  bool16 bAbbreviate = kTrue,
165  bool16 bIncludePagesOfHiddenSpread = kTrue) const = 0;
166 
179  virtual UID PageStringToUID(PMString& pageString, PageNumberType pageNumberType = kDefaultPageType, ITextDataValidation::RangeError* nError = nil, IPageNameToUIDCache* pCache = nil) const = 0;
180 
193  virtual ITextDataValidation::RangeError PageRangeStringToUIDList(PMString& pageString, UIDList* pageUIDList, PageNumberType pageNumberType = kDefaultPageType) const = 0;
194 
204  virtual int32 GetSectionIndex(UID pageUID, bool16 bRequireNamedLayout = kFalse) const= 0;
205 
214  virtual void GetSectionString(UID pageUID, PMString* pSectionMarkerString) const = 0;
215 
226  virtual void InvalidateCache(int32 startingFromSpreadIndex = 0) = 0;
227 
233  virtual void InvalidateMarginsCache(int32 startingFromSpreadIndex = 0) = 0;
234 
240  virtual void InvalidateMarginsCache(const UIDList *invalidSpreadUIDs) = 0;
241 
247  virtual void InvalidateColumnsCache(int32 startingFromSpreadIndex = 0) = 0;
248 
254  virtual void InvalidateColumnsCache(const UIDList *invalidSpreadUIDs) = 0;
255 
260  virtual IPageNameToUIDCache* CreatePageNameToUIDCache() const= 0;
261 
265  virtual void DestroyPageNameToUIDCache(IPageNameToUIDCache* pCache) const= 0;
266 
274  virtual UID GetLastPageUID(UIDList& pageUIDList, bool16 bSortPageUIDList = kFalse ) const = 0;
275 };
276 #endif // __ODFRC__
277 
278 
279 #endif // __IPAGELIST__
280