00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TEHISTORY_H
00020 #define TEHISTORY_H
00021
00022 #include "TECommon.h"
00023
00024
00025
00026
00027 class HistoryBuffer
00028 {
00029 public:
00030 HistoryBuffer();
00031 ~HistoryBuffer();
00032
00033 public:
00034 void setScroll(bool on);
00035 bool hasScroll();
00036
00037 public:
00038 void add(const unsigned char* bytes, int len);
00039 void get(unsigned char* bytes, int len, int loc);
00040 int len();
00041
00042 private:
00043 int ion;
00044 int length;
00045 };
00046
00047 class HistoryScroll
00048 {
00049 public:
00050 HistoryScroll();
00051 ~HistoryScroll();
00052
00053 public:
00054 void setScroll(bool on);
00055 bool hasScroll();
00056
00057 public:
00058 int getLines();
00059 int getLineLen(int lineno);
00060 void getCells(int lineno, int colno, int count, ca res[]);
00061
00062 public:
00063 ca getCell(int lineno, int colno) { ca res; getCells(lineno,colno,1,&res); return res; }
00064
00065 public:
00066 void addCells(ca a[], int count);
00067 void addLine();
00068
00069 private:
00070 int startOfLine(int lineno);
00071 HistoryBuffer index;
00072 HistoryBuffer cells;
00073 };
00074
00075 #endif // TEHISTORY_H