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

#include <ISectionList.h>

Inheritance diagram for ISectionList:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISECTIONLIST }
 
enum  { kAtTheEnd = -1 }
 

Public Member Functions

virtual UID NewSection ()=0
 
virtual void InsertSections (const UIDList &sectionsToInsert, int32 posForInsert)=0
 
virtual void RemoveSections (int32 firstIndex, int32 count)=0
 
virtual void MoveSection (int32 from, int32 to)=0
 
virtual ISectionQueryNthSection (int32 sectionIndex)=0
 
virtual UID GetNthSectionUID (int32 sectionIndex)=0
 
virtual int32 GetSectionCount ()=0
 
virtual int32 GetSectionIndex (ISection *section)=0
 
virtual int32 GetSectionIndex (UID sectionUID)=0
 
virtual void GetPageString (UID pageUID, PMString *pPageString, bool16 bIncludeSectionName=kTrue, bool16 bUseIntegerStyle=kTrue, PageNumberType pageNumberType=kDefaultPageType, bool16 bAbbreviate=kTrue, bool16 bIncludePagesOfHiddenSpread=kTrue)=0
 
virtual void GenerateNewSectionName (PMString *pName)=0
 
virtual UIDListQueryOrderedList ()=0
 
virtual int32 GetPageNumber (UID pageUID, bool16 bIncludePagesOfHiddenSpread=kTrue)=0
 
virtual UIDListGetOrderedList ()=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

This is an interface off the document which contains the list of sections (UIDs) in a given document. This list is persistent. IMPORTANT NOTE: The order of the sections in this list has no implicit meaning. In other words, it is not guaranteed that the sections are kept in order of the relative positions of their start pages within the pub.

See Also
ISection.h

Member Enumeration Documentation

anonymous enum

enum value for use in InsertSections and MoveSection.

Member Function Documentation

virtual void ISectionList::GenerateNewSectionName (PMStringpName)
pure virtual

Generates a unique section name, of the form "Sec1", "Sec2", .... As of CS4, we no longer use this method by default. So via our UI, sections will not have a name/prefix at all by deafult, so it is possible to have overlapping page numbers if the section doesn't use SetContinueFromPrevSection in ISection

Parameters
pName[IN/OUT] a pointer to the returned name.
See Also
kNewSectionCmdBoss
ISection.h, SetContinueFromPrevSection
virtual UID ISectionList::GetNthSectionUID (int32 sectionIndex)
pure virtual

Returns the 'sectionIndex' section's UID

Parameters
sectionIndexthe index in the list
Returns
UID the UID of the section at this index.
virtual UIDList* ISectionList::GetOrderedList ()
pure virtual
This call returns a UID list of section in order of the the relative positions of

their start pages within the pub. All sections have at least 1 page in this. See also ISection::GetNumPages. Note: The caller should NOT delete this list when done as it is cached and owned by the implementation of this interface.

Returns
UIDList* the cached ordered list of section UIDs
See Also
ISection.h
virtual int32 ISectionList::GetPageNumber (UID pageUID,
bool16 bIncludePagesOfHiddenSpread = kTrue 
)
pure virtual

Return the page number of the specified page, always returns a "real" page number, not an ordinal page number. (useful to determine even/oddness of a page).

Parameters
pageUIDthe UID of the page to get its page number.
bIncludePagesOfHiddenSpreadinclude hidden pages while calculating page number
Returns
the "page number" of this page.
virtual void ISectionList::GetPageString (UID pageUID,
PMStringpPageString,
bool16 bIncludeSectionName = kTrue,
bool16 bUseIntegerStyle = kTrue,
PageNumberType pageNumberType = kDefaultPageType,
bool16 bAbbreviate = kTrue,
bool16 bIncludePagesOfHiddenSpread = kTrue 
)
pure virtual

Given a page UID, spread UID, masterpage UID, master spread UID, return its string representation.

Parameters
pageUIDthe UID of a page, spread, master page, or master spread for which you'd like a string description.
OUTpPageString the string to populate with the page numbers.
bIncludeSectionNameInclude the section name if any with the string
bUseIntegerStyleUse arabic numerals in string, or use the style of this section (e.g. iv for 4)
pageNumberType@seePageNumberType
bAbbreviateFor spreadUIDs, use short or long form (e.g. MP or A-Master, or PB or PB: 1)
bIncludePagesOfHiddenSpread- kTrue == Include Hidden Pages while calculating page number string
virtual int32 ISectionList::GetSectionCount ()
pure virtual

Return the number of sections in this list (i.e. in the document)

Returns
int32 number of sections in the list. All documents have at least one.
virtual int32 ISectionList::GetSectionIndex (ISectionsection)
pure virtual

Given a sections's ISection, return its index into the section list

Parameters
sectionthe ISection pointer to look up in the list.
Returns
int32 the index of this section, -1 if not found.
virtual int32 ISectionList::GetSectionIndex (UID sectionUID)
pure virtual

Given a sections's UID, return the section's index into the section list.

Parameters
sectionUIDthe UID of the section to look up in the list.
Returns
int32 the index of this section, -1 if not found.
virtual void ISectionList::InsertSections (const UIDListsectionsToInsert,
int32 posForInsert 
)
pure virtual

Insert a list of sections at the given index.

Parameters
sectionsToInserta UIDList reference to the list of sections to move.
posForInsertthe int32 position for where to insert. 0 is start of list, kAtEndEnd is the end.
See Also
kNewSectionCmdBoss
virtual void ISectionList::MoveSection (int32 from,
int32 to 
)
pure virtual

Reorder the section list. Should not be necessary for client code to call this. Move the section at the given index to the a new position in the list. Note that the section is first removed from the list, then inserted at the "to" position. Caller may need to adjust indexes in order to compensate for this behavior. Note that the default section cannot be moved, nor can a section be moved into its position (0).

Parameters
fromint32 index of section to move
toint32 index of position to move to
See Also
QueryOrderedList
virtual UID ISectionList::NewSection ()
pure virtual

Create a new section in the section list.

Returns
UID of the created section.
See Also
kNewSectionCmdBoss
virtual ISection* ISectionList::QueryNthSection (int32 sectionIndex)
pure virtual

Return the ISection interface associated with the 'sectionIndex' section. This will add a ref count, and will instantiate the section (if necessary).

Parameters
sectionIndexint32 index from the list to query
Returns
ISection the add-refed section interface.
virtual UIDList* ISectionList::QueryOrderedList ()
pure virtual

This call returns a UID list of section in order of the the relative positions of their start pages within the pub. All sections have at least 1 page in this. See also ISection::GetNumPages. Note: The caller is responsible for deleting this list when done.

Returns
UIDList* the allocated list of section UIDs
See Also
ISection.h
virtual void ISectionList::RemoveSections (int32 firstIndex,
int32 count 
)
pure virtual

Delete 'count' sections, starting at 'firstIndex'.

Parameters
firstIndexint32 the starting index for removal.
countint32 number of sections to remove from the list.
See Also
kDeleteSectionCmdBoss