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

#include <IDocumentList.h>

Inheritance diagram for IDocumentList:
IPMUnknown

Public Types

enum  UIFlags {
  kAskMissing, kIgnoreMissing, kCancelMissing, kForceIgnoreMissing,
  kDontCheck
}
 

Public Member Functions

virtual int32 GetDocCount (bool16 bClosePlacedINDDFiles=kFalse) const =0
 
virtual IDocumentGetNthDoc (int32 n)=0
 
virtual IDocumentFindDoc (const IDFile &whatFile) const =0
 
virtual IDocumentFindDocByDataBase (IDataBase *db) const =0
 
virtual IDocumentFindDocFromPreviousVersion (const IDFile &whatFile)=0
 
virtual IDocumentNewDoc (const ClassID &docClassID, IDataBase::ProtectionLevel protection, void *fileInfo=nil, IDocument::UndoSupport undoSupport=IDocument::kFullUndoSupport)=0
 
virtual IDocumentOpenDoc (const IDFile &whatFile, IDataBase::ProtectionLevel protection, bool16 bOpenOriginal=true, UIFlags alertMissingPlugIns=kAskMissing, bool16 bUseLockFile=kTrue, IDocument::UndoSupport undoSupport=IDocument::kFullUndoSupport)=0
 
virtual IDocumentOpenDocClone (IDataBase *db, const PMString &docName)=0
 
virtual IDocumentRecoverDoc (const IDFile *pubFile, const IDFile *miniSaveFile, IDataBase::ProtectionLevel protection, void *fileInfo=nil, bool16 bIsFauxUserFile=kFalse, IDocument::UndoSupport undoSupport=IDocument::kFullUndoSupport)=0
 
virtual void CloseDoc (IDocument *doc)=0
 
virtual void CloseDocClone (IDocument *doc)=0
 
virtual void CloseAll ()=0
 
virtual void PurgeMemory (int32 level)=0
 
virtual IDocumentFindDoc (const std::string &assetRef) const =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

IID_IDOCUMENTLIST interface store a list of open documents.

Member Enumeration Documentation

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

kForceIgnoreMissing 

cancel open if there are default or critical plug-ins missing

kDontCheck 

force ignore of missing plug-ins for this and all subsequent opens of this doc

Member Function Documentation

virtual void IDocumentList::CloseAll ()
pure virtual

Close all open documents

Parameters
none
virtual void IDocumentList::CloseDoc (IDocumentdoc)
pure virtual

Close the document

Note
Third Party Developers should use a command (such as kCloseDocCmdBoss) instead. IDocumentCommands contains command generator methods for convenience.
See Also
IDocumentCommands.h
Parameters
docDocument to close
virtual void IDocumentList::CloseDocClone (IDocumentdoc)
pure virtual

Close document clone

Parameters
docDocument to close
virtual IDocument* IDocumentList::FindDoc (const IDFilewhatFile) const
pure virtual

Find the document with the document file. Search to see if one (whatFile) is already open. If so, return it

Parameters
whatFileIDFile.
Returns
IDocument the open documents
virtual IDocument* IDocumentList::FindDoc (const std::string & assetRef) const
pure virtual
 Find the document with the asset Ref

         Search  to see if one (whatFile) is already open. If so, return it

Parameters
assetRefCloud asset URI
virtual IDocument* IDocumentList::FindDocByDataBase (IDataBasedb) const
pure virtual

Find the document with the database. Search to see if one (db) is already open. If so, return it

Parameters
dbIDataBase.
Returns
IDocument the open documents
virtual IDocument* IDocumentList::FindDocFromPreviousVersion (const IDFilewhatFile)
pure virtual

Search the open documents to see if one is already open(document could be previous version). If so, return it.

Parameters
whatFileIDFile
Returns
IDocument the open document
virtual int32 IDocumentList::GetDocCount (bool16 bClosePlacedINDDFiles = kFalse) const
pure virtual

Get number of open documents. Headless documents are counted.

Parameters
bClosePlacedINDDFiles,:If kTrue, closes any placed INDD files that may be opened, before counting the number of opened documents
Returns
int32 the number of documents in the list
See Also
ILayoutUIUtils.h, GetUIDocumentWindowCount
virtual IDocument* IDocumentList::GetNthDoc (int32 n)
pure virtual

Get n'th document

Parameters
nindex of of the document (0-based)
Returns
IDocument the n'th document
virtual IDocument* IDocumentList::NewDoc (const ClassIDdocClassID,
IDataBase::ProtectionLevel protection,
void * fileInfo = nil,
IDocument::UndoSupport undoSupport = IDocument::kFullUndoSupport 
)
pure virtual

Create a new document. The new document is added to the document list. This method starts a transaction on the newly created database that has to be ended by the caller.

Note
Third Party Developers should use a command (such as kNewDocCmdBoss) instead. IDocumentCommands contains command generator methods for convenience.
See Also
IDocumentCommands.h
Parameters
docClassIDDocument boss's class id
protectionDataBase's protection level, See IDataBase.h
fileInfo(default=nil) for MAC, store file creator type and and pub type
undoSupport(default=IDocument::kFullUndoSupport), indicates whether commands that change the document will appear on the undo menu
Returns
IDocument newly created document
virtual IDocument* IDocumentList::OpenDoc (const IDFilewhatFile,
IDataBase::ProtectionLevel protection,
bool16 bOpenOriginal = true,
UIFlags alertMissingPlugIns = kAskMissing,
bool16 bUseLockFile = kTrue,
IDocument::UndoSupport undoSupport = IDocument::kFullUndoSupport 
)
pure virtual

Open a document; The new document is added to the document list; This method starts a transaction on the newly created database that has to be ended by the caller.

Note
Third Party Developers should use a command (such as kOpenDocCmdBoss) instead. IDocumentCommands contains command generator methods for convenience.
See Also
IDocumentCommands.h
Parameters
whatFileIDFile to open
protectionDataBase's protection level, See IDataBase.h
bOpenOriginalif kTrue(default), open original file otherwise, open a copy
alertMissingPlugInsUIFlag, default = kAskMissing, alert if missing plugin is detected. kIgnoreMissing, Ignore missing plugin kCancelMissing, Cancel open when missing plugin kIgnoreMissing, Don't alert on missing plugin data from file kDontCheck, don't check missing plugins
bUseLockFiledefault = kTrue, if use lock file
undoSupport(default=IDocument::kFullUndoSupport), indicates whether commands that change the document will appear on the undo menu
Returns
IDocument opened document
virtual IDocument* IDocumentList::OpenDocClone (IDataBasedb,
const PMStringdocName 
)
pure virtual

Open a document clone; The new document is added to the document list;

Parameters
dbIDataBase
docNamename to use for the document
Returns
IDocument opened document
virtual void IDocumentList::PurgeMemory (int32 level)
pure virtual

Purges unused memory in each of the documents

Parameters
levellevels from MemUtils.h
virtual IDocument* IDocumentList::RecoverDoc (const IDFilepubFile,
const IDFileminiSaveFile,
IDataBase::ProtectionLevel protection,
void * fileInfo = nil,
bool16 bIsFauxUserFile = kFalse,
IDocument::UndoSupport undoSupport = IDocument::kFullUndoSupport 
)
pure virtual

Recover and open a document identified by recoveryID This method starts a transaction on the newly created database that has to be ended by the caller.

Note
Third Party Developers should use a command (such as kRecoverDocumentCmdBoss) instead. IDocumentCommands contains command generator methods for convenience.
See Also
IDocumentCommands.h
Parameters
pubFileIDFile to recover
miniSaveFileIDFile stores mini save
protectionDataBase's protection level
fileInfo(default=nil) for MAC, store file creator type and and pub type
bIsFauxUserFile(default=kFlase), if is faux user file, (currently, incopy user file)
undoSupport(default=IDocument::kFullUndoSupport), indicates whether commands that change the document will appear on the undo menu
Returns
IDocument recovered document