// 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:
// for ( str = GetFirstLine(); !Eof(); str = GetNextLine() ) { ... }
// these methods allow more "iterator-like" traversal of the list of
// lines, i.e. you may write something like:
// for ( str = GetFirstLine(); !Eof(); str = GetNextLine() ) { ... }
// 'mutable' keyword yet (m_nCurLine should be mutable)
wxString& GetFirstLine() /* const */ { return m_aLines[m_nCurLine = 0]; }
wxString& GetNextLine() /* const */ { return m_aLines[++m_nCurLine]; }
// 'mutable' keyword yet (m_nCurLine should be mutable)
wxString& GetFirstLine() /* const */ { return m_aLines[m_nCurLine = 0]; }
wxString& GetNextLine() /* const */ { return m_aLines[++m_nCurLine]; }
// guess the type of file (m_file is supposed to be opened)
wxTextFileType GuessType() const;
// get the name of the file
// guess the type of file (m_file is supposed to be opened)
wxTextFileType GuessType() const;
// get the name of the file
{ m_aLines.Add(str); m_aTypes.Add(type); }
// insert a line before the line number n
void InsertLine(const wxString& str,
size_t n,
{ m_aLines.Add(str); m_aTypes.Add(type); }
// insert a line before the line number n
void InsertLine(const wxString& str,
size_t n,
{ m_aLines.Insert(str, n); m_aTypes.Insert(type, n); }
// delete one line
void RemoveLine(size_t n) { m_aLines.Remove(n); m_aTypes.Remove(n); }
{ m_aLines.Insert(str, n); m_aTypes.Insert(type, n); }
// delete one line
void RemoveLine(size_t n) { m_aLines.Remove(n); m_aTypes.Remove(n); }
// get the file termination string
// Note: implementation moved to textfile to prevent warning due to switch.
// get the file termination string
// Note: implementation moved to textfile to prevent warning due to switch.