![]() | InDesign SDK 20.5 |
#include <IPreflightBookController.h>

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTBOOKCONTROLLER } |
Public Member Functions | |
| virtual void | BeginPreflight (const UIDList &contentSelection)=0 |
| virtual bool | AdvanceState (const PMReal &duration)=0 |
| virtual bool | GetCurrentStatus (PMReal &percentage, PMString &description) const =0 |
| virtual bool | WasCancelled () const =0 |
| virtual void | Cancel ()=0 |
| virtual void | EndPreflight ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface provides a state machine based preflighting controller. It uses and modifies the IPreflightBookData and IPreflightBookContentData interfaces on the same boss.
Typical usage is a something like this:
InterfacePtr<IPreflightBookRef> iBookRef(iBook, UseDefaultIID());
InterfacePtr<IPreflightBookData> iBookData(iBookRef->CreateActivePreflight());
InterfacePtr<IPreflightBookController> iController(iBookData, UseDefaultIID());
iController->BeginPreflight(chapters);
while(!iController->AdvanceState(duration))
{
MyUpdateProgress(iController->GetCurrentStatus(...));
}
iController->EndPreflight();
InterfacePtr<IPreflightAggregatedResults> iBookResults(iBookData->CreateAggregatedResults());
| pure virtual |
Advance the preflight state by providing a certain amount of time.
| duration | IN The number of seconds to provide to the method before returning. Note that in some cases (eg when opening a document) we aren't able to guarantee this amount of time. Also, we may return early, for example when preflight is complete. |
| pure virtual |
Begin a preflight operation. This initializes all of the chapter mappings as appropriate given the passed-in selection. Note that it's dangerous to make any changes to the documents that are open, or to the book, or any settings, while the preflight is in operation; it is divided into methods like this in order to allow the caller flexibility in reporting progress.
| contentSelection | IN The content (chapters) you want to preflight. |
| pure virtual |
Cancel preflight. Note that this might take a few cycles (eg closing documents) so you should continue to AdvanceState until it returns true, then call EndPreflight().
| pure virtual |
End a preflight operation.
| pure virtual |
Get the current status as a percentage and as a string. Useful for updating a progress bar.
| percentage | OUT Receives the (approximate) percentage between 0 and 1. |
| description | OUT Receives the status (current operation) as a string. |
| pure virtual |