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

#include <IDocIterationProvider.h>

Inheritance diagram for IDocIterationProvider:
IPMUnknownCDocIterationProvider

Public Types

enum  { kDefaultIID = IID_IDOCITERATIONPROVIDER }
 
enum  IterationContext {
  kGatherAndValidateBeforePrint = 1, kValidateBeforePDFExport = 2, kValidateBeforeEPSExport = 3, kValidateBeforeSVGExport = 4,
  kValidateBeforeHTMLExport = 5, kGatherAndValidateBeforePlace = 6, kValidateBeforeXFLExport = 8
}
 

Public Member Functions

virtual void SetIterationData (IPMUnknown *pIterationData, IterationContext nContext)=0
 
virtual bool16 InterestedIn (IterationContext nContext)=0
 
virtual bool16 StopIterating () const =0
 
virtual void BeginIteration ()=0
 
virtual void EndIteration ()=0
 
virtual void BeginPageOrSpread (IDocument *pDoc, const int32 nOutputPage, const UIDRef refPageOrSpread, const PMRect &rectBounds, const PMMatrix &boundsToSpreadMatrix)=0
 
virtual void EndPageOrSpread ()=0
 
virtual void VisitPageItem (const PMMatrix *masterSpread2LayoutSpreadMatrix, IPMUnknown *pPageItem, int32 nFlags)=0
 
virtual bool16 OnIterationCompleted ()=0
 
virtual void Cleanup ()=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 is used to provide a callback mechanism when the document is iterated through prior to print and export events. A class can be sub-classed from this interface, and if properly paired with the kDocIterationServiceImpl, the provider will be called back at various times throughout the iteration process. Note that only the pages or spreads being printed or exported are iterated.

Member Enumeration Documentation

anonymous enum

Default enum.

Identifies the context of the iteration.
Enumerator
kGatherAndValidateBeforePrint 

Iterating prior to printing.

kValidateBeforePDFExport 

Iterating prior to PDF export.

kValidateBeforeEPSExport 

Iterating prior to EPS export.

kValidateBeforeSVGExport 

was OBSOLETE: again bringing it back for SVG export in CS6.0.

kValidateBeforeHTMLExport 

Currently unused.

kGatherAndValidateBeforePlace 

Iterating prior to placing an InDesign document.

kValidateBeforeXFLExport 

Iterating prior to XFL/FLA export.

Member Function Documentation

virtual void IDocIterationProvider::BeginIteration ()
pure virtual

Called at the beginning of the iteration.

Implemented in CDocIterationProvider.

virtual void IDocIterationProvider::BeginPageOrSpread (IDocumentpDoc,
const int32 nOutputPage,
const UIDRef refPageOrSpread,
const PMRectrectBounds,
const PMMatrixboundsToSpreadMatrix 
)
pure virtual

Beginning of a page or spread in the iteration.

Parameters
pDocIN pointer to the IDocument
nOutputPageIN index of the current page or spread
refPageOrSpreadIN the UIDRef of the page or spread
rectBoundsIN bounds of the page or spread in that objects coordinate system
boundsToSpreadMatrixIN the transformation matrix that maps the rectBounds of a page to spread coordinates. This matrix will be an identity matrix when printing or exporting spreads.

Implemented in CDocIterationProvider.

virtual void IDocIterationProvider::Cleanup ()
pure virtual

Allows the provider to do cleanup tasks.

Implemented in CDocIterationProvider.

virtual void IDocIterationProvider::EndIteration ()
pure virtual

Called at the end of the iteration.

Implemented in CDocIterationProvider.

virtual void IDocIterationProvider::EndPageOrSpread ()
pure virtual

End of a page or spread.

Implemented in CDocIterationProvider.

virtual bool16 IDocIterationProvider::InterestedIn (IterationContext nContext)
pure virtual

Determines if the iteration provider is interested in participating in the specified iteration context.

Parameters
nContextIN the iteration context
Returns
bool16 kTrue if interested in participating, kFalse otherwise

Implemented in CDocIterationProvider.

virtual bool16 IDocIterationProvider::OnIterationCompleted ()
pure virtual

Allows the provider to do whatever it wants when the iteration completes. Can be used to display error or warning messages.

Returns
bool16 if kFalse returned, other providers will not be called (i.e. if the operation was cancelled).

Implemented in CDocIterationProvider.

virtual void IDocIterationProvider::SetIterationData (IPMUnknownpIterationData,
IterationContext nContext 
)
pure virtual

Used by the iteration code to set the context and a data interface specific to the context.

Parameters
pIterationDataIN data interface specific to the given iteration context
nContextIN the iteration context defined above

Implemented in CDocIterationProvider.

virtual bool16 IDocIterationProvider::StopIterating () const
pure virtual

Whether to stop the iteration.

Returns
bool16 kTrue stops the iteration.

Implemented in CDocIterationProvider.

virtual void IDocIterationProvider::VisitPageItem (const PMMatrixmasterSpread2LayoutSpreadMatrix,
IPMUnknownpPageItem,
int32 nFlags 
)
pure virtual

Process an item on the page. Called for each page item.

Parameters
masterSpread2LayoutSpreadMatrixIN the page item's transformation matrix
pPageItemIN the page item itself
nFlagsIN the current drawing flags

Implemented in CDocIterationProvider.