X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d1df0fc585f03cca4b194d1f9159b49a5711da6..0fe243db0c0447b69917eaa6d3a0e32743229638:/samples/docview/doc.h?ds=sidebyside diff --git a/samples/docview/doc.h b/samples/docview/doc.h index a4547ec65f..8365009d5c 100644 --- a/samples/docview/doc.h +++ b/samples/docview/doc.h @@ -157,22 +157,37 @@ public: // ---------------------------------------------------------------------------- -// A simple text document class +// wxTextDocument: wxDocument and wxTextCtrl married // ---------------------------------------------------------------------------- -class TextEditView; -class TextEditDocument : public wxDocument +class wxTextDocument : public wxDocument { public: - TextEditDocument() : wxDocument() { } - TextEditView *GetFirstView() const; + wxTextDocument() : wxDocument() { } + virtual wxTextCtrl* GetTextCtrl() const = 0; - virtual bool DoSaveDocument(const wxString& filename); - virtual bool DoOpenDocument(const wxString& filename); virtual bool IsModified() const; virtual void Modify(bool mod); - DECLARE_NO_COPY_CLASS(TextEditDocument) +protected: + virtual bool DoSaveDocument(const wxString& filename); + virtual bool DoOpenDocument(const wxString& filename); + + wxDECLARE_NO_COPY_CLASS(wxTextDocument); + DECLARE_CLASS(wxTextDocument) +}; + +// ---------------------------------------------------------------------------- +// A very simple text document class +// ---------------------------------------------------------------------------- + +class TextEditDocument : public wxTextDocument +{ +public: + TextEditDocument() : wxTextDocument() { } + virtual wxTextCtrl* GetTextCtrl() const; + + wxDECLARE_NO_COPY_CLASS(TextEditDocument); DECLARE_DYNAMIC_CLASS(TextEditDocument) };