#include <IBookManager.h>
|
| virtual IBook * | CreateBook (const IDFile &whatBook, IDataBase::ProtectionLevel protection, void *platformFileInfo=nil)=0 |
| |
| virtual IBook * | OpenBook (const IDFile &whatFile, IDataBase::ProtectionLevel protection, bool16 *bAlreadyOpen, bool16 bOpenExclusive=kFalse, UIFlags alertMissingPlugIns=kAskMissing)=0 |
| |
| virtual IBook * | RecoverBook (const IDFile *pubFile, const IDFile *miniSaveFile, IDataBase::ProtectionLevel protection, void *fileInfo=nil)=0 |
| |
| virtual void | CloseBook (IBook *iBook)=0 |
| |
| virtual void | CloseAll ()=0 |
| |
| virtual IBook * | GetNthBook (int32 n)=0 |
| |
| virtual int32 | GetBookIndex (IBook *iBook)=0 |
| |
| virtual int32 | GetBookCount ()=0 |
| |
| virtual IBook * | GetCurrentActiveBook ()=0 |
| |
| virtual void | SetCurrentActiveBook (IBook *iBook)=0 |
| |
| virtual IBook * | FindOpenBookByName (const IDFile &whatBook)=0 |
| |
| virtual bool16 | IsDocumentWithinOpenBooks (IDocument *doc, PMString &bookName)=0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
This interface is used to create, open, manage, and close books. The syntax for CreateBook (kNewBookCmdBoss), OpenBook (kOpenBookCmdBoss), RecoverBook (kRecoverBookCmdBoss) and CloseBook (kCloseBookCmdBoss) is similar to IDocumentList.
- See Also
- kSessionBoss
- IDocumentList
UI flag, used for handling missing plug-in conditions
| Enumerator |
|---|
| kIgnoreMissing | ask the user how to handle missing plug-ins |
| kCancelMissing | ignore any missing plug-ins cancel open if there are default or critical plug-ins missing |
| virtual void IBookManager::CloseAll | ( | | ) | |
| pure virtual |
Close all opened books.
- Parameters
| virtual void IBookManager::CloseBook | ( | IBook * | iBook | ) | |
| pure virtual |
Close the given book.
- Parameters
| iBook | IN the book to close. |
Create a new book. The new book is added to the open book list in the book manager. This method starts a transaction on the newly created database that has to be ended by the caller.
- Parameters
| whatBook | IN the given name for the newly created book. |
| protection | IN DataBase's protection level, See IDataBase.h |
| platformFileInfo | IN (default=nil) only for MAC, store file creator type and and pub type. |
- Returns
- IBook* newly created book.
| virtual IBook* IBookManager::FindOpenBookByName | ( | const IDFile & | whatBook | ) | |
| pure virtual |
Find the book with the given book file. Search to see if whatBook is already open or not.
- Parameters
| whatBook | IN the book file to search. |
- Returns
- IBook* the result book. Returns nil means whatBook is not open.
| virtual int32 IBookManager::GetBookCount | ( | | ) | |
| pure virtual |
Get number of open books
- Parameters
- Returns
- int32 the number of opened books.
| virtual int32 IBookManager::GetBookIndex | ( | IBook * | iBook | ) | |
| pure virtual |
Get the index of the given book.
- Parameters
- Returns
- int32 the index of the book (0-based).
| virtual IBook* IBookManager::GetCurrentActiveBook | ( | | ) | |
| pure virtual |
Get current active book in the open book list. There is only one active book.
- Parameters
- Returns
- IBook* the active book.
| virtual IBook* IBookManager::GetNthBook | ( | int32 | n | ) | |
| pure virtual |
Get nth book in the open book list.
- Parameters
| n | IN index of of the document (0-based) |
- Returns
- IBook* the nth open book.
| virtual bool16 IBookManager::IsDocumentWithinOpenBooks | ( | IDocument * | doc, | | | PMString & | bookName | | ) | | |
| pure virtual |
Utility function for checking if the given document is within current open books or not. Currently, this is used in table of content for generating table of content across book.
- Parameters
| doc | IN the document to check. |
| bookName | OUT the book which the given document is IN. |
- Returns
- bool16 kTrue means the given document is in the open books, otherwise, return kFalse.
Open a book. The opened book is added to the open book list in the book manager. This method starts a transaction on the newly created database that has to be ended by the caller.
- Parameters
| whatFile | IN IDFile to open |
| protection | IN DataBase's protection level, See IDataBase.h |
| bAlreadyOpen | OUT kTrue means book is already opened, otherwise, kFalse. |
| bOpenExclusive | IN if kFalse(default), open a copy file, otherwise, open original. |
| alertMissingPlugIns | IN UIFlag for dealing with missing plugins. |
- Returns
- IBook* the opened book.
Recover and open a book identified by the given pubFile. This method starts a transaction on the newly created database that has to be ended by the caller.
- Parameters
| pubFile | IN IDFile to recover. |
| miniSaveFile | IN IDFile stores mini save. |
| protection | IN DataBase's protection level. |
| fileInfo | IN (default=nil) only for MAC, store file creator type and and pub type. |
- Returns
- IBook* the recovered book.
| virtual void IBookManager::SetCurrentActiveBook | ( | IBook * | iBook | ) | |
| pure virtual |
Set the given book as the active book.
- Parameters
| iBook | the book to be set as active. |