VCF::MDIPolicy Class Reference
class MDIPolicy policy class for a Multiple Document Interface (MDI). More...
#include <vcf/ApplicationKit/DocManagerPolicy.h>
Public Member Functions | |
| MDIPolicy () | |
| bool | usesMainWindow () |
| tells if we want the application to use the main applicaiton's window for a document this is false in a MDI application, as child windows are used instead. | |
| bool | saveBeforeNewDocument () |
| tells if we want the application to save the current document before activating a new document | |
| void | afterNewDocument (Document *newDocument) |
| callback function managing the operation to be done after a new document has been created | |
| Document * | getCurrentDocument () |
| gets the document that currently has the focus, so to speak, in the application | |
| void | setCurrentDocument (VCF::Document *doc) |
| sets the specified document as the active one in the application | |
| void | closeDocument () |
| closes the window associated to the current document | |
| bool | closeDocumentWindow (Window *window) |
| closes the specified window and activates the next document window in the internal list | |
| void | lastDocumentClosed () |
| specifies what to do after the last application's document has been closed the defalt behaviour is, for the moment, to close the entire application this will be rewritten in a different way soon | |
| String | getDocumentName (Document *doc) |
| gets the appropriate name for the current document , the name | |
| void | documentWindowActivated (Window *window) |
| String | getDocumentWindowCaption (Document *doc) |
| gets the appropriate name for the current document , the name | |
| void | mergeWindowMenus (Menu *appMenu, Menu *documentWindowMenu) |
| merges the menu specific of the document window, with the generic application's menu an internal vector keeps track of the menus already merged so this is done only once Menu* appMenu, the menu general for any application Menu* documentWindowMenu, the menu specific for the document window we need | |
Static Public Member Functions | |
| static void | postQuitEventLoop (Event *e) |
Public Attributes | |
| std::map< Window *, Document * > | documents_ |
| the association map between each window and its document in the application in a standard MDI this relationship is one to one | |
| std::vector< Menu * > | mergedMenus_ |
| vector used to keep track of the menus already merged | |
| int32 | documentCount_ |
| the total number of newly created documents | |
Detailed Description
class MDIPolicy policy class for a Multiple Document Interface (MDI).This is the implementation of the regular MDI architecture, with all the tipical operations with documents that we can find in an application having many (more than one) documents. It is set up to have 1 Document class associated with 1 Window instance, i.e. it is a one to one relationship. Each window is a real indipendent window.
Constructor & Destructor Documentation
|
|
|
Member Function Documentation
|
|
callback function managing the operation to be done after a new document has been created
|
|
|
closes the window associated to the current document
|
|
|
closes the specified window and activates the next document window in the internal list
|
|
|
|
|
|
gets the document that currently has the focus, so to speak, in the application
|
|
|
gets the appropriate name for the current document , the name
|
|
|
gets the appropriate name for the current document , the name
|
|
|
specifies what to do after the last application's document has been closed the defalt behaviour is, for the moment, to close the entire application this will be rewritten in a different way soon
|
|
||||||||||||
|
merges the menu specific of the document window, with the generic application's menu an internal vector keeps track of the menus already merged so this is done only once Menu* appMenu, the menu general for any application Menu* documentWindowMenu, the menu specific for the document window we need
|
|
|
|
|
|
tells if we want the application to save the current document before activating a new document
|
|
|
sets the specified document as the active one in the application
|
|
|
tells if we want the application to use the main applicaiton's window for a document this is false in a MDI application, as child windows are used instead.
|
Member Data Documentation
|
|
the total number of newly created documents
|
|
|
the association map between each window and its document in the application in a standard MDI this relationship is one to one
|
|
|
vector used to keep track of the menus already merged
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/DocManagerPolicy.h
