// the line termination type
enum wxTextFileType
{
wxTextFileType_None, // incomplete (the last line of the file only)
wxTextFileType_Unix, // line is terminated with 'LF' = 0xA = 10 = '\n'
wxTextFileType_Dos, // 'CR' 'LF'
// the line termination type
enum wxTextFileType
{
wxTextFileType_None, // incomplete (the last line of the file only)
wxTextFileType_Unix, // line is terminated with 'LF' = 0xA = 10 = '\n'
wxTextFileType_Dos, // 'CR' 'LF'
-WX_DEFINE_ARRAY(wxTextFileType, ArrayFileType);
+#if wxUSE_TEXTFILE
+
+#include "wx/string.h"
+#include "wx/file.h"
+#include "wx/dynarray.h"
+
+// ----------------------------------------------------------------------------
+// wxTextFile
+// ----------------------------------------------------------------------------
+
+WX_DEFINE_EXPORTED_ARRAY(wxTextFileType, ArrayFileType);
// you're using "direct access" i.e. GetLine()
size_t GetCurrentLine() const { return m_nCurLine; }
void GoToLine(size_t n) { m_nCurLine = n; }
// you're using "direct access" i.e. GetLine()
size_t GetCurrentLine() const { return m_nCurLine; }
void GoToLine(size_t n) { m_nCurLine = n; }
// these methods allow more "iterator-like" traversal of the list of
// lines, i.e. you may write something like:
// these methods allow more "iterator-like" traversal of the list of
// lines, i.e. you may write something like:
wxTextFileType type = typeDefault)
{ m_aLines.Insert(str, n); m_aTypes.Insert(type, n); }
// delete one line
wxTextFileType type = typeDefault)
{ m_aLines.Insert(str, n); m_aTypes.Insert(type, n); }
// delete one line
// change the file on disk (default argument means "don't change type")
// possibly in another format
// change the file on disk (default argument means "don't change type")
// possibly in another format
// copy ctor/assignment operator not implemented
wxTextFile(const wxTextFile&);
wxTextFile& operator=(const wxTextFile&);
// copy ctor/assignment operator not implemented
wxTextFile(const wxTextFile&);
wxTextFile& operator=(const wxTextFile&);