git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56018
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void OnOpenFileFailure() { }
virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
virtual void OnOpenFileFailure() { }
virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
+
+ // wrapper around CreateDocument() with a more clear name
+ wxDocument *CreateNewDocument()
+ { return CreateDocument(wxString(), wxDOC_NEW); }
+
virtual wxView *CreateView(wxDocument *doc, long flags = 0);
virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0);
virtual bool FlushDoc(wxDocument *doc);
virtual wxView *CreateView(wxDocument *doc, long flags = 0);
virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0);
virtual bool FlushDoc(wxDocument *doc);
*/
virtual wxDocument* CreateDocument(const wxString& path, long flags = 0);
*/
virtual wxDocument* CreateDocument(const wxString& path, long flags = 0);
+ /**
+ Creates an empty new document.
+
+ This is equivalent to calling CreateDocument() with @c wxDOC_NEW flags
+ and without the file name.
+ */
+ wxDocument *CreateNewDocument();
+
/**
Creates a new view for the given document. If more than one view is
allowed for the document (by virtue of multiple templates mentioning
/**
Creates a new view for the given document. If more than one view is
allowed for the document (by virtue of multiple templates mentioning
void wxDocManager::OnFileNew(wxCommandEvent& WXUNUSED(event))
{
void wxDocManager::OnFileNew(wxCommandEvent& WXUNUSED(event))
{
- CreateDocument( wxEmptyString, wxDOC_NEW );
}
void wxDocManager::OnFileOpen(wxCommandEvent& WXUNUSED(event))
}
void wxDocManager::OnFileOpen(wxCommandEvent& WXUNUSED(event))