// wxTextCtrl style flags
// ----------------------------------------------------------------------------
-// the flag bit 0x0001 s free but should be used only for the things which
-// don't make sense for a text control used by wxTextEntryDialog because they
-// would otherwise conflict with wxOK, wxCANCEL, wxCENTRE
-
#define wxTE_NO_VSCROLL 0x0002
#define wxTE_AUTO_SCROLL 0x0008
#define wxTE_CAPITALIZE 0
#endif
+// ----------------------------------------------------------------------------
+// wxTextCtrl file types
+// ----------------------------------------------------------------------------
+
+#define wxTEXT_TYPE_ANY 0
+
// ----------------------------------------------------------------------------
// wxTextCtrl::HitTest return values
// ----------------------------------------------------------------------------
// --------
wxTextCtrlBase(){}
- ~wxTextCtrlBase(){}
+ virtual ~wxTextCtrlBase(){}
// accessors
// ---------
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;
wxTextAttr m_defaultStyle;
DECLARE_NO_COPY_CLASS(wxTextCtrlBase)
+ DECLARE_ABSTRACT_CLASS(wxTextCtrlBase)
};
// ----------------------------------------------------------------------------