00001 /* -------------------------------------------------------------------------- */ 00002 /* */ 00003 /* [TEHistory.H] History Buffer */ 00004 /* */ 00005 /* -------------------------------------------------------------------------- */ 00006 /* */ 00007 /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ 00008 /* */ 00009 /* This file is part of Konsole - an X terminal for KDE */ 00010 /* */ 00011 /* -------------------------------------------------------------------------- */ 00012 /* */ 00013 /* Ported Konsole to Qt/Embedded */ 00014 /* */ 00015 /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ 00016 /* */ 00017 /* -------------------------------------------------------------------------- */ 00018 00019 #ifndef TEHISTORY_H 00020 #define TEHISTORY_H 00021 00022 #include "TECommon.h" 00023 00024 class HistoryScroll 00025 { 00026 public: 00027 HistoryScroll(); 00028 ~HistoryScroll(); 00029 00030 public: 00031 void setSize(int lines, int cells); 00032 void setScroll(bool on); 00033 bool hasScroll(); 00034 00035 int getLines(); 00036 int getLineLen(int lineno); 00037 void getCells(int lineno, int colno, int count, ca *res); 00038 00039 ca getCell(int lineno, int colno) { ca res; getCells(lineno,colno,1,&res); return res; } 00040 00041 void addCells(ca *text, int count); 00042 void addLine(); 00043 00044 private: 00045 int startOfLine(int lineno); 00046 00047 int m_max_lines; 00048 int *m_lines; 00049 int m_max_cells; 00050 ca *m_cells; 00051 int m_first_line; 00052 int m_last_cell; 00053 int m_num_lines; 00054 int m_start_line; 00055 }; 00056 00057 #endif // TEHISTORY_H
1.4.2