*/
virtual wxView* CreateView(wxDocument* doc, long flags = 0);
+ /**
+ This function implements the default (very primitive) format detection
+ which checks if the extension is that of the template.
+
+ @param path
+ The path to be checked against the template.
+ */
+ virtual bool FileMatchesTemplate(const wxString& path);
+
/**
Returns the default file extension for the document data, as passed to
the document template constructor.
*/
wxString GetDirectory() const;
+ /**
+ Returns the run-time class information that allows document
+ instances to be constructed dynamically, as passed to the document
+ template constructor.
+ */
+ wxClassInfo* GetDocClassInfo() const;
+
/**
Returns a pointer to the document manager instance for which this
template was created.
*/
long GetFlags() const;
+ /**
+ Returns the run-time class information that allows view instances
+ to be constructed dynamically, as passed to the document template
+ constructor.
+ */
+ wxClassInfo* GetViewClassInfo() const;
+
/**
Returns the view type name, as passed to the document template
constructor.
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = "frame");
+ const wxString& name = wxFrameNameStr);
/**
Destructor.
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = "frame");
+ const wxString& name = wxFrameNameStr);
/**
Destructor.
*/
virtual wxString GetUserReadableName() const;
+ //@{
/**
Returns the list whose elements are the views on the document.
@see GetFirstView()
*/
- wxList GetViews() const;
+ wxList& GetViews() const;
+ const wxList& GetViews() const;
+ //@}
/**
Returns @true if the document has been modified since the last save,
called, as this is not done automatically.
*/
virtual void UseMenu(wxMenu* menu);
-
- /**
- A character array of strings corresponding to the most recently opened
- files.
- */
- char** m_fileHistory;
-
- /**
- The number of files stored in the history array.
- */
- size_t m_fileHistoryN;
-
- /**
- The maximum number of files to be stored and displayed on the menu.
- */
- size_t m_fileMaxFiles;
-
- /**
- The file menu used to display the file history list (if enabled).
- */
- wxMenu* m_fileMenu;
};