Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::MDIPolicy Class Reference

class MDIPolicy policy class for a Multiple Document Interface (MDI). More...

#include <vcf/ApplicationKit/DocManagerPolicy.h>

List of all members.

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
DocumentgetCurrentDocument ()
 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

VCF::MDIPolicy::MDIPolicy  )  [inline]
 


Member Function Documentation

void VCF::MDIPolicy::afterNewDocument Document newDocument  )  [inline]
 

callback function managing the operation to be done after a new document has been created

void VCF::MDIPolicy::closeDocument  )  [inline]
 

closes the window associated to the current document

bool VCF::MDIPolicy::closeDocumentWindow Window window  )  [inline]
 

closes the specified window and activates the next document window in the internal list

void VCF::MDIPolicy::documentWindowActivated Window window  )  [inline]
 

Document* VCF::MDIPolicy::getCurrentDocument  )  [inline]
 

gets the document that currently has the focus, so to speak, in the application

String VCF::MDIPolicy::getDocumentName Document doc  )  [inline]
 

gets the appropriate name for the current document , the name

String VCF::MDIPolicy::getDocumentWindowCaption Document doc  )  [inline]
 

gets the appropriate name for the current document , the name

void VCF::MDIPolicy::lastDocumentClosed  )  [inline]
 

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

void VCF::MDIPolicy::mergeWindowMenus Menu appMenu,
Menu documentWindowMenu
[inline]
 

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 void VCF::MDIPolicy::postQuitEventLoop Event e  )  [inline, static]
 

bool VCF::MDIPolicy::saveBeforeNewDocument  )  [inline]
 

tells if we want the application to save the current document before activating a new document

void VCF::MDIPolicy::setCurrentDocument VCF::Document doc  )  [inline]
 

sets the specified document as the active one in the application

bool VCF::MDIPolicy::usesMainWindow  )  [inline]
 

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

int32 VCF::MDIPolicy::documentCount_
 

the total number of newly created documents

std::map<Window*,Document*> VCF::MDIPolicy::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*> VCF::MDIPolicy::mergedMenus_
 

vector used to keep track of the menus already merged


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information