wxArt2D
Public Member Functions | Public Attributes | List of all members

used to report a2dDocument events More...

#include <docviewref.h>

Inheritance diagram for a2dDocumentEvent:
Inheritance graph
[legend]
Collaboration diagram for a2dDocumentEvent:
Collaboration graph
[legend]

Public Member Functions

 a2dDocumentEvent (wxEventType type, const wxFileName &filename, a2dDocumentFlagMask flags=a2dREFDOC_NON, int id=0)
 for event types More...
 
 a2dDocumentEvent (wxEventType type, a2dDocumentTemplate *doctemplate, const wxFileName &filename=wxFileName(wxT("")), a2dDocumentFlagMask flags=a2dREFDOC_NON, int id=0)
 for event types More...
 
 a2dDocumentEvent (wxEventType type, a2dView *view=NULL, bool enable=true, int id=0)
 for event types More...
 
 a2dDocumentEvent (const a2dDocumentEvent &event)
 constructor
 
void Veto ()
 veto the operation (usually it's allowed by default)
 
void Allow ()
 allow the operation if it was disabled by default
 
bool IsAllowed () const
 for implementation code only: is the operation allowed?
 
void SetFileName (const wxFileName &filename)
 set filename of file to open, before sending the event.
 
wxFileName & GetFileName ()
 get filename of file to open
 
virtual wxEvent * Clone () const
 
a2dDocumentFlagMask GetFlags ()
 gives the a2dDocumentFlagMask in case of event types concerning a document.
 
a2dViewGetView ()
 Gives the a2dView in case of event types concerning a view. More...
 
a2dDocumentTemplateGetDocumentTemplate ()
 Get the template choosen to import / export. More...
 
void SetUpdateHint (unsigned int updateHint)
 
unsigned int GetUpdateHint ()
 
void SetUpdateObject (wxObject *objectHint)
 
wxObject * GetUpdateObject ()
 
a2dViewListGetReportList ()
 
bool GetEnable ()
 when ::wxEVT_ENABLE_VIEWS get enable value of the event
 
a2dError GetError ()
 in case of errors when sending an event, this is to know the reason of failure
 
void SetError (a2dError error)
 in case of errors when sending an event, this can be set to tell the reason of failure
 
- Public Member Functions inherited from a2dEvent
 a2dEvent (int id=0, wxEventType eventType=wxEVT_NULL)
 
void SetIntTimeStamp ()
 

Public Attributes

 __pad0__: a2dEvent( 0
 for event types More...
 
 wxEVT_REPORT_VIEWS
 
 m_error = a2dError_NoError
 
 m_filename = wxFileName( wxT( "" ) )
 
 m_flags = 0
 
 m_view = NULL
 
 m_doctemplate = NULL
 
 m_updateHint = 0
 
 m_objectHint = NULL
 
 m_reportViews = reportlist
 

Additional Inherited Members

- Static Public Attributes inherited from a2dEvent
static long ms_timestamp = 0
 initialize timestamp
 

Detailed Description

used to report a2dDocument events

The event Object is a a2dDocument.

a2dDocument does often get this event from the a2dDocumentCommandProcessor.

Definition at line 591 of file docviewref.h.

Constructor & Destructor Documentation

a2dDocumentEvent::a2dDocumentEvent ( wxEventType  type,
const wxFileName &  filename,
a2dDocumentFlagMask  flags = a2dREFDOC_NON,
int  id = 0 
)
inline

for event types

  • ::wxEVT_SAVE_DOCUMENT Sent from bool a2dDocument::Save()
  • ::wxEVT_SAVEAS_DOCUMENT Sent from bool a2dDocument::SaveAs()
  • ::wxEVT_CREATE_DOCUMENT Sent from a2dDocumentTemplate::CreateDocument() to a2dDocument() just after it created a new document.
  • ::wxEVT_NEW_DOCUMENT Sent from bool a2dDocumentCommandProcessor::CreateDocument() when creating a new document from a a2dDocumentTemplate.
  • ::wxEVT_OPEN_DOCUMENT Sent from bool a2dDocumentCommandProcessor::CreateDocument() after creating a new document from a a2dDocumentTemplate, which needs to have its contents read from a file.
  • ::wxEVT_DISCONNECT_ALLVIEWS Sent from bool a2dDocument::DisconnectAllViews() Register your wxEvtHandler to recieve it.
  • ::wxEVT_CHANGEDFILENAME_DOCUMENT Sent from document after a change in file. Register your wxEvtHandler to recieve it.
  • ::wxEVT_CHANGEDTITLE_DOCUMENT Sent from document after a change in title. Register your wxEvtHandler to recieve it.

Definition at line 631 of file docviewref.h.

a2dDocumentEvent::a2dDocumentEvent ( wxEventType  type,
a2dDocumentTemplate doctemplate,
const wxFileName &  filename = wxFileName( wxT( "" ) ),
a2dDocumentFlagMask  flags = a2dREFDOC_NON,
int  id = 0 
)
inline

for event types

  • ::wxEVT_IMPORT_DOCUMENT Sent from a2dDocument::Import( a2dDocumentTemplate* doctemplate ) Intercept this event to actually implement the import.
  • ::wxEVT_EXPORT_DOCUMENT Sent from a2dDocument::Export( a2dDocumentTemplate* doctemplate ) Intercept this event to actually implement the export.

The a2dIOHandlers of the choosen template, should/can be used for importing/exporting a file. This is what the default handlers a2dDocument::OnExportDocument and a2dDocument::OnImportDocument do use.

Parameters
type::wxEVT_IMPORT_DOCUMENT or ::wxEVT_EXPORT_DOCUMENT
doctemplatetemplate choosen for importing or exporting.
filenameif not empty the file name of the document
flagsdocuemnt flags
idevent id

Definition at line 668 of file docviewref.h.

a2dDocumentEvent::a2dDocumentEvent ( wxEventType  type,
a2dView view = NULL,
bool  enable = true,
int  id = 0 
)
inline

for event types

Following event types:

Definition at line 719 of file docviewref.h.

Member Function Documentation

a2dDocumentTemplate* a2dDocumentEvent::GetDocumentTemplate ( )
inline

Get the template choosen to import / export.

Used with ::wxEVT_IMPORT_DOCUMENT and ::wxEVT_EXPORT_DOCUMENT.

Definition at line 780 of file docviewref.h.

a2dView* a2dDocumentEvent::GetView ( void  )
inline

Gives the a2dView in case of event types concerning a view.

Used with ::wxEVT_ADD_VIEW and ::wxEVT_REMOVE_VIEW

Definition at line 774 of file docviewref.h.

Member Data Documentation

a2dDocumentEvent::__pad0__

for event types

::wxEVT_REPORT_VIEWS Sent from a2dDocument to a2dView's. a2dView will add itself to the reportlist of the event, but only when this document is indeed used by the a2dView. Register your wxEvtHandler to recieve it.

Definition at line 690 of file docviewref.h.

a2dDocumentEvent::wxEVT_REPORT_VIEWS
Initial value:
{
m_bAllow = true

Definition at line 691 of file docviewref.h.


The documentation for this class was generated from the following file:
a2dDocumentEvent Class Reference -- Sun Oct 12 2014 17:04:35 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation