Debian Codegraph @

lib/ScreenWindow.cpp

raw symbols SCIP
1 /*
2 Copyright (C) 2007 by Robert Knight <[email protected]>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301 USA.
18 */
19
20 // Own
21 #include "ScreenWindow.h"cxx . . $ `<file>/lib/ScreenWindow.h`/
22
23 // Qt
24 #include <QtDebug>
25
26 // Konsole
27 #include "Screen.h"cxx . . $ `<file>/lib/Screen.h`/
28
29 using namespace Konsole;
30
31 ScreenWindowcxx . . $ Konsole/ScreenWindow#::ScreenWindowcxx . . $ Konsole/ScreenWindow#ScreenWindow(749de1b6ae65bddd).(QObjectcxx . . $ QObject#* parent)
32 : QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(parent)
33 , _screencxx . . $ Konsole/ScreenWindow#_screen.(nullptr)
34 , _windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer.(nullptr)
35 , _windowBufferSizecxx . . $ Konsole/ScreenWindow#_windowBufferSize.(0)
36 , _bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate.(true)
37 , _windowLinescxx . . $ Konsole/ScreenWindow#_windowLines.(1)
38 , _currentLinecxx . . $ Konsole/ScreenWindow#_currentLine.(0)
39 , _trackOutputcxx . . $ Konsole/ScreenWindow#_trackOutput.(true)
40 , _scrollCountcxx . . $ Konsole/ScreenWindow#_scrollCount.(0)
41 {
42 }
43 ScreenWindowcxx . . $ Konsole/ScreenWindow#::~cxx . . $ Konsole/ScreenWindow#`~ScreenWindow`(ced63f7c635d850d).ScreenWindowcxx . . $ Konsole/ScreenWindow#()
44 {
45 delete[] _windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer.;
46 }
47 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::setScreencxx . . $ Konsole/ScreenWindow#setScreen(102c82049da634ab).(Screencxx . . $ Konsole/Screen#* screen)
48 {
49 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( screen );
50
51 _screencxx . . $ Konsole/ScreenWindow#_screen. = screen;
52 }
53
54 Screencxx . . $ Konsole/Screen#* ScreenWindowcxx . . $ Konsole/ScreenWindow#::screencxx . . $ Konsole/ScreenWindow#screen(2582b97329da5753).() const
55 {
56 return _screencxx . . $ Konsole/ScreenWindow#_screen.;
57 }
58
59 Charactercxx . . $ Konsole/Character#* ScreenWindowcxx . . $ Konsole/ScreenWindow#::getImagecxx . . $ Konsole/ScreenWindow#getImage(2b1e201a0ed1a40e).()
60 {
61 // reallocate internal buffer if the window size has changed
62 int size = windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).() * windowColumnscxx . . $ Konsole/ScreenWindow#windowColumns(455f465bc33b4cdf).();
63 if (_windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer. == nullptr || _windowBufferSizecxx . . $ Konsole/ScreenWindow#_windowBufferSize. != size)
64 {
65 delete[] _windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer.;
66 _windowBufferSizecxx . . $ Konsole/ScreenWindow#_windowBufferSize. = size;
67 _windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer. = new Charactercxx . . $ Konsole/Character#Character(775c6e5ba34caf00).[size];
68 _bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate. = true;
69 }
70
71 if (!_bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate.)
72 return _windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer.;
73
74 _screencxx . . $ Konsole/ScreenWindow#_screen.->getImagecxx . . $ Konsole/Screen#getImage(887f9a4805617ad1).(_windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer.,size,
75 currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).(),endWindowLinecxx . . $ Konsole/ScreenWindow#endWindowLine(455f465bc33b4cdf).());
76
77 // this window may look beyond the end of the screen, in which
78 // case there will be an unused area which needs to be filled
79 // with blank characters
80 fillUnusedAreacxx . . $ Konsole/ScreenWindow#fillUnusedArea(49f6e7a06ebc5aa8).();
81
82 _bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate. = false;
83 return _windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer.;
84 }
85
86 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::fillUnusedAreacxx . . $ Konsole/ScreenWindow#fillUnusedArea(49f6e7a06ebc5aa8).()
87 {
88 int screenEndLine = _screencxx . . $ Konsole/ScreenWindow#_screen.->getHistLinescxx . . $ Konsole/Screen#getHistLines(455f465bc33b4cdf).() + _screencxx . . $ Konsole/ScreenWindow#_screen.->getLinescxx . . $ Konsole/Screen#getLines(455f465bc33b4cdf).() - 1;
89 int windowEndLine = currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).() + windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).() - 1;
90
91 int unusedLines = windowEndLine - screenEndLine;
92 int charsToFill = unusedLines * windowColumnscxx . . $ Konsole/ScreenWindow#windowColumns(455f465bc33b4cdf).();
93
94 Screencxx . . $ Konsole/Screen#::fillWithDefaultCharcxx . . $ Konsole/Screen#fillWithDefaultChar(1675d5b840a4fbe2).(_windowBuffercxx . . $ Konsole/ScreenWindow#_windowBuffer. + _windowBufferSizecxx . . $ Konsole/ScreenWindow#_windowBufferSize. - charsToFill,charsToFill);
95 }
96
97 // return the index of the line at the end of this window, or if this window
98 // goes beyond the end of the screen, the index of the line at the end
99 // of the screen.
100 //
101 // when passing a line number to a Screen method, the line number should
102 // never be more than endWindowLine()
103 //
104 int ScreenWindowcxx . . $ Konsole/ScreenWindow#::endWindowLinecxx . . $ Konsole/ScreenWindow#endWindowLine(455f465bc33b4cdf).() const
105 {
106 return qMincxx . . $ qMin(2a338fce5842aa6a).(currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).() + windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).() - 1,
107 lineCountcxx . . $ Konsole/ScreenWindow#lineCount(455f465bc33b4cdf).() - 1);
108 }
109 QVectorcxx . . $ QVector#<LinePropertycxx . . $ Konsole/LineProperty#> ScreenWindowcxx . . $ Konsole/ScreenWindow#::getLinePropertiescxx . . $ Konsole/ScreenWindow#getLineProperties(a3e81cde8669a353).()
110 {
111 QVectorcxx . . $ QVector#<LinePropertycxx . . $ Konsole/LineProperty#> result = _screencxx . . $ Konsole/ScreenWindow#_screen.->getLinePropertiescxx . . $ Konsole/Screen#getLineProperties(903c14ab5055fa47).(currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).(),endWindowLinecxx . . $ Konsole/ScreenWindow#endWindowLine(455f465bc33b4cdf).());
112
113 if (result.countcxx . . $ QVector#count(455f465bc33b4cdf).() != windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).())
114 result.resizecxx . . $ QVector#resize(d4f767463ce0a6b3).(windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).());
115
116 return resultcxx . . $ QVector#QVector(a0d8f1cfe28f0150).;
117 }
118
119 QStringcxx . . $ QString# ScreenWindowcxx . . $ Konsole/ScreenWindow#::selectedTextcxx . . $ Konsole/ScreenWindow#selectedText(11ecdffe9192d1a2).( bool preserveLineBreaks ) const
120 {
121 return _screencxx . . $ Konsole/ScreenWindow#_screen.->selectedTextcxx . . $ Konsole/Screen#selectedText(11ecdffe9192d1a2).( preserveLineBreaks );
122 }
123
124 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::getSelectionStartcxx . . $ Konsole/ScreenWindow#getSelectionStart(44820809252bebc4).( int& column , int& line )
125 {
126 _screencxx . . $ Konsole/ScreenWindow#_screen.->getSelectionStartcxx . . $ Konsole/Screen#getSelectionStart(4bd75fe21bbdda99).(column,line);
127 line -= currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).();
128 }
129 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::getSelectionEndcxx . . $ Konsole/ScreenWindow#getSelectionEnd(44820809252bebc4).( int& column , int& line )
130 {
131 _screencxx . . $ Konsole/ScreenWindow#_screen.->getSelectionEndcxx . . $ Konsole/Screen#getSelectionEnd(4bd75fe21bbdda99).(column,line);
132 line -= currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).();
133 }
134 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::setSelectionStartcxx . . $ Konsole/ScreenWindow#setSelectionStart(6908015b96d379c0).( int column , int line , bool columnMode )
135 {
136 _screencxx . . $ Konsole/ScreenWindow#_screen.->setSelectionStartcxx . . $ Konsole/Screen#setSelectionStart(6908015b96d379c0).( column , qMincxx . . $ qMin(2a338fce5842aa6a).(line + currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).(),endWindowLinecxx . . $ Konsole/ScreenWindow#endWindowLine(455f465bc33b4cdf).()) , columnMode);
137
138 _bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate. = true;
139 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! selectionChangedcxx . . $ Konsole/ScreenWindow#selectionChanged(49f6e7a06ebc5aa8).();
140 }
141
142 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::setSelectionEndcxx . . $ Konsole/ScreenWindow#setSelectionEnd(3e454b8ccf442868).( int column , int line )
143 {
144 _screencxx . . $ Konsole/ScreenWindow#_screen.->setSelectionEndcxx . . $ Konsole/Screen#setSelectionEnd(3e454b8ccf442868).( column , qMincxx . . $ qMin(2a338fce5842aa6a).(line + currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).(),endWindowLinecxx . . $ Konsole/ScreenWindow#endWindowLine(455f465bc33b4cdf).()) );
145
146 _bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate. = true;
147 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! selectionChangedcxx . . $ Konsole/ScreenWindow#selectionChanged(49f6e7a06ebc5aa8).();
148 }
149
150 bool ScreenWindowcxx . . $ Konsole/ScreenWindow#::isSelectedcxx . . $ Konsole/ScreenWindow#isSelected(cf9ef193275fa6d8).( int column , int line )
151 {
152 return _screencxx . . $ Konsole/ScreenWindow#_screen.->isSelectedcxx . . $ Konsole/Screen#isSelected(88e30549ca55c866).( column , qMincxx . . $ qMin(2a338fce5842aa6a).(line + currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).(),endWindowLinecxx . . $ Konsole/ScreenWindow#endWindowLine(455f465bc33b4cdf).()) );
153 }
154
155 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::clearSelectioncxx . . $ Konsole/ScreenWindow#clearSelection(49f6e7a06ebc5aa8).()
156 {
157 _screencxx . . $ Konsole/ScreenWindow#_screen.->clearSelectioncxx . . $ Konsole/Screen#clearSelection(49f6e7a06ebc5aa8).();
158
159 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! selectionChangedcxx . . $ Konsole/ScreenWindow#selectionChanged(49f6e7a06ebc5aa8).();
160 }
161
162 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::setWindowLinescxx . . $ Konsole/ScreenWindow#setWindowLines(d4f767463ce0a6b3).(int lines)
163 {
164 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(lines > 0);
165 _windowLinescxx . . $ Konsole/ScreenWindow#_windowLines. = lines;
166 }
167 int ScreenWindowcxx . . $ Konsole/ScreenWindow#::windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).() const
168 {
169 return _windowLinescxx . . $ Konsole/ScreenWindow#_windowLines.;
170 }
171
172 int ScreenWindowcxx . . $ Konsole/ScreenWindow#::windowColumnscxx . . $ Konsole/ScreenWindow#windowColumns(455f465bc33b4cdf).() const
173 {
174 return _screencxx . . $ Konsole/ScreenWindow#_screen.->getColumnscxx . . $ Konsole/Screen#getColumns(455f465bc33b4cdf).();
175 }
176
177 int ScreenWindowcxx . . $ Konsole/ScreenWindow#::lineCountcxx . . $ Konsole/ScreenWindow#lineCount(455f465bc33b4cdf).() const
178 {
179 return _screencxx . . $ Konsole/ScreenWindow#_screen.->getHistLinescxx . . $ Konsole/Screen#getHistLines(455f465bc33b4cdf).() + _screencxx . . $ Konsole/ScreenWindow#_screen.->getLinescxx . . $ Konsole/Screen#getLines(455f465bc33b4cdf).();
180 }
181
182 int ScreenWindowcxx . . $ Konsole/ScreenWindow#::columnCountcxx . . $ Konsole/ScreenWindow#columnCount(455f465bc33b4cdf).() const
183 {
184 return _screencxx . . $ Konsole/ScreenWindow#_screen.->getColumnscxx . . $ Konsole/Screen#getColumns(455f465bc33b4cdf).();
185 }
186
187 QPointcxx . . $ QPoint# ScreenWindowcxx . . $ Konsole/ScreenWindow#::cursorPositioncxx . . $ Konsole/ScreenWindow#cursorPosition(75d69cfbd3c4b2dd).() const
188 {
189 QPointcxx . . $ QPoint# positioncxx . . $ QPoint#QPoint(49f6e7a06ebc5aa8).;
190
191 position.setXcxx . . $ QPoint#setX(d4f767463ce0a6b3).( _screencxx . . $ Konsole/ScreenWindow#_screen.->getCursorXcxx . . $ Konsole/Screen#getCursorX(455f465bc33b4cdf).() );
192 position.setYcxx . . $ QPoint#setY(d4f767463ce0a6b3).( _screencxx . . $ Konsole/ScreenWindow#_screen.->getCursorYcxx . . $ Konsole/Screen#getCursorY(455f465bc33b4cdf).() );
193
194 return position;
195 }
196
197 int ScreenWindowcxx . . $ Konsole/ScreenWindow#::currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).() const
198 {
199 return qBoundcxx . . $ qBound(3dbe0c69cb86ae06).(0,_currentLinecxx . . $ Konsole/ScreenWindow#_currentLine.,lineCountcxx . . $ Konsole/ScreenWindow#lineCount(455f465bc33b4cdf).()-windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).());
200 }
201
202 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::scrollBycxx . . $ Konsole/ScreenWindow#scrollBy(f912647b3bb3f396).( RelativeScrollModecxx . . $ Konsole/ScreenWindow#RelativeScrollMode# mode , int amount )
203 {
204 if ( mode == ScrollLinescxx . . $ Konsole/ScreenWindow#ScrollLines. )
205 {
206 scrollTocxx . . $ Konsole/ScreenWindow#scrollTo(d4f767463ce0a6b3).( currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).() + amount );
207 }
208 else if ( mode == ScrollPagescxx . . $ Konsole/ScreenWindow#ScrollPages. )
209 {
210 scrollTocxx . . $ Konsole/ScreenWindow#scrollTo(d4f767463ce0a6b3).( currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).() + amount * ( windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).() / 2 ) );
211 }
212 }
213
214 bool ScreenWindowcxx . . $ Konsole/ScreenWindow#::atEndOfOutputcxx . . $ Konsole/ScreenWindow#atEndOfOutput(50ce9a9e25b4a850).() const
215 {
216 return currentLinecxx . . $ Konsole/ScreenWindow#currentLine(455f465bc33b4cdf).() == (lineCountcxx . . $ Konsole/ScreenWindow#lineCount(455f465bc33b4cdf).()-windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).());
217 }
218
219 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::scrollTocxx . . $ Konsole/ScreenWindow#scrollTo(d4f767463ce0a6b3).( int line )
220 {
221 int maxCurrentLineNumber = lineCountcxx . . $ Konsole/ScreenWindow#lineCount(455f465bc33b4cdf).() - windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).();
222 line = qBoundcxx . . $ qBound(3dbe0c69cb86ae06).(0,line,maxCurrentLineNumber);
223
224 const int delta = line - _currentLinecxx . . $ Konsole/ScreenWindow#_currentLine.;
225 _currentLinecxx . . $ Konsole/ScreenWindow#_currentLine. = line;
226
227 // keep track of number of lines scrolled by,
228 // this can be reset by calling resetScrollCount()
229 _scrollCountcxx . . $ Konsole/ScreenWindow#_scrollCount. += delta;
230
231 _bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate. = true;
232
233 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! scrolledcxx . . $ Konsole/ScreenWindow#scrolled(d4f767463ce0a6b3).(_currentLinecxx . . $ Konsole/ScreenWindow#_currentLine.);
234 }
235
236 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::setTrackOutputcxx . . $ Konsole/ScreenWindow#setTrackOutput(b45ddcbc8423892c).(bool trackOutput)
237 {
238 _trackOutputcxx . . $ Konsole/ScreenWindow#_trackOutput. = trackOutput;
239 }
240
241 bool ScreenWindowcxx . . $ Konsole/ScreenWindow#::trackOutputcxx . . $ Konsole/ScreenWindow#trackOutput(50ce9a9e25b4a850).() const
242 {
243 return _trackOutputcxx . . $ Konsole/ScreenWindow#_trackOutput.;
244 }
245
246 int ScreenWindowcxx . . $ Konsole/ScreenWindow#::scrollCountcxx . . $ Konsole/ScreenWindow#scrollCount(455f465bc33b4cdf).() const
247 {
248 return _scrollCountcxx . . $ Konsole/ScreenWindow#_scrollCount.;
249 }
250
251 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::resetScrollCountcxx . . $ Konsole/ScreenWindow#resetScrollCount(49f6e7a06ebc5aa8).()
252 {
253 _scrollCountcxx . . $ Konsole/ScreenWindow#_scrollCount. = 0;
254 }
255
256 QRectcxx . . $ QRect# ScreenWindowcxx . . $ Konsole/ScreenWindow#::scrollRegioncxx . . $ Konsole/ScreenWindow#scrollRegion(d857385bac04cbf7).() const
257 {
258 bool equalToScreenSize = windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).() == _screencxx . . $ Konsole/ScreenWindow#_screen.->getLinescxx . . $ Konsole/Screen#getLines(455f465bc33b4cdf).();
259
260 if ( atEndOfOutputcxx . . $ Konsole/ScreenWindow#atEndOfOutput(50ce9a9e25b4a850).() && equalToScreenSize )
261 return _screencxx . . $ Konsole/ScreenWindow#_screen.->lastScrolledRegioncxx . . $ Konsole/Screen#lastScrolledRegion(d857385bac04cbf7).();
262 else
263 return {cxx . . $ QRect#QRect(2261ffe5112eab06).0,0,windowColumnscxx . . $ Konsole/ScreenWindow#windowColumns(455f465bc33b4cdf).(),windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).()};
264 }
265
266 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::notifyOutputChangedcxx . . $ Konsole/ScreenWindow#notifyOutputChanged(49f6e7a06ebc5aa8).()
267 {
268 // move window to the bottom of the screen and update scroll count
269 // if this window is currently tracking the bottom of the screen
270 if ( _trackOutputcxx . . $ Konsole/ScreenWindow#_trackOutput. )
271 {
272 _scrollCountcxx . . $ Konsole/ScreenWindow#_scrollCount. -= _screencxx . . $ Konsole/ScreenWindow#_screen.->scrolledLinescxx . . $ Konsole/Screen#scrolledLines(455f465bc33b4cdf).();
273 _currentLinecxx . . $ Konsole/ScreenWindow#_currentLine. = qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,_screencxx . . $ Konsole/ScreenWindow#_screen.->getHistLinescxx . . $ Konsole/Screen#getHistLines(455f465bc33b4cdf).() - (windowLinescxx . . $ Konsole/ScreenWindow#windowLines(455f465bc33b4cdf).()-_screencxx . . $ Konsole/ScreenWindow#_screen.->getLinescxx . . $ Konsole/Screen#getLines(455f465bc33b4cdf).()));
274 }
275 else
276 {
277 // if the history is not unlimited then it may
278 // have run out of space and dropped the oldest
279 // lines of output - in this case the screen
280 // window's current line number will need to
281 // be adjusted - otherwise the output will scroll
282 _currentLinecxx . . $ Konsole/ScreenWindow#_currentLine. = qMaxcxx . . $ qMax(2a338fce5842aa6a).(0,_currentLinecxx . . $ Konsole/ScreenWindow#_currentLine. -
283 _screencxx . . $ Konsole/ScreenWindow#_screen.->droppedLinescxx . . $ Konsole/Screen#droppedLines(455f465bc33b4cdf).());
284
285 // ensure that the screen window's current position does
286 // not go beyond the bottom of the screen
287 _currentLinecxx . . $ Konsole/ScreenWindow#_currentLine. = qMincxx . . $ qMin(2a338fce5842aa6a).( _currentLinecxx . . $ Konsole/ScreenWindow#_currentLine. , _screencxx . . $ Konsole/ScreenWindow#_screen.->getHistLinescxx . . $ Konsole/Screen#getHistLines(455f465bc33b4cdf).() );
288 }
289
290 _bufferNeedsUpdatecxx . . $ Konsole/ScreenWindow#_bufferNeedsUpdate. = true;
291
292 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! outputChangedcxx . . $ Konsole/ScreenWindow#outputChanged(49f6e7a06ebc5aa8).();
293 }
294
295 void ScreenWindowcxx . . $ Konsole/ScreenWindow#::handleCommandFromKeyboardcxx . . $ Konsole/ScreenWindow#handleCommandFromKeyboard(16cb6c07cd6749eb).(KeyboardTranslatorcxx . . $ Konsole/KeyboardTranslator#::Commandcxx . . $ Konsole/KeyboardTranslator#Command# command)
296 {
297 // Keyboard-based navigation
298 bool update = false;
299
300 // EraseCommand is handled in Vt102Emulation
301 if ( command & KeyboardTranslatorcxx . . $ Konsole/KeyboardTranslator#::ScrollPageUpCommandcxx . . $ Konsole/KeyboardTranslator#ScrollPageUpCommand. )
302 {
303 scrollBycxx . . $ Konsole/ScreenWindow#scrollBy(f912647b3bb3f396).( ScreenWindowcxx . . $ Konsole/ScreenWindow#::ScrollPagescxx . . $ Konsole/ScreenWindow#ScrollPages. , -1 );
304 update = true;
305 }
306 if ( command & KeyboardTranslatorcxx . . $ Konsole/KeyboardTranslator#::ScrollPageDownCommandcxx . . $ Konsole/KeyboardTranslator#ScrollPageDownCommand. )
307 {
308 scrollBycxx . . $ Konsole/ScreenWindow#scrollBy(f912647b3bb3f396).( ScreenWindowcxx . . $ Konsole/ScreenWindow#::ScrollPagescxx . . $ Konsole/ScreenWindow#ScrollPages. , 1 );
309 update = true;
310 }
311 if ( command & KeyboardTranslatorcxx . . $ Konsole/KeyboardTranslator#::ScrollLineUpCommandcxx . . $ Konsole/KeyboardTranslator#ScrollLineUpCommand. )
312 {
313 scrollBycxx . . $ Konsole/ScreenWindow#scrollBy(f912647b3bb3f396).( ScreenWindowcxx . . $ Konsole/ScreenWindow#::ScrollLinescxx . . $ Konsole/ScreenWindow#ScrollLines. , -1 );
314 update = true;
315 }
316 if ( command & KeyboardTranslatorcxx . . $ Konsole/KeyboardTranslator#::ScrollLineDownCommandcxx . . $ Konsole/KeyboardTranslator#ScrollLineDownCommand. )
317 {
318 scrollBycxx . . $ Konsole/ScreenWindow#scrollBy(f912647b3bb3f396).( ScreenWindowcxx . . $ Konsole/ScreenWindow#::ScrollLinescxx . . $ Konsole/ScreenWindow#ScrollLines. , 1 );
319 update = true;
320 }
321 if ( command & KeyboardTranslatorcxx . . $ Konsole/KeyboardTranslator#::ScrollDownToBottomCommandcxx . . $ Konsole/KeyboardTranslator#ScrollDownToBottomCommand. )
322 {
323 Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! scrollToEndcxx . . $ Konsole/ScreenWindow#scrollToEnd(49f6e7a06ebc5aa8).();
324 update = true;
325 }
326 if ( command & KeyboardTranslatorcxx . . $ Konsole/KeyboardTranslator#::ScrollUpToTopCommandcxx . . $ Konsole/KeyboardTranslator#ScrollUpToTopCommand.)
327 {
328 scrollTocxx . . $ Konsole/ScreenWindow#scrollTo(d4f767463ce0a6b3).(0);
329 update = true;
330 }
331 // TODO: KeyboardTranslator::ScrollLockCommand
332 // TODO: KeyboardTranslator::SendCommand
333
334 if ( update )
335 {
336 setTrackOutputcxx . . $ Konsole/ScreenWindow#setTrackOutput(b45ddcbc8423892c).( atEndOfOutputcxx . . $ Konsole/ScreenWindow#atEndOfOutput(50ce9a9e25b4a850).() );
337
338 Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! outputChangedcxx . . $ Konsole/ScreenWindow#outputChanged(49f6e7a06ebc5aa8).();
339 }
340 }
341
342 //#include "ScreenWindow.moc"