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

Public Types | |
| enum | { kDefaultIID = IID_IBOOKUTILS } |
| enum | GatherPagesError { kGatherPagesSuccess, kGatherPagesNoEvenPages, kGatherPagesNoOddPages } |
Public Member Functions | |
| virtual BookContentStatus::State | GetBookContentStatus (IBookContent *iBookContent)=0 |
| virtual IDocument * | FindDocFromContentUID (IDataBase *db, UID content, IDFile &sysFile, bool16 &isMissingPlugins, bool16 bShowAlert=kFalse)=0 |
| virtual ICommand * | CreateOpenDocCmd (IDFile sysFile)=0 |
| virtual ErrorCode | ProcessModifySectionCmd (bool16 bDefaultSection, ISection *iSection, int32 newStartPageNum, const PMString *existingName, const PMString *existingMarker, ClassID existingStyleID, bool16 bPageNumIncludeSectionPrefix, bool16 doNotify=kFalse)=0 |
| virtual IDataBase::DBResultCode | BookDBCallback (int32 stepsDone, int32 stepCount)=0 |
| virtual bool16 | IsBookContent (IDocument *iDoc, IBook *iBook, int32 &position)=0 |
| virtual void | GetOversetState (IDocument *doc, K2Vector< bool16 > &state)=0 |
| virtual void | AlertMessageAboutDocument (IDFile sysFile, PMString alertMsg)=0 |
| virtual void | AlertMessageAboutDocument (PMString *docFullName, PMString alertMsg)=0 |
| virtual ErrorCode | ProcessRepagination (const PMString &bookName, const ISetRepaginationCmdOptions::UpdateOptionsEnum updateOptions=ISetRepaginationCmdOptions::kUpdatePageNumbers, const int32 &position=-1, const bool16 &bAutoConvertDocuments=kFalse)=0 |
| virtual int32 | GetStyleGroupNameIndex (const PMString &groupName)=0 |
| virtual PMString | GetStyleGroupName (int32 index)=0 |
| virtual ErrorCode | OpenBookWithUI (const IDFile &sysFile, UIDRef *openedBook=nil)=0 |
| virtual bool16 | GetActiveBookName (PMString &bookName)=0 |
| virtual IDocument * | OpenDocAtBackground (const IDFile &sysFile, bool16 &originalOpen, bool16 &isMissingPlugins)=0 |
| virtual int32 | GetBookRepaginateStartIndex (const PMString &bookName)=0 |
| virtual int32 | GetPageRange (IDocument *doc, PMString &pageRange)=0 |
| virtual int32 | GetNonHiddenStartPageNum (IDocument *doc)=0 |
| virtual ErrorCode | CanDocBeAddedToBook (IDFile &sysFile, int32 *firstPageNum, PMString &pageRangeString)=0 |
| virtual void | DisplayAlertString (PMString &alertString, IDFile &sysFile)=0 |
| virtual ErrorCode | ReplaceBookContentWithNewDocument (const UIDRef &bookContentRef, const IDFile &docFile, const IDFile &bookFile)=0 |
| virtual bool16 | IsMissingCriticalOrDefaultPlugins (IDocument *doc)=0 |
| virtual ErrorCode | SetAutoConvertDocument (const UIDRef &bookRef, const bool16 &bAutoConvertFlag, const bool16 &bSpecialHandlingBookModifyFlag=kFalse)=0 |
| virtual ErrorCode | SetMergeLayersFlag (const UIDRef &bookRef, const bool16 &mergeLayersFlag)=0 |
| virtual bool16 | IsBookCreatedInPreviousVersion (IBook *iBook)=0 |
| virtual bool16 | IsSourceDocumentAlreadyOpen (const IDFile &sourceFile, int32 &fileIndex)=0 |
| virtual IBook * | IsDocumentWithinCurrentBook (IDocument *doc)=0 |
| virtual void | CloseDocumentsInBook (OriginallyCloseDocInfo &docInfo)=0 |
| virtual ErrorCode | OpenOneDocument (IDataBase *bookDB, const UID bookContentUID, UIDRef &docRef, OriginallyCloseDocInfo &docInfo)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utility interface with methods relating to the model side of books (kBookBoss).
Bring up warning alert related to the the given document and alert message.
| sysFile | IN the file that serves as a parameter in the alert message. |
| alertMsg | IN the alert message appears in the warning alert. |
| pure virtual |
Bring up warning alert related to the the given document and alert message.
| docFullName | IN the document full name(with path) that serves as a parameter in the alert message. |
| alertMsg | IN the alert message appears in the warning alert. |
| pure virtual |
A callback to check if user hits cancel or not in the progress bar during open book action. We use stepsDone and stepCount to determine the progress of open action. This function is copied from DocumentUtils::DocDBCallback().
| stepsDone | IN a variable to quantify how much we have done. |
| stepCount | IN a variable to quantify how much total we should complete. |
| pure virtual |
Check if the give document/chapter can be added to a book or not.
| sysFile | IN the given document/chapter that is going to be added in a book. |
| firstPageNum | OUT the integer value for the first page number of the document. |
| pageRangeString | OUT the string that represents the page range of the document. |
| pure virtual |
Close the given documents (currentOpenedDocumentList) in the book.
| currentOpenedDocumentList | IN the given document list. |
| closeDocUndoStateList | IN the corresponding undo state list for the given opened document list. |
With the given document's SysFile, create an open document command without a layout window.
| sysFile | IN the file of the document to be open. |
Display the alert dialog with the given alert message and file name.
| alertString | IN the given alert message. |
| sysFile | IN the file name that is used as a parameter in the alert message. |
| pure virtual |
Find the corresponding document in the open document list with the given book content's UID and book's database.
| db | IN the database of book |
| content | IN the UID of document/chapter in book database |
| sysFile | OUT the document |
| isMissingPlugins | OUT flag indicates if there is missing plugins in the document or not. |
| bShowAlert | IN flag indicates if we should show the alert related to missing plugins or not. |
| pure virtual |
Get the current active book in this session. If there is an active book, book name will be passed out.
| bookName | OUT the name of the active book. |
| pure virtual |
Get the status (normal, missing, out of data, in use or open) of the document/chapter in the book.
| iBookContent | IN the document/chapter in the book. |
| pure virtual |
Get the position of document/chapter within the given book that from which we should start to do repagination.
| bookName | IN the name of the given book. |
| pure virtual |
Get the first non hidden page number and page range of the given document.
| doc | IN the given document we will get page information from. |
Get the status of overset for each story in the given document.
| doc | IN the given document. |
| state | a list of bool16 data corresponding to the overset status for individual stories in the document. |
Get the first page number and page range of the given document.
| doc | IN the given document we will get page information from. |
| pageRange | OUT the string representation of the page range like (3-10) |
| pure virtual |
Get the group name of the synchronization styles with the given index. Currently, we only support two groups: General Styles and CJK Styles.
| index | IN the passed index. |
| pure virtual |
Get the group index of synchronization styles with the give group name.
| groupName | IN the group name. |
| pure virtual |
Check if the given document is a book chapter or not. If it is, we will pass out the chapter's position in the book through param position; if it is not, we will set param position as -1.
| iDoc | IN the given document to check. |
| iBook | IN the given book. |
| position | OUT the position of the chapter in the book. |
| pure virtual |
Check if the given book is created in previous version or not.
| iBook | IN the book to check. |
Check if the given document is within current open book or not.
| doc | IN the given document. |
| pure virtual |
Check if the document has any critical or default plugins missing.
| doc | IN the given document to check. |
| pure virtual |
Check if the given source file is already open or not.
| sourceFile | IN the given file to check |
| fileIndex | OUT the index within the documentList. If file is not open, fileIndex will be -1. |
| pure virtual |
Open a book file with a book panel as the UI representation.
| sysFile | IN the book file to open. |
| openedBook | OUT the UIDRef of the opened book. |
| pure virtual |
Open the document without a layout window and bring up alert if document has data from missing plugins.
| sysFile | IN the given document file. |
| originalOpen | OUT flag indicates if document is originally opened or not. |
| isMissingPlugins | OUT flag indicates if document has missing plugin data or not. |
| pure virtual |
Open the document corresponding to the given book content. If there are
no available database, we will have to close the given opened document and update the undo state list.
| bookDB | IN the given book database. |
| bookContentUID | IN the given book content UID within book database. |
| currentOpenedDocumentList | IN the given opened document list. |
| closeDocUndoStateList | IN the corresponding undo state list for the given opened document lsit. |
| pure virtual |
Modify the given section with the new section's attributes(start page number, name, marker and style).
| bDefaultSection | IN flag indicates if this is a default section or not. |
| iSection | IN the section that is going to be modified. |
| newStartPageNum | IN the new start page number for the section. |
| existingName | IN the new name for the section. |
| existingMarker | IN the new marker for the section. |
| existingStyleID | IN the new style for the section. |
| bPageNumIncludeSectionPrefix | IN the flag indicates if we should include section prefix when do page numbering. |
| doNotify | IN the flag indicates if we should do notification when command is done. |
| pure virtual |
Do repagination starting from the given document/chapter position within the book. By default, we do repagination from the first document/chapter in the book.
| bookName | IN the book where we do the repagination. |
| updateOptions | IN operations to be done e.g. Repagination, Update Chapter and Paragrapgh Numbering, All |
| position | IN from which the repagination action start. |
| bAutoConvertDocuments | IN flag indicates if we should save the originally closed documents when close it. |
| pure virtual |
Replace the given book content(UIDRef in the book database) with a new document/chapter.
| bookContentRef | IN the given book content to be replaced with. |
| docFile | IN the document/chapter to be replace by. |
| bookFile | IN the given book. |
| pure virtual |
Set auto conversion flag in the book.
| bookRef | IN the book that we want to alter |
| bAutoConvertFlag | IN the new flag(either kTrue or kFalse) for auto conversion in book. |
| bSpecialHandlingBookModifyFlag | IN kTrue = we should do special handling of book modification flag when the auto convert setting is set; otherwise (kFalse) indicates don't any special handling. |
| pure virtual |
Set merge layers flag in the book.
| bookRef | IN the book that we want to alter |
| mergeLayersFlag | IN the new flag(either kTrue or kFalse) for merging identical layers in book when exporting. |