22 #ifndef SCREENWINDOW_H
23 #define SCREENWINDOW_H
26 #include <QtCore/QObject>
27 #include <QtCore/QPoint>
28 #include <QtCore/QRect>
A single character in the terminal which consists of a unicode character value, foreground and backgr...
Provides a window onto a section of a terminal screen.
Character * getImage()
Returns the image of characters which are currently visible through this window onto 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.
void setSelectionEnd(int column, int line)
Sets the end of the selection to the given line and column within the window.
void getSelectionEnd(int &column, int &line)
Retrieves the end of the selection within the window.
void setTrackOutput(bool trackOutput)
Specifies whether the window should automatically move to the bottom of the screen when new output is...
QRect scrollRegion() const
Returns the area of the window which was last scrolled, this is usually the whole window area.
int windowLines() const
Returns the number of lines in the window.
void scrolled(int line)
Emitted when the screen window is scrolled to a different position.
int currentLine() const
Returns the index of the line which is currently at the top of this window.
bool atEndOfOutput() const
Convenience method.
bool isSelected(int column, int line)
Returns true if the character at line , column is part of the selection.
int lineCount() const
Returns the total number of lines in the screen.
void getSelectionStart(int &column, int &line)
Retrieves the start of the selection within the window.
int columnCount() const
Returns the total number of columns in the screen.
void clearSelection()
Clears the current selection.
QString selectedText(bool preserveLineBreaks) const
Returns the text which is currently selected.
int endWindowLine() const
Character * _windowBuffer
int windowColumns() const
Returns the number of columns in the window.
bool trackOutput() const
Returns whether the window automatically moves to the bottom of the screen as new output is added.
ScreenWindow(QObject *parent=nullptr)
Constructs a new screen window with the given parent.
void setScreen(Screen *screen)
Sets the screen which this window looks onto.
void notifyOutputChanged()
Notifies the window that the contents of the associated terminal screen have changed.
QPoint cursorPosition() const
Returns the position of the cursor within the window.
void selectionChanged()
Emitted when the selection is changed.
void scrollBy(RelativeScrollMode mode, int amount)
Scrolls the window relative to its current position on the screen.
int scrollCount() const
Returns the number of lines which the region of the window specified by scrollRegion() has been scrol...
void scrollTo(int line)
Scrolls the window so that line is at the top of the window.
void resetScrollCount()
Resets the count of scrolled lines returned by scrollCount()
Screen * screen() const
Returns the screen which this window looks onto.
void outputChanged()
Emitted when the contents of the associated terminal screen ( see screen() ) changes.
QVector< LineProperty > getLineProperties()
Returns the line attributes associated with the lines of characters which are currently visible throu...
void setWindowLines(int lines)
Sets the number of lines in the window.
An image of characters with associated attributes.