wxArt2D
Classes | Macros | Typedefs | Enumerations | Variables
docviewref.h File Reference

Docview classes for document view, window and frame. More...

#include "wx/defs.h"
#include "wx/list.h"
#include "wx/string.h"
#include "wx/frame.h"
#include "wx/filename.h"
#include <wx/splitter.h>
#include "wx/notebook.h"
#include "sigslot.h"
#include "wx/print.h"
#include <wx/listimpl.cpp>
#include "wx/general/genmod.h"
#include "wx/xmlparse/genxmlpars.h"
#include "wx/wfstream.h"
Include dependency graph for docviewref.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  a2dTemplateFlag
 Template flags. More...
 
class  a2dCloseViewEvent
 see a2dDocumentEvent More...
 
class  a2dViewEvent
 a2dView event, to report events in the a2dView class More...
 
class  a2dCloseDocumentEvent
 sent to document before closing More...
 
class  a2dDocumentEvent
 used to report a2dDocument events More...
 
class  a2dTemplateEvent
 event sent to a2dViewConnector More...
 
class  a2dDocument
 The document class can be used to model an application's file-based data. More...
 
class  a2dView
 Holds a view on a a2dDocument. More...
 
class  a2dDocumentTemplate
 The a2dDocumentTemplate class is used to model the relationship between a document class and files. More...
 
class  a2dDocumentTemplateAuto
 Automatic template, which searches a suitable handler for the document. More...
 
class  a2dViewTemplate
 The a2dViewTemplate class is used to model the relationship between a document class and a view class. More...
 
class  a2dViewConnector
 This class is used to connect newly created a2dView's to a wxFrame and/or wxWindow. More...
 
class  a2dFrameViewConnector
 uses a wxFrame to hold new views or to create child wxFrame's to hold new views. More...
 
class  a2dWindowConnector< Twindow >
 a connector which holds one pointer to a wxWindow derived class being the template parameter. More...
 
class  a2dScrolledWindowViewConnector
 extend a2dViewConnector to have a a2dDocumentViewScrolledWindow for each view. More...
 
class  a2dWindowViewConnector
 extend a2dViewConnector to have a a2dDocumentViewScrolledWindow for each view. More...
 
class  a2dSplitterConnector< Twindow >
 extend wxSameFrameViewConnector to connect view into a splitter window More...
 
class  wxNotebookConnector< NoteBook, Twindow, Tview >
 extend a2dWindowConnector to connect views into a wxNotebook window More...
 
class  a2dDocumentPrintout
 print a document More...
 
class  a2dDocumentFrame
 The a2dDocumentFrame class provides a default frame for displaying documents. More...
 
class  a2dViewWindow< Twindow >
 specialized wxWindow derived template class to handle a2dView events More...
 
class  a2dDocumentViewScrolledWindow
 specialized wxScrolledWindow to handle a2dView events More...
 
class  a2dDocumentViewWindow
 specialized wxWindow to handle a2dView events More...
 

Macros

#define A2DDOCVIEWDLLEXP
 
#define A2DDOCVIEWDLLEXP_DATA(type)   type
 
#define A2DDOCVIEWDLLEXP_CTORFN
 
#define a2dDocumentCloseEventHandler(func)   (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(a2dDocumentCloseEventFunction, &func)
 
#define a2dDocumentEventHandler(func)   (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(a2dDocumentEventFunction, &func)
 
#define a2dViewCloseEventHandler(func)   (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(a2dViewCloseEventFunction, &func)
 
#define a2dViewEventHandler(func)   (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(a2dViewEventFunction, &func)
 
#define a2dTemplateEventHandler(func)   (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(a2dTemplateEventFunction, &func)
 
#define EVT_DISCONNECT_ALLVIEWS(func)   wx__DECLARE_EVT0( wxEVT_DISCONNECT_ALLVIEWS, a2dDocumentEventHandler( func ))
 event for document before all view are closed.
 
#define EVT_CLOSE_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_CLOSE_DOCUMENT, a2dDocumentCloseEventHandler( func ))
 event for document before a document will be closed ( can veto)
 
#define EVT_OPEN_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_OPEN_DOCUMENT, a2dDocumentEventHandler( func ))
 event for document when a document has been opened
 
#define EVT_NEW_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_NEW_DOCUMENT, a2dDocumentEventHandler( func ))
 event for document when a document new document was created
 
#define EVT_CREATE_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_CREATE_DOCUMENT, a2dDocumentEventHandler( func ))
 event sent to document from template when a document has been created
 
#define EVT_SAVE_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_SAVE_DOCUMENT, a2dDocumentEventHandler( func ))
 event sent to document when a document needs to be saved
 
#define EVT_SAVEAS_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_SAVEAS_DOCUMENT, a2dDocumentEventHandler( func ))
 event sent to document when a document needs to be saved in a different file
 
#define EVT_SAVE_MODIFIED_DIALOG_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_SAVE_MODIFIED_DIALOG_DOCUMENT, a2dDocumentEventHandler( func ))
 event sent to document when a document is modified and the user may save or not
 
#define EVT_EXPORT_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_EXPORT_DOCUMENT, a2dDocumentEventHandler( func ))
 event for document when a document will be exported
 
#define EVT_IMPORT_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_IMPORT_DOCUMENT, a2dDocumentEventHandler( func ))
 event for document when a document will be imported
 
#define EVT_UPDATE_VIEWS(func)   wx__DECLARE_EVT0( wxEVT_UPDATE_VIEWS, a2dDocumentEventHandler( func ))
 event from a document when its views need to be updated
 
#define EVT_ENABLE_VIEWS(func)   wx__DECLARE_EVT0( wxEVT_ENABLE_VIEWS, a2dDocumentEventHandler( func ))
 event from a document when its views need to be enabled or disabled
 
#define EVT_REPORT_VIEWS(func)   wx__DECLARE_EVT0( wxEVT_REPORT_VIEWS, a2dDocumentEventHandler( func ))
 event from a document when its views need to reported
 
#define EVT_CHANGEDFILENAME_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_CHANGEDFILENAME_DOCUMENT, a2dDocumentEventHandler( func ))
 event sent to view when the filename of a document has changed.
 
#define EVT_CHANGEDTITLE_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_CHANGEDTITLE_DOCUMENT, a2dDocumentEventHandler( func ))
 event sent to view when the title of a document has changed.
 
#define EVT_CHANGEDMODIFY_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_CHANGEDMODIFY_DOCUMENT, a2dDocumentEventHandler( func ))
 event send from a document when modified status changed.
 
#define EVT_POST_LOAD_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_POST_LOAD_DOCUMENT, a2dDocumentEventHandler( func ))
 event send from a document just after a document was loaded from a file
 
#define EVT_CLOSE_VIEW(func)   wx__DECLARE_EVT0( wxEVT_CLOSE_VIEW, a2dViewCloseEventHandler( func))
 event sent to document and view when a view needs to be closed ( can veto)
 
#define EVT_CREATE_VIEW(func)   wx__DECLARE_EVT0( wxEVT_CREATE_VIEW, a2dViewEventHandler( func ))
 event sent to view from template when a view has been created
 
#define EVT_SET_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_SET_DOCUMENT, a2dViewEventHandler( func ))
 event sent to view when a new document is ser for it.
 
#define EVT_ACTIVATE_VIEW(func)   wx__DECLARE_EVT0( wxEVT_ACTIVATE_VIEW, a2dViewEventHandler( func ))
 event sent to view and document manager
 
#define EVT_ACTIVATE_VIEW_SENT_FROM_CHILD(func)   wx__DECLARE_EVT0( wxEVT_ACTIVATE_VIEW_SENT_FROM_CHILD, a2dViewEventHandler( func ))
 event sent from view and its display up the parent chain.
 
#define EVT_ENABLE_VIEW(func)   wx__DECLARE_EVT0( wxEVT_ENABLE_VIEW, a2dViewEventHandler( func ))
 event sent to connector to disable or enable for a certain view
 
#define EVT_ADD_VIEW(func)   wx__DECLARE_EVT0( wxEVT_ADD_VIEW, a2dDocumentEventHandler( func ))
 event sent to document when a view has been added to the document
 
#define EVT_REMOVE_VIEW(func)   wx__DECLARE_EVT0( wxEVT_REMOVE_VIEW, a2dDocumentEventHandler( func ))
 event sent to document when a view will be removed from the document
 
#define EVT_PRE_ADD_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_PRE_ADD_DOCUMENT, a2dTemplateEventHandler( func ))
 sent from a doc template after it created a document
 
#define EVT_POST_CREATE_DOCUMENT(func)   wx__DECLARE_EVT0( wxEVT_POST_CREATE_DOCUMENT, a2dTemplateEventHandler( func ))
 sent from a doc template after it created a document
 
#define EVT_POST_CREATE_VIEW(func)   wx__DECLARE_EVT0( wxEVT_POST_CREATE_VIEW, a2dTemplateEventHandler( func ))
 sent from a view template after it created a view
 
#define EVT_DISCONNECT_VIEW(func)   wx__DECLARE_EVT0( wxEVT_DISCONNECT_VIEW, a2dTemplateEventHandler( func ))
 event sent to connector to disconnect a certain view from its document
 
#define EVT_CHANGEDFILENAME_VIEW(func)   wx__DECLARE_EVT0( wxEVT_CHANGEDFILENAME_VIEW, a2dViewEventHandler( func ))
 event sent from view upwards to display, when the filename of a document has changed.
 
#define EVT_CHANGEDTITLE_VIEW(func)   wx__DECLARE_EVT0( wxEVT_CHANGEDTITLE_VIEW, a2dViewEventHandler( func ))
 event sent from view upwards to display, when the title of a document has changed.
 
#define wxBEGIN_EVENT_TABLE_TEMPLATE3(theClass, baseClass, T1, T2, T3)
 

Typedefs

typedef a2dSmrtPtr< a2dDocumenta2dDocumentPtr
 document smart pointer
 
typedef a2dSmrtPtr< a2dViewa2dViewPtr
 view smart pointer
 
typedef a2dSmrtPtr
< a2dViewTemplate
a2dViewTemplatePtr
 a2dViewTemplate smart pointer
 
typedef a2dSmrtPtr
< a2dDocumentTemplate
a2dDocumentTemplatePtr
 a2dDocumentTemplate smart pointer
 
typedef a2dSmrtPtrList
< a2dDocument
a2dDocumentList
 list of documents
 
typedef a2dSmrtPtrList< a2dViewa2dViewList
 list of views
 
typedef a2dSmrtPtrList
< a2dDocumentTemplate
a2dDocumentTemplateList
 list of document templates
 
typedef a2dSmrtPtrList
< a2dViewTemplate
a2dViewTemplateList
 list of view templates
 
typedef a2dDocumentList::iterator a2dDocumentListIter
 iterator for list of ...
 
typedef a2dViewList::iterator a2dViewListIter
 iterator for list of ...
 
typedef
a2dDocumentTemplateList::iterator 
a2dDocumentTemplateListIter
 iterator for list of ...
 
typedef
a2dViewTemplateList::iterator 
a2dViewTemplateListIter
 iterator for list of ...
 
typedef unsigned int a2dDocumentFlagMask
 mask of flags for a2dDocumentFlag
 
typedef unsigned int a2dTemplateFlagMask
 mask of flags for a2dTemplateFlag
 
typedef void(wxEvtHandler::* a2dDocumentCloseEventFunction )(a2dCloseDocumentEvent &)
 
typedef void(wxEvtHandler::* a2dDocumentEventFunction )(a2dDocumentEvent &)
 
typedef void(wxEvtHandler::* a2dViewCloseEventFunction )(a2dCloseViewEvent &)
 
typedef void(wxEvtHandler::* a2dViewEventFunction )(a2dViewEvent &)
 
typedef void(wxEvtHandler::* a2dTemplateEventFunction )(a2dTemplateEvent &)
 
typedef a2dWindowConnector
< a2dDocumentViewScrolledWindow
a2dWindowConnectorFora2dDocumentViewScrolledWindow
 lua wrap
 
typedef a2dWindowConnector
< a2dDocumentViewWindow
a2dWindowConnectorFora2dDocumentViewWindow
 lua wrap
 

Enumerations

enum  a2dDocumentFlag {
  a2dREFDOC_NON = 0x00000000, a2dREFDOC_NEW = 0x00000001, a2dREFDOC_SILENT = 0x00000002, a2dREFDOC_INIT = 0x00000004,
  a2dREFDOC_ALL = 0xFFFFFFFF, a2dDEFAULT_DOCUMENT_FLAGS = a2dREFDOC_NON
}
 Document manager flags. More...
 
enum  a2dViewUpdateFlags { a2dVIEW_UPDATE_ALL = 0x0004 }
 mask flags for a2dDocument::UpdateAllViews() More...
 

Variables

const a2dPrintWhat a2dPRINT_Print
 general print
 
const a2dPrintWhat a2dPRINT_Preview
 general print preview
 
const a2dPrintWhat a2dPRINT_PrintView
 print a2dView
 
const a2dPrintWhat a2dPRINT_PreviewView
 preview print a2dView
 
const a2dPrintWhat a2dPRINT_PrintDocument
 print a2dDocument
 
const a2dPrintWhat a2dPRINT_PreviewDocument
 preview print a2dDocument
 
const a2dPrintWhat a2dPRINT_PrintSetup
 

Detailed Description

Docview classes for document view, window and frame.

All classes for a document view framework are placed in here. Only the controlling a2dDocumentCommandProcessor is in doccom.h.

One or more documents are used to stor the application data, and views do display the data in the documents. ViewConnectors are used to couple views to the windows in the application GUI. Either a connector generates new frames and windows to achieve this or it used the existing frames or windows.

The view connectors is the key factor for having a separate document view frame work besides wxWidgets its own. wxDocview needed views which could live seperately from the GUI itself, and even the application itself. Special designed views like the a2dCanvasView is designed for displaying a2dCanvasDocument, and is placed in the library to be used where needed. The view connectors made this possible.

Author
Julian Smart
Klaas Holwerda
Date
Created 01/02/97

Copyright: (c)

Licence: wxWidgets licence

Modified by: Klaas Holwerda

RCS-ID:

Id:
docviewref.h,v 1.67 2009/09/29 20:06:47 titato Exp

Definition in file docviewref.h.

Macro Definition Documentation

#define wxBEGIN_EVENT_TABLE_TEMPLATE3 (   theClass,
  baseClass,
  T1,
  T2,
  T3 
)
Value:
template<typename T1, typename T2, typename T3> \
const wxEventTable theClass<T1, T2, T3>::sm_eventTable = \
{ &baseClass::sm_eventTable, &theClass<T1, T2, T3>::sm_eventTableEntries[0] }; \
template<typename T1, typename T2, typename T3> \
const wxEventTable *theClass<T1, T2, T3>::GetEventTable() const \
{ return &theClass<T1, T2, T3>::sm_eventTable; } \
template<typename T1, typename T2, typename T3> \
wxEventHashTable theClass<T1, T2, T3>::sm_eventHashTable(theClass<T1, T2, T3>::sm_eventTable); \
template<typename T1, typename T2, typename T3> \
wxEventHashTable &theClass<T1, T2, T3>::GetEventHashTable() const \
{ return theClass<T1, T2, T3>::sm_eventHashTable; } \
template<typename T1, typename T2, typename T3> \
const wxEventTableEntry theClass<T1, T2, T3>::sm_eventTableEntries[] = { \

Definition at line 3240 of file docviewref.h.

Enumeration Type Documentation

Document manager flags.

Enumerator
a2dREFDOC_NON 

No flag

a2dREFDOC_NEW 

create a New empty document

a2dREFDOC_SILENT 

For adding a document by reading from file given a path as input

a2dREFDOC_INIT 

to initialize new documents when added to the framework

a2dREFDOC_ALL 

For Xor ing and all set

Definition at line 178 of file docviewref.h.

mask flags for a2dDocument::UpdateAllViews()

Enumerator
a2dVIEW_UPDATE_ALL 

total area displayed by drawer is added as pending to arealist (removes all other pending areas)

Definition at line 190 of file docviewref.h.

docviewref.h File Reference -- Sun Oct 12 2014 17:04:26 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation