summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/TEWidget.h
authorllornkcor <llornkcor>2002-10-31 14:49:24 (UTC)
committer llornkcor <llornkcor>2002-10-31 14:49:24 (UTC)
commitc3a6f53669140cf9e3c953772c610cd91d69ab78 (patch) (unidiff)
treeab8579e66582aedc01da2aea4272e754902e9287 /core/apps/embeddedkonsole/TEWidget.h
parent7d8a563125b981718ae963ba6308e3506e870045 (diff)
downloadopie-c3a6f53669140cf9e3c953772c610cd91d69ab78.zip
opie-c3a6f53669140cf9e3c953772c610cd91d69ab78.tar.gz
opie-c3a6f53669140cf9e3c953772c610cd91d69ab78.tar.bz2
no wrap mode taken from console, gui needs work
Diffstat (limited to 'core/apps/embeddedkonsole/TEWidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEWidget.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.h b/core/apps/embeddedkonsole/TEWidget.h
index 40e1aea..a480d45 100644
--- a/core/apps/embeddedkonsole/TEWidget.h
+++ b/core/apps/embeddedkonsole/TEWidget.h
@@ -51,61 +51,66 @@ public:
51 QColor getDefaultBackColor(); 51 QColor getDefaultBackColor();
52 52
53 const ColorEntry* getColorTable() const; 53 const ColorEntry* getColorTable() const;
54 const ColorEntry* getdefaultColorTable() const; 54 const ColorEntry* getdefaultColorTable() const;
55 void setColorTable(const ColorEntry table[]); 55 void setColorTable(const ColorEntry table[]);
56 56
57 void setScrollbarLocation(int loc); 57 void setScrollbarLocation(int loc);
58 enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 }; 58 enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 };
59 59
60 void setScroll(int cursor, int lines); 60 void setScroll(int cursor, int lines);
61 void doScroll(int lines); 61 void doScroll(int lines);
62 62
63 void doHScroll(int lines);
64
65
63 void emitSelection(); 66 void emitSelection();
67 void setWrapAt(int columns);
64 68
65public: 69public:
66 70
67 void setImage(const ca* const newimg, int lines, int columns); 71 void setImage(const ca* const newimg, int lines, int columns);
68 72
69 int Lines() { return lines; } 73 int Lines() { return lines; }
70 int Columns() { return columns; } 74 int Columns() { return columns; }
71 75
72 void calcGeometry(); 76 void calcGeometry();
73 void propagateSize(); 77 void propagateSize();
74 QSize calcSize(int cols, int lins) const; 78 QSize calcSize(int cols, int lins) const;
75 79
76 QSize sizeHint() const; 80 QSize sizeHint() const;
77 81
78public: 82public:
83 bool useHorzScroll;
79 84
80 void Bell(); 85 void Bell();
81 void emitText(QString text); 86 void emitText(QString text);
82 void pasteClipboard(); 87 void pasteClipboard();
83 88
84signals: 89signals:
85 90
86 void keyPressedSignal(QKeyEvent *e); 91 void keyPressedSignal(QKeyEvent *e);
87 void mouseSignal(int cb, int cx, int cy); 92 void mouseSignal(int cb, int cx, int cy);
88 void changedImageSizeSignal(int lines, int columns); 93 void changedImageSizeSignal(int lines, int columns);
89 void changedHistoryCursor(int value); 94 void changedHistoryCursor(int value);
95 void changedHorzCursor(int value);
90 void configureRequest( TEWidget*, int state, int x, int y ); 96 void configureRequest( TEWidget*, int state, int x, int y );
91 97
92 void clearSelectionSignal(); 98 void clearSelectionSignal();
93 void beginSelectionSignal( const int x, const int y ); 99 void beginSelectionSignal( const int x, const int y );
94 void extendSelectionSignal( const int x, const int y ); 100 void extendSelectionSignal( const int x, const int y );
95 void endSelectionSignal(const BOOL preserve_line_breaks); 101 void endSelectionSignal(const BOOL preserve_line_breaks);
96 102
97 103
98protected: 104protected:
99
100 virtual void styleChange( QStyle& ); 105 virtual void styleChange( QStyle& );
101 106
102 bool eventFilter( QObject *, QEvent * ); 107 bool eventFilter( QObject *, QEvent * );
103 108
104 void drawAttrStr(QPainter &paint, QRect rect, 109 void drawAttrStr(QPainter &paint, QRect rect,
105 QString& str, ca attr, BOOL pm, BOOL clear); 110 QString& str, ca attr, BOOL pm, BOOL clear);
106 void paintEvent( QPaintEvent * ); 111 void paintEvent( QPaintEvent * );
107 112
108 void resizeEvent(QResizeEvent*); 113 void resizeEvent(QResizeEvent*);
109 114
110 void fontChange(const QFont &font); 115 void fontChange(const QFont &font);
111 void frameChanged(); 116 void frameChanged();
@@ -138,24 +143,25 @@ public:
138 void setVTFont(const QFont &); 143 void setVTFont(const QFont &);
139 QFont getVTFont(); 144 QFont getVTFont();
140 145
141 void setMouseMarks(bool on); 146 void setMouseMarks(bool on);
142 147
143public slots: 148public slots:
144 149
145 void onClearSelection(); 150 void onClearSelection();
146 151
147protected slots: 152protected slots:
148 153
149 void scrollChanged(int value); 154 void scrollChanged(int value);
155 void hScrollChanged(int value);
150 void blinkEvent(); 156 void blinkEvent();
151 157
152private: 158private:
153 159
154 QChar (*fontMap)(QChar); // possible vt100 font extention 160 QChar (*fontMap)(QChar); // possible vt100 font extention
155 161
156 bool fixed_font; // has fixed pitch 162 bool fixed_font; // has fixed pitch
157 int font_h; // height 163 int font_h; // height
158 int font_w; // width 164 int font_w; // width
159 int font_a; // ascend 165 int font_a; // ascend
160 166
161 int blX; // actual offset (left) 167 int blX; // actual offset (left)
@@ -171,27 +177,30 @@ private:
171 BOOL resizing; 177 BOOL resizing;
172 bool mouse_marks; 178 bool mouse_marks;
173 179
174 void makeImage(); 180 void makeImage();
175 181
176 QPoint iPntSel; // initial selection point 182 QPoint iPntSel; // initial selection point
177 QPoint pntSel; // current selection point 183 QPoint pntSel; // current selection point
178 int actSel; // selection state 184 int actSel; // selection state
179 BOOL word_selection_mode; 185 BOOL word_selection_mode;
180 BOOL preserve_line_breaks; 186 BOOL preserve_line_breaks;
181 187
182 QClipboard* cb; 188 QClipboard* cb;
183 QScrollBar* scrollbar; 189 QScrollBar* scrollbar, *hScrollbar;
184 int scrollLoc; 190
191 int scrollLoc, hScrollLoc;
192 int hposition, vcolumns;
185 193
194
186//#define SCRNONE 0 195//#define SCRNONE 0
187//#define SCRLEFT 1 196//#define SCRLEFT 1
188//#define SCRRIGHT 2 197//#define SCRRIGHT 2
189 198
190 BOOL blinking; // hide text in paintEvent 199 BOOL blinking; // hide text in paintEvent
191 BOOL hasBlinker; // has characters to blink 200 BOOL hasBlinker; // has characters to blink
192 QTimer* blinkT; // active when hasBlinker 201 QTimer* blinkT; // active when hasBlinker
193 QPopupMenu* m_drop; 202 QPopupMenu* m_drop;
194 QString dropText; 203 QString dropText;
195 public: 204 public:
196 // current session in this widget 205 // current session in this widget
197 TESession *currentSession; 206 TESession *currentSession;