33 , _windowBuffer(nullptr)
34 , _windowBufferSize(0)
35 , _bufferNeedsUpdate(true)
91 int unusedLines = windowEndLine - screenEndLine;
222 line = qBound(0,
line,maxCurrentLineNumber);
void clearSelection()
Clears the current selection.
QRect scrollRegion() const
Returns the area of the window which was last scrolled, this is usually the whole window area...
QString selectedText(bool preserveLineBreaks) const
Returns the text which is currently selected.
OCTAVE_EXPORT octave_value_list column
int windowLines() const
Returns the number of lines in the window.
QRect lastScrolledRegion() const
Returns the region of the image which was last scrolled.
void getImage(Character *dest, int size, int startLine, int endLine) const
Returns the current screen image.
void setScreen(Screen *screen)
Sets the screen which this window looks onto.
void setWindowLines(int lines)
Sets the number of lines in the window.
bool trackOutput() const
Returns whether the window automatically moves to the bottom of the screen as new output is added...
A single character in the terminal which consists of a unicode character value, foreground and backgr...
An image of characters with associated attributes.
int getLines()
Return the number of lines.
int getColumns()
Return the number of columns.
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
void selectionChanged()
Emitted when the selection is changed.
Character * _windowBuffer
void getSelectionStart(int &column, int &line)
Retrieves the start of the selection or the cursor position if there is no selection.
int getCursorY() const
Returns the line which the cursor is positioned on.
int windowColumns() const
Returns the number of columns in the window.
int currentLine() const
Returns the index of the line which is currently at the top of this window.
void setSelectionStart(const int column, const int line, const bool columnmode)
Sets the start of the selection.
int scrollCount() const
Returns the number of lines which the region of the window specified by scrollRegion() has been scrol...
int endWindowLine() const
bool isSelected(int column, int line)
Returns true if the character at line , column is part of the selection.
void getSelectionEnd(int &column, int &line)
Retrieves the end of the selection within the window.
QVector< LineProperty > getLineProperties(int startLine, int endLine) const
Returns the additional attributes associated with lines in the image.
int columnCount() const
Returns the total number of columns in the screen.
void setSelectionStart(int column, int line, bool columnMode)
Sets the start of the selection to the given line and column within the window.
bool atEndOfOutput() const
Convenience method.
With real return the complex result
ScreenWindow(QObject *parent=nullptr)
Constructs a new screen window with the given parent.
void getSelectionEnd(int &column, int &line)
Retrieves the end of the selection or the cursor position if there is no selection.
void setTrackOutput(bool trackOutput)
Specifies whether the window should automatically move to the bottom of the screen when new output is...
int lineCount() const
Returns the total number of lines in the screen.
Character * getImage()
Returns the image of characters which are currently visible through this window onto the screen...
void resetScrollCount()
Resets the count of scrolled lines returned by scrollCount()
QVector< LineProperty > getLineProperties()
Returns the line attributes associated with the lines of characters which are currently visible throu...
void scrollTo(int line)
Scrolls the window so that line is at the top of the window.
void notifyOutputChanged()
Notifies the window that the contents of the associated terminal screen have changed.
void clearSelection()
Clears the current selection.
static void fillWithDefaultChar(Character *dest, int count)
Fills the buffer dest with count instances of the default (ie.
void scrolled(int line)
Emitted when the screen window is scrolled to a different position.
bool isSelected(const int column, const int line) const
Returns true if the character at (column, line) is part of the current selection. ...
void setSelectionEnd(const int column, const int line)
Sets the end of the current selection.
void setSelectionEnd(int column, int line)
Sets the end of the selection to the given line and column within the window.
int getHistLines()
Return the number of lines in the history buffer.
Screen * screen() const
Returns the screen which this window looks onto.
int getCursorX() const
Returns the column which the cursor is positioned at.
QPoint cursorPosition() const
Returns the position of the cursor within the window.
int droppedLines() const
Returns the number of lines of output which have been dropped from the history since the last call to...
int scrolledLines() const
Returns the number of lines that the image has been scrolled up or down by, since the last call to re...
void scrollBy(RelativeScrollMode mode, int amount)
Scrolls the window relative to its current position on the screen.
QString selectedText(bool preserveLineBreaks)
Convenience method.
void outputChanged()
Emitted when the contents of the associated terminal screen ( see screen() ) changes.
void getSelectionStart(int &column, int &line)
Retrieves the start of the selection within the window.