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

#include <IObjectWalker.h>

Inheritance diagram for IObjectWalker:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IOBJECTWALKER }
 
enum  WalkerState {
  kEndOfDocumentReached, kWalkCompleted, kWalkingOnSameSpread, kSpreadEndReached,
  kMovedToNextSpread, kMovedToNextDocument
}
 

Public Member Functions

virtual void Initialize (ObjectWalkerScopeOptions options)=0
 
virtual WalkerState GetNextItem (UIDRef &ourRef)=0
 
virtual UIDRef GetCurrentItem () const =0
 
virtual UIDRef GetCurrentSpread () const =0
 
virtual bool16 MoveToSpread (UIDRef inSpreadRef)=0
 
virtual bool16 SkipSpread (UIDRef inSpreadRef)=0
 
virtual bool16 StartWithItem (UIDRef inItemRef)=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 interface tries to iterate/walk through all the pageitems (including inlines and anchored objects) as per the options specified.

Member Enumeration Documentation

Enumerator
kEndOfDocumentReached 

Informs the caller that the document has been walked completely.

kWalkCompleted 

Informs the caller that the walking is complete.

kWalkingOnSameSpread 

Informs the caller that the walking is happening on the same spread

kSpreadEndReached 

Informs the caller that walking is completed on the current spread and will be moving to next spread.

kMovedToNextSpread 

Informs the caller that walker has moved to next spread

kMovedToNextDocument 

Informs the caller that walker has moved to next document

Member Function Documentation

virtual UIDRef IObjectWalker::GetCurrentItem () const
pure virtual

Gets the current page item

Returns
UIDRef of the page item that has been just traversed.
virtual UIDRef IObjectWalker::GetCurrentSpread () const
pure virtual

Gets the UIDRef of the spread being walked

Returns
UIDRef of the sperad being walked.
virtual WalkerState IObjectWalker::GetNextItem (UIDRefourRef)
pure virtual

Gets the next page item

Parameters
outRefholds the next page item
Returns
WalkerState informs the caller of the walker state.
virtual void IObjectWalker::Initialize (ObjectWalkerScopeOptions options)
pure virtual

Initializes the walker with the appropriate options.

See Also
also ObjectWalkerScopeOptions
virtual bool16 IObjectWalker::MoveToSpread (UIDRef inSpreadRef)
pure virtual

Tells the walker to move to the specified unwalked spread

Parameters
inSpreadRefis the UIDRef of the spread being requested to move to.
Returns
kTrue if Walker is able to move to the requested spread. kFalse if move failed. This failure can happen when the spread is already walked
virtual bool16 IObjectWalker::SkipSpread (UIDRef inSpreadRef)
pure virtual

Skips the specified spread from walking. If the spread specified is current walking spread then the walking will move to next spread.

Parameters
inSpreadRefis the UIDRef of the spread being requested to skip.
Returns
kTrue if Walker can skip the requested spread. kFalse if the skip fails. This failure can happen when walker is on last spread and that spread is being requested to skip. Also, when already walked spread is specified.
virtual bool16 IObjectWalker::StartWithItem (UIDRef inItemRef)
pure virtual

Start with the specified page item.

Parameters
inItemRefis the UIDRef of the page item being requested to start the walking with.
Returns
kTrue if Walker can be set to start with the item being requested. kFalse if Walker can not be set to start with the item being requested. This can happen, if the walking has already started or when the item being requested is not in the scope.