X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/217b71400f0ee74b2f472ef724172dc7f1459e4e..16abe93eb44fe991b8b618bc1049f56d68903297:/include/wx/docview.h diff --git a/include/wx/docview.h b/include/wx/docview.h index 08a9a3ce44..94a13b2cc5 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -162,6 +162,12 @@ protected: wxCommandProcessor* m_commandProcessor; bool m_savedYet; + // Called by OnSaveDocument and OnOpenDocument to implement standard + // Save/Load behavior. Re-implement in derived class for custom + // behavior. + virtual bool DoSaveDocument(const wxString& file); + virtual bool DoOpenDocument(const wxString& file); + private: DECLARE_ABSTRACT_CLASS(wxDocument) DECLARE_NO_COPY_CLASS(wxDocument) @@ -276,6 +282,9 @@ public: bool IsVisible() const { return ((m_flags & wxTEMPLATE_VISIBLE) == wxTEMPLATE_VISIBLE); } + wxClassInfo* GetDocClassInfo() const { return m_docClassInfo; } + wxClassInfo* GetViewClassInfo() const { return m_viewClassInfo; } + virtual bool FileMatchesTemplate(const wxString& path); protected: @@ -292,6 +301,12 @@ protected: wxClassInfo* m_docClassInfo; wxClassInfo* m_viewClassInfo; + // Called by CreateDocument and CreateView to create the actual document/view object. + // By default uses the ClassInfo provided to the constructor. Override these functions + // to provide a different method of creation. + virtual wxDocument *DoCreateDocument(); + virtual wxView *DoCreateView(); + private: DECLARE_CLASS(wxDocTemplate) DECLARE_NO_COPY_CLASS(wxDocTemplate)