#include <docviewref.h>


Public Member Functions | |
| a2dDocumentTemplateAuto (const wxString &descr, const wxString &filter, const wxString &dir, const wxString &ext, const wxString &docTypeName, wxClassInfo *docClassInfo=(wxClassInfo *) NULL, a2dViewConnector *connector=(a2dViewConnector *) NULL, long flags=a2dTemplateFlag::DEFAULT) | |
| ~a2dDocumentTemplateAuto () | |
| Destructor. | |
| virtual a2dIOHandlerStrIn * | GetDocumentIOHandlerForLoad (a2dDocumentInputStream &stream, a2dDocument *document) |
| if there is an io handler, and it can load the document of this template, return it | |
| virtual a2dIOHandlerStrOut * | GetDocumentIOHandlerForSave (const wxString &filename, a2dDocument *document) |
| if there is an io handler, and it can save the document of this template, return it | |
a2dDocviewGlobals->GetDocviewCommandProcessor()->GetDocTemplates() is used to find a template which fits the document type of the template.
An extra test is performed in GetDocumentIOHandlerForLoad() GetDocumentIOHandlerForSave(), to see if that template can be used for saving or loading the document.
This template is handy in use when you what an All Files template. The document with this template, will automatically choose the right handler for files you choose. Extension is not important.
Definition at line 2750 of file docviewref.h.
| a2dIOHandlerStrOut * a2dDocumentTemplateAuto::GetDocumentIOHandlerForSave | ( | const wxString & | filename, | |
| a2dDocument * | document | |||
| ) | [virtual] |
if there is an io handler, and it can save the document of this template, return it
| filename | when not empty, it is/can be used to choose io handler also based on the extension of the filename. | |
| document | the document that needs to be saved. |
Reimplemented from a2dDocumentTemplate.
Definition at line 2157 of file docviewref.cpp.