OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Document Manager

The document manager maintains the list of template instances used in your application and the list of current documents.

Every application that uses Doc/View documents must have a document manager, but each instance of an application can have only one document manager at a time. The document manager brings the Doc/View model together: document classes, view classes, and templates. The document manager provides a default File menu and default handling for each of the following choices on the File menu:

Menu choiceHandling
NewCreates a new document.
Open...Opens an existing document.
SaveSaves the current document.
Save As...Saves the current document with a new name.
Revert To SavedReverts changes to the last document saved.
CloseCloses the current document.
ExitQuits the application, prompts to save documents.

After you have written your document and view classes, defined any necessary templates, and made instances of the required templates, you need to create your document manager. When the document manager is created, it sets up its list of template instances and (if specified in the constructor) sets up its menu. Then whenever it receives one of the events that it handles, it performs the command specified for that event (see Using the Document Manager"). @section seealso See Also - \ref associatingdocumentandviewclasses "Associating Document and View Classes" - \ref documents "Document Objects" - \ref views "View Objects" - \ref usingthedocumentmanager "Using the Document Manager"