]> git.saurik.com Git - wxWidgets.git/blame - include/wx/textfile.h
Fix wxOSX warnings about int-to-void* casts.
[wxWidgets.git] / include / wx / textfile.h
CommitLineData
c801d85f 1///////////////////////////////////////////////////////////////////////////////
a3a584a7 2// Name: wx/textfile.h
c801d85f
KB
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
f42d2aba 7// Modified by:
c801d85f 8// Created: 03.04.98
c801d85f 9// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
65571936 10// Licence: wxWindows licence
c801d85f
KB
11///////////////////////////////////////////////////////////////////////////////
12
a1b82138
VZ
13#ifndef _WX_TEXTFILE_H
14#define _WX_TEXTFILE_H
c801d85f 15
c801d85f 16#include "wx/defs.h"
ce4169a4 17
d63819e0
VZ
18#include "wx/textbuf.h"
19
d8edb385
VZ
20#if wxUSE_TEXTFILE
21
d8edb385 22#include "wx/file.h"
d8edb385
VZ
23
24// ----------------------------------------------------------------------------
25// wxTextFile
26// ----------------------------------------------------------------------------
27
bddd7a8d 28class WXDLLIMPEXP_BASE wxTextFile : public wxTextBuffer
c801d85f
KB
29{
30public:
a3a584a7
VZ
31 // constructors
32 wxTextFile() { }
33 wxTextFile(const wxString& strFileName);
34
35protected:
36 // implement the base class pure virtuals
37 virtual bool OnExists() const;
38 virtual bool OnOpen(const wxString &strBufferName,
39 wxTextBufferOpenMode OpenMode);
40 virtual bool OnClose();
830f8f11
VZ
41 virtual bool OnRead(const wxMBConv& conv);
42 virtual bool OnWrite(wxTextFileType typeNew, const wxMBConv& conv);
c801d85f
KB
43
44private:
fc7a2a60 45
a3a584a7 46 wxFile m_file;
fc7a2a60 47
c0c133e1 48 wxDECLARE_NO_COPY_CLASS(wxTextFile);
c801d85f
KB
49};
50
a1b82138 51#else // !wxUSE_TEXTFILE
ce4169a4 52
a3a584a7
VZ
53// old code relies on the static methods of wxTextFile being always available
54// and they still are available in wxTextBuffer (even if !wxUSE_TEXTBUFFER), so
55// make it possible to use them in a backwards compatible way
56typedef wxTextBuffer wxTextFile;
a1b82138 57
a3a584a7 58#endif // wxUSE_TEXTFILE/!wxUSE_TEXTFILE
a1b82138
VZ
59
60#endif // _WX_TEXTFILE_H
9f04ccb1 61