wxTEMPLATE_VISIBLE The template may be displayed to the user in dialogs.
wxTEMPLATE_INVISIBLE The template may not be displayed to the user in dialogs.
wxDEFAULT_TEMPLATE_FLAGS Defined as wxTEMPLATE_VISIBLE.
-
-
+
+
@b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags
)
-
+
will construct document and view objects from the class information
-
+
@b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassName, viewClassName, flags
)
-
+
will construct document and view objects from perl packages
-
+
@b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName )
-
+
@c Wx::DocTemplate::CreateDocument() and
@c Wx::DocTemplate::CreateView() must be overridden
*/
/**
Loads the file history from a config object.
-
+
@see wxConfig()
*/
void FileHistoryLoad(wxConfigBase& config);
/**
Saves the file history into a config object. This must be called
explicitly by the application.
-
+
@see wxConfig()
*/
void FileHistorySave(wxConfigBase& resourceFile);
Returns a document template by asking the user (if there is more than one
template).
This function is used in CreateDocument().
-
+
@param templates
Pointer to an array of templates from which to choose a desired template.
@param noTemplates
If more than one template is passed in in templates,
then this parameter indicates whether the list of templates that the user
will have to choose from is sorted or not when shown the choice box dialog.
-
+
Default is @false.
*/
wxDocTemplate* SelectDocumentType(wxDocTemplate** templates,
The dialog normally will not appear because the array of templates only contains
those relevant to the document in question, and often there will only be one
such.
-
+
@param templates
Pointer to an array of templates from which to choose a desired template.
@param noTemplates
If more than one template is passed in in templates,
then this parameter indicates whether the list of templates that the user
will have to choose from is sorted or not when shown the choice box dialog.
-
+
Default is @false.
*/
wxDocTemplate* SelectViewType(wxDocTemplate** templates,
wxDocManager* GetDocumentManager() const;
/**
- Gets the frame associated with the view (if any). Note that this "frame'' is
+ Gets the frame associated with the view (if any). Note that this "frame" is
not a wxFrame at all in the generic MDI implementation which uses the notebook
pages instead of the frames and this is why this method returns a wxWindow and
not a wxFrame.
Sets the frame associated with this view. The application should call this
if possible, to tell the view about the frame.
See GetFrame() for the explanation about the mismatch
- between the "Frame'' in the method name and the type of its parameter.
+ between the "Frame" in the method name and the type of its parameter.
*/
void SetFrame(wxWindow* frame);
*/
void UpdateAllViews(wxView* sender = NULL, wxObject* hint = NULL);
+protected:
+ /**
+ This method is called by OnSaveDocument() to really save the document
+ contents to the specified file.
+
+ Base class version creates a file-based stream and calls SaveObject().
+ Override this if you need to do something else or prefer not to use
+ SaveObject() at all.
+ */
+ virtual bool DoSaveDocument(const wxString& file);
+
+ /**
+ This method is called by OnOpenDocument() to really load the document
+ contents from the specified file.
+
+ Base class version creates a file-based stream and calls LoadObject().
+ Override this if you need to do something else or prefer not to use
+ LoadObject() at all.
+ */
+ virtual bool DoOpenDocument(const wxString& file);
+
+
/**
wxCommandProcessor* m_commandProcessor
A pointer to the command processor associated with this document.
/**
Returns the list of menus that are managed by this file history object.
-
+
@see UseMenu()
*/
const wxList GetMenus() const;
/**
Loads the file history from the given config object. This function should be
called explicitly by the application.
-
+
@see wxConfig()
*/
void Load(wxConfigBase& config);
/**
Saves the file history into the given config object. This must be called
explicitly by the application.
-
+
@see wxConfig()
*/
void Save(wxConfigBase& config);