The wxDocTemplate class is used to model the relationship between a document class and a view class.
wxDocTemplate::tDefaultExt
wxDocTemplate::tDescription
wxDocTemplate::tDirectory
wxDocTemplate::tDocClassInfo
wxDocTemplate::tDocTypeName
wxDocTemplate::tDocumentManager
wxDocTemplate::tFileFilter
wxDocTemplate::tFlags
wxDocTemplate::tViewClassInfo
wxDocTemplate::tViewTypeName
wxDocTemplate::wxDocTemplate
wxDocTemplate::~wxDocTemplate
wxDocTemplate::CreateDocument
wxDocTemplate::CreateView
wxDocTemplate::GetDefaultExtension
wxDocTemplate::GetDescription
wxDocTemplate::GetDirectory
wxDocTemplate::GetDocumentManager
wxDocTemplate::GetDocumentName
wxDocTemplate::GetFileFilter
wxDocTemplate::GetFlags
wxDocTemplate::GetViewName
wxDocTemplate::IsVisible
wxDocTemplate::SetDefaultExtension
wxDocTemplate::SetDescription
wxDocTemplate::SetDirectory
wxDocTemplate::SetDocumentManager
wxDocTemplate::SetFileFilter
wxDocTemplate::SetFlags
char * tDefaultExt
The default extension for files of this type.
char * tDescription
A short description of this template.
char * tDirectory
The default directory for files of this type.
wxClassInfo * tDocClassInfo
Run-time class information that allows document instances to be constructed dynamically.
char * tDocTypeName
The named type of the document associated with this template.
wxDocTemplate * tDocumentManager
A pointer to the document manager for which this template was created.
char * tFileFilter
The file filter (such as *.txt) to be used in file selector dialogs.
long tFlags
The flags passed to the constructor.
wxClassInfo * tViewClassInfo
Run-time class information that allows view instances to be constructed dynamically.
char * tViewTypeName
The named type of the view associated with this template.
void wxDocTemplate(wxDocManager *manager, char *descr, char *filter, char *dir, char *ext, char *docTypeName, char *viewTypeName, wxClassInfo *docClassInfo = NULL, wxClassInfo *viewClassInfo = NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS)
Constructor. Create instances dynamically near the start of your application after creating a wxDocManager instance, and before doing any document or view operations.
manager is the document manager object which manages this template.
descr is a short description of what the template is for. This string will be displayed in the file filter list of Windows file selectors.
filter is an appropriate file filter such as *.txt.
dir is the default directory to use for file selectors.
ext is the default file extension (such as txt).
docTypeName is a name that should be unique for a given type of document, used for gathering a list of views relevant to a particular document.
viewTypeName is a name that should be unique for a given view.
docClassInfo is a pointer to the run-time document class information as returned by the CLASSINFO macro, e.g. CLASSINFO(MyDocumentClass). If this is not supplied, you will need to derive a new wxDocTemplate class and override the CreateDocument member to return a new document instance on demand.
viewClassInfo is a pointer to the run-time view class information as returned by the CLASSINFO macro, e.g. CLASSINFO(MyViewClass). If this is not supplied, you will need to derive a new wxDocTemplate class and override the CreateView member to return a new view instance on demand.
flags is a bit list of the following:
void ~wxDocTemplate(void)
Destructor.
wxDocument * CreateDocument(char *path, long flags = 0)
Creates a new instance of the associated document class. If you have not supplied a wxClassInfo parameter to the template constructor, you will need to override this function to return an appropriate document instance.
wxView * CreateView(wxDocument *doc, long flags = 0)
Creates a new instance of the associated view class. If you have not supplied a wxClassInfo parameter to the template constructor, you will need to override this function to return an appropriate view instance.
char * GetDefaultExtension(void)
Returns the default file extension for the document data, as passed to the document template constructor.
char * GetDescription(void)
Returns the text description of this template, as passed to the document template constructor.
char * GetDirectory(void)
Returns the default directory, as passed to the document template constructor.
wxDocManager * GetDocumentManager(void)
Returns a pointer to the document manager instance for which this template was created.
char * GetDocumentName(void)
Returns the document type name, as passed to the document template constructor.
char * GetFileFilter(void)
Returns the file filter, as passed to the document template constructor.
long GetFlags(void)
Returns the flags, as passed to the document template constructor.
char * GetViewName(void)
Returns the view type name, as passed to the document template constructor.
Bool IsVisible(void)
Returns TRUE if the document template can be shown in user dialogs, FALSE otherwise.
void SetDefaultExtension(char *ext)
Sets the default file extension.
void SetDescription(char *descr)
Sets the template description.
void SetDirectory(char *dir)
Sets the default directory.
void SetDocumentManager(wxDocManager *manager)
Sets the pointer to the document manager instance for which this template was created. Should not be called by the application.
void SetFileFilter(char *filter)
Sets the file filter.
void SetFlags(long flags)
Sets the internal document template flags (see the constructor description for more details).