X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55b43eaa025408453e90a6c01f64215a9203da9a..7e2baeb41321aedca928608f816f03c13afdeff9:/include/wx/textctrl.h diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 83dcaeecb4..204c28b7df 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -128,6 +128,12 @@ const wxTextCoord wxInvalidTextCoord = -2; #define wxTE_CAPITALIZE 0 #endif +// ---------------------------------------------------------------------------- +// wxTextCtrl file types +// ---------------------------------------------------------------------------- + +#define wxTEXT_TYPE_ANY 0 + // ---------------------------------------------------------------------------- // wxTextCtrl::HitTest return values // ---------------------------------------------------------------------------- @@ -286,7 +292,7 @@ public: // -------- wxTextCtrlBase(){} - ~wxTextCtrlBase(){} + virtual ~wxTextCtrlBase(){} // accessors // --------- @@ -320,9 +326,13 @@ public: virtual void Replace(long from, long to, const wxString& value) = 0; virtual void Remove(long from, long to) = 0; - // load/save the controls contents from/to the file - virtual bool LoadFile(const wxString& file); - virtual bool SaveFile(const wxString& file = wxEmptyString); + // load/save the control's contents from/to a file + bool LoadFile(const wxString& file, int fileType = wxTEXT_TYPE_ANY) { return DoLoadFile(file, fileType); } + bool SaveFile(const wxString& file = wxEmptyString, int fileType = wxTEXT_TYPE_ANY); + + // implementation for loading/saving + virtual bool DoLoadFile(const wxString& file, int fileType); + virtual bool DoSaveFile(const wxString& file, int fileType); // sets/clears the dirty flag virtual void MarkDirty() = 0;