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

#include <IPageItemAdornmentList.h>

Inheritance diagram for IAdornmentIterator:
IPMUnknown

Public Types

enum  IteratorType { kNormalIterator, kHandleIterator }
 

Public Member Functions

virtual void AddAdornment (IPMUnknown *pAdorn)=0
 
virtual IPMUnknownGetNextAdornment ()=0
 
virtual int32 GetNumberOfAdornments ()=0
 
virtual bool32 HasAdornment (ClassID classID)=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 a better way to do iterations on the list. If you use the iteration mechanism that is global to the list, it is possible that some procedure you call will do an iteration itself and mess up the state of your iteration. This iterator makes a copy of the list of adornments that satisfy the iteration criteria, so that it won't get reset in the middle of the iteration.

Member Enumeration Documentation

Indicates what type of iterator is being used
Enumerator
kNormalIterator 

Iterator deals with shape adornments

kHandleIterator 

Iterator deals with handle adornments

Member Function Documentation

virtual void IAdornmentIterator::AddAdornment (IPMUnknownpAdorn)
pure virtual

Add an adornment to the current list.

Parameters
*pAdorn- The adornment to be added (must be on a boss that has an IAdornmentShape interface
virtual IPMUnknown* IAdornmentIterator::GetNextAdornment ()
pure virtual

Returns the next adornment in the list and increments the position

Returns
- The next adornment in the list. Will return nil if the current position is at the end of the list.
virtual int32 IAdornmentIterator::GetNumberOfAdornments ()
pure virtual

Returns the number of adorments in the list.

Returns
- The size of the list we are iterating
virtual bool32 IAdornmentIterator::HasAdornment (ClassID classID)
pure virtual

Finds the adornment by class ID, if one exists.

Parameters
classIDIN The class ID for which to look
Returns
True if the given class occurs in the list; false otherwise.