author | waspe <waspe> | 2004-02-22 12:57:58 (UTC) |
---|---|---|
committer | waspe <waspe> | 2004-02-22 12:57:58 (UTC) |
commit | 5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8 (patch) (side-by-side diff) | |
tree | b97f5281b807b4218f437150a4e9082694e7a642 /core/apps/embeddedkonsole/TEHistory.h | |
parent | 908f9c9f0c68d1c3e5a620a69bbf0d05684e2ab3 (diff) | |
download | opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.zip opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.gz opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.bz2 |
merged changes form qkonsole back into opie-embeddedkonsole (most likely not bugfree !)
Diffstat (limited to 'core/apps/embeddedkonsole/TEHistory.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/TEHistory.h | 50 |
1 files changed, 16 insertions, 34 deletions
diff --git a/core/apps/embeddedkonsole/TEHistory.h b/core/apps/embeddedkonsole/TEHistory.h index 11eb150..fcf6496 100644 --- a/core/apps/embeddedkonsole/TEHistory.h +++ b/core/apps/embeddedkonsole/TEHistory.h @@ -1,75 +1,57 @@ /* -------------------------------------------------------------------------- */ /* */ /* [TEHistory.H] History Buffer */ /* */ /* -------------------------------------------------------------------------- */ /* */ /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ /* */ /* This file is part of Konsole - an X terminal for KDE */ /* */ /* -------------------------------------------------------------------------- */ /* */ /* Ported Konsole to Qt/Embedded */ /* */ /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ /* */ /* -------------------------------------------------------------------------- */ #ifndef TEHISTORY_H #define TEHISTORY_H #include "TECommon.h" -/* - An extendable tmpfile(1) based buffer. -*/ -class HistoryBuffer -{ -public: - HistoryBuffer(); - ~HistoryBuffer(); - -public: - void setScroll(bool on); - bool hasScroll(); - -public: - void add(const unsigned char* bytes, int len); - void get(unsigned char* bytes, int len, int loc); - int len(); - -private: - int ion; - int length; -}; - class HistoryScroll { public: HistoryScroll(); ~HistoryScroll(); public: - void setScroll(bool on); - bool hasScroll(); + void setSize(int lines, int cells); + void setScroll(bool on); + bool hasScroll(); -public: // access to history - int getLines(); - int getLineLen(int lineno); - void getCells(int lineno, int colno, int count, ca res[]); + int getLines(); + int getLineLen(int lineno); + void getCells(int lineno, int colno, int count, ca *res); -public: // backward compatibility (obsolete) ca getCell(int lineno, int colno) { ca res; getCells(lineno,colno,1,&res); return res; } -public: // adding lines. - void addCells(ca a[], int count); + void addCells(ca *text, int count); void addLine(); private: int startOfLine(int lineno); - HistoryBuffer index; // lines Row(int) - HistoryBuffer cells; // text Row(ca) + + int m_max_lines; + int *m_lines; + int m_max_cells; + ca *m_cells; + int m_first_line; + int m_last_cell; + int m_num_lines; + int m_start_line; }; #endif // TEHISTORY_H |