InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPageList Class Referenceabstract

#include <IPageList.h>

Inheritance diagram for IPageList:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPAGELIST }
 

Public Member Functions

virtual int32 GetPageCount () const =0
 
virtual UID GetNthPageUID (int32 pageIndex) const =0
 
virtual int32 GetPageIndex (UID pageUID, bool16 includePagesOfHiddenSpread=kTrue) const =0
 
virtual PageType GetPageType (UID pageUID) const =0
 
virtual IMarginsQueryPageMargins (UID pageUID) const =0
 
virtual IColumnsQuery__PageColumns (UID pageUID) const =0
 
virtual void GetPageString (UID pageUID, PMString *pPageString, bool16 bIncludeSectionName=kTrue, bool16 bUseIntegerStyle=kTrue, PageNumberType pageNumberType=kDefaultPageType, bool16 bAbbreviate=kTrue, bool16 bIncludePagesOfHiddenSpread=kTrue) const =0
 
virtual void GetPageRangeString (UIDList &pageUIDList, PMString *pPageString, bool16 bIncludeSectionName=kFalse, bool16 bUseIntegerStyle=kTrue, PageNumberType pageNumberType=kDefaultPageType, bool16 bSortPageUIDList=kFalse, bool16 bAbbreviate=kTrue, bool16 bIncludePagesOfHiddenSpread=kTrue) const =0
 
virtual UID PageStringToUID (PMString &pageString, PageNumberType pageNumberType=kDefaultPageType, ITextDataValidation::RangeError *nError=nil, IPageNameToUIDCache *pCache=nil) const =0
 
virtual
ITextDataValidation::RangeError 
PageRangeStringToUIDList (PMString &pageString, UIDList *pageUIDList, PageNumberType pageNumberType=kDefaultPageType) const =0
 
virtual int32 GetSectionIndex (UID pageUID, bool16 bRequireNamedLayout=kFalse) const =0
 
virtual void GetSectionString (UID pageUID, PMString *pSectionMarkerString) const =0
 
virtual void InvalidateCache (int32 startingFromSpreadIndex=0)=0
 
virtual void InvalidateMarginsCache (int32 startingFromSpreadIndex=0)=0
 
virtual void InvalidateMarginsCache (const UIDList *invalidSpreadUIDs)=0
 
virtual void InvalidateColumnsCache (int32 startingFromSpreadIndex=0)=0
 
virtual void InvalidateColumnsCache (const UIDList *invalidSpreadUIDs)=0
 
virtual IPageNameToUIDCache * CreatePageNameToUIDCache () const =0
 
virtual void DestroyPageNameToUIDCache (IPageNameToUIDCache *pCache) const =0
 
virtual UID GetLastPageUID (UIDList &pageUIDList, bool16 bSortPageUIDList=kFalse) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IPageList is a non-persistent interface off the document, which caches commonly needed information about pages in the document. All the information is computed only when needed. It is much more efficient to use this than to compute the same information from other sources.

Member Function Documentation

virtual IPageNameToUIDCache* IPageList::CreatePageNameToUIDCache () const
pure virtual

Creates a cache object which can be passed to certain calls that are repeatedly executed to improve performance.

virtual void IPageList::DestroyPageNameToUIDCache (IPageNameToUIDCache * pCache) const
pure virtual

Cleans up the cache.

virtual UID IPageList::GetLastPageUID (UIDListpageUIDList,
bool16 bSortPageUIDList = kFalse 
) const
pure virtual

GetLastPageUID - Given a UIDlist of pages within a pub, returns the UID of the last page.

Parameters
INpageUIDList - list of page UIDs. Can also handle UIDs for master spreads/pages.
INbSortPageUIDList - kTrue == Sort page uids before formatting range string
Returns
UID
virtual UID IPageList::GetNthPageUID (int32 pageIndex) const
pure virtual

GetNthPageUID - Given a page location within a pub (ie the 3rd page of the overall pub), returns the UID of the page.

Parameters
pageIndex- page index of interest
Returns
UID
virtual int32 IPageList::GetPageCount () const
pure virtual

GetPageCount - Return the number of layout pages in the document (does not include master pages)

Returns
int32 - the number of layout pages in the document
virtual int32 IPageList::GetPageIndex (UID pageUID,
bool16 includePagesOfHiddenSpread = kTrue 
) const
pure virtual

GetPageIndex - Given a page UID, returns the location of the page within a pub (ie the overall 3rd page of the pub).

Parameters
pageUID
includePagesOfHiddenSpreadInclude hidden pages while getting the page index
Returns
int32
virtual void IPageList::GetPageRangeString (UIDListpageUIDList,
PMStringpPageString,
bool16 bIncludeSectionName = kFalse,
bool16 bUseIntegerStyle = kTrue,
PageNumberType pageNumberType = kDefaultPageType,
bool16 bSortPageUIDList = kFalse,
bool16 bAbbreviate = kTrue,
bool16 bIncludePagesOfHiddenSpread = kTrue 
) const
pure virtual

GetPageRangeString - Given a UIDList of pages, returns the page range string (eg "A:12-C:21,D:41").

Parameters
INpageUIDList - list of page UIDs. Can also handle UIDs for master spreads/pages.
OUTpPageString - result page range string
INbIncludeSectionName - kTrue == Include the section name if any with the string
INbUseIntegerStyle - kTrue == Use arabic numerals in string; kFalse == use the style of this section (eg iv for 4)
INpageNumberType - See PageNumberType enum above
INbSortPageUIDList - kTrue == Sort page uids before formatting range string
INbAbbreviate - For spreadUIDs, use short or long form (eg MP or A-Master, or PB or PB: 1)
INbIncludePagesOfHiddenSpread - kTrue == Include Hidden Pages while calculating page number string
virtual void IPageList::GetPageString (UID pageUID,
PMStringpPageString,
bool16 bIncludeSectionName = kTrue,
bool16 bUseIntegerStyle = kTrue,
PageNumberType pageNumberType = kDefaultPageType,
bool16 bAbbreviate = kTrue,
bool16 bIncludePagesOfHiddenSpread = kTrue 
) const
pure virtual

GetPageString - Given a page UID (or spread UID), returns the page string (eg "A:12").

Parameters
INpageUID - page of interest
OUTpPageString - page string
INbIncludeSectionName - kTrue == Include the section name if any with the string
INbUseIntegerStyle - kTrue == Use arabic numerals in string; kFalse == use the style of this section (eg iv for 4)
INpageNumberType - See PageNumberType enum above
INbAbbreviate - For spreadUIDs, use short or long form (eg MP or A-Master, or PB or PB: 1)
INbIncludePagesOfHiddenSpread - kTrue == Include Hidden Pages while calculating page number string
virtual PageType IPageList::GetPageType (UID pageUID) const
pure virtual

GetPageType - Returns the page type of the given page (left, right, or unisex)

Parameters
pageUID- page of interest
Returns
PageType - the page type of the given page
virtual int32 IPageList::GetSectionIndex (UID pageUID,
bool16 bRequireNamedLayout = kFalse 
) const
pure virtual

GetSectionIndex - returns index into the section list of the section that contains that page

Parameters
pageUID- page of interest
bRequireNamedLayout- if kTrue, section returned will have a named layout. This section may differ from the one that the page falls in.
Returns
int32 - index into the section list of the section that contains that page
See Also
ISection, GetNamedLayout
virtual void IPageList::GetSectionString (UID pageUID,
PMStringpSectionMarkerString 
) const
pure virtual

GetSectionString - returns the marker text for the section within which the given page falls. If given a master page UID, returns "Section."

Parameters
pageUID- page of interest
pSectionMarkerString- the marker text for the section within which the page falls. If given a master page UID, returns "Section."
virtual void IPageList::InvalidateCache (int32 startingFromSpreadIndex = 0)
pure virtual

InvalidateCache - The page list is kept as a cached list of page UID's. If pages or spreads are added, deleted, or moved, we need to update this list. This routine marks the UIDList of pages as needing to be rebuilt. By default, invalidates everything, with the parameter, invalidates everything after (or including) the specified spread. Calling this frequently can degrade performance significantly.

Parameters
startingFromSpreadIndex
virtual void IPageList::InvalidateColumnsCache (int32 startingFromSpreadIndex = 0)
pure virtual

InvalidateColumnsCache - Invalidate just the cached column info.

Parameters
startingFromSpreadIndex
virtual void IPageList::InvalidateColumnsCache (const UIDListinvalidSpreadUIDs)
pure virtual

InvalidateColumnsCache - Invalidate just the cached column info.

Parameters
invalidSpreadUIDs
virtual void IPageList::InvalidateMarginsCache (int32 startingFromSpreadIndex = 0)
pure virtual

InvalidateMarginsCache - Invalidate just the cached margin info.

Parameters
startingFromSpreadIndex
virtual void IPageList::InvalidateMarginsCache (const UIDListinvalidSpreadUIDs)
pure virtual

InvalidateMarginsCache - Invalidate just the cached margin info.

Parameters
invalidSpreadUIDs
virtual ITextDataValidation::RangeError IPageList::PageRangeStringToUIDList (PMStringpageString,
UIDListpageUIDList,
PageNumberType pageNumberType = kDefaultPageType 
) const
pure virtual

PageRangeStringToUIDList - Given a string for a range of pages (eg "1-5, 6, 8-10" or "Section-1:3-Section-3:7,Section-5:1"), parses the string and returns UIDList of the pages indicated. If the pageUIDList is empty on return, it means the string could not be parsed. Error state, caller should handle. The return value contains more detailed error information, or kSuccess if successful.

Parameters
INpageString - page range string
OUTpageUIDList - UIDList of the pages indicated
INpageNumberType - See PageNumberType enum above
Returns
ITextDataValidation::RangeError
virtual UID IPageList::PageStringToUID (PMStringpageString,
PageNumberType pageNumberType = kDefaultPageType,
ITextDataValidation::RangeErrornError = nil,
IPageNameToUIDCache * pCache = nil 
) const
pure virtual

PageStringToUID - Given a page string (eg "S1:12" (sectionName:pageNumber) or "7"(ordinal page number)), returns the UID of the page. If kInvalidUID is returned, it means an error in parsing occured. Error state, caller should handle.

Parameters
INpageString - name of page
INpageNumberType - See PageNumberType enum above
OUTnError - error, if returned UID is kInvalidUID
INpCache - cached off list of strings->UID mappings (created by calling CreatePageNameToUIDCache); may help performance if calling PageStringToUID repeatedly
Returns
UID - UID of page named
virtual IColumns* IPageList::Query__PageColumns (UID pageUID) const
pure virtual

QueryPageColumns - Returns the columns for the given page as would be returned by QueryFrontColumns

Parameters
pageUID- page of interest
Returns
IColumns* - the columns for the given page as would be returned by QueryFrontColumns
virtual IMargins* IPageList::QueryPageMargins (UID pageUID) const
pure virtual

QueryPageMargins - Returns the margins for the given page as would be returned by QueryFrontMargins

Parameters
pageUID- page of interest
Returns
IMargins* - the margins for the given page as would be returned by QueryFrontMargins