1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: class wxTextFile to work with text files of _small_ size
4 // (file is fully loaded in memory) and which understands CR/LF
5 // differences between platforms.
6 // Author: Vadim Zeitlin
10 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
11 // Licence: wxWindows license
12 ///////////////////////////////////////////////////////////////////////////////
14 #ifndef _WX_TEXTFILE_H
15 #define _WX_TEXTFILE_H
18 #pragma interface "textfile.h"
26 #include "wx/textbuf.h"
28 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
32 class WXDLLEXPORT wxTextFile
: public wxTextBuffer
37 wxTextFile(const wxString
& strFileName
);
40 // implement the base class pure virtuals
41 virtual bool OnExists() const;
42 virtual bool OnOpen(const wxString
&strBufferName
,
43 wxTextBufferOpenMode OpenMode
);
44 virtual bool OnClose();
45 virtual bool OnRead(wxMBConv
& conv
);
46 virtual bool OnWrite(wxTextFileType typeNew
, wxMBConv
& conv
= wxConvLibc
);
52 #else // !wxUSE_TEXTFILE
54 // old code relies on the static methods of wxTextFile being always available
55 // and they still are available in wxTextBuffer (even if !wxUSE_TEXTBUFFER), so
56 // make it possible to use them in a backwards compatible way
57 typedef wxTextBuffer wxTextFile
;
59 #endif // wxUSE_TEXTFILE/!wxUSE_TEXTFILE
61 #endif // _WX_TEXTFILE_H