The view of one session.
More...
#include <TerminalView.hpp>
◆ clampSelection()
| void undoApp::Terminal::TerminalView::clampSelection |
( |
| ) |
|
|
private |
◆ colAt()
| int undoApp::Terminal::TerminalView::colAt |
( |
float |
x | ) |
const |
|
private |
◆ copySelection()
| void undoApp::Terminal::TerminalView::copySelection |
( |
TerminalSession & |
session | ) |
|
Copy the selection to the clipboard.
- Parameters
-
| session | Session to copy from |
◆ draw()
| void undoApp::Terminal::TerminalView::draw |
( |
TerminalSession & |
session, |
|
|
ImFont * |
font, |
|
|
float & |
fontSize, |
|
|
bool |
focused |
|
) |
| |
Draw the session inside the current ImGui window.
- Parameters
-
| session | Session to draw |
| font | Monospace font to draw with |
| fontSize | Size to draw it at, adjusted by Ctrl and the wheel |
| focused | Whether this pane holds the keyboard |
The pane sizes the session to the space it was given, so a resize here is a real terminal resize as far as the shell is concerned. A larger font makes the cells larger and the session smaller: the grid cannot overlap, because every glyph is drawn inside a cell measured from that same font and size.
◆ handleInput()
| void undoApp::Terminal::TerminalView::handleInput |
( |
TerminalSession & |
session, |
|
|
bool |
focused, |
|
|
float & |
fontSize, |
|
|
float |
defaultSize |
|
) |
| |
Turn this frame's key presses into what the session should be sent.
- Parameters
-
| session | Session to send to |
| focused | Whether this pane holds the keyboard |
| fontSize | Size of the terminal, changed by the size keys |
| defaultSize | Size the reset key returns to |
The size keys are answered here rather than in the panel, because the ones that matter arrive as characters and not as keys: on a layout where '+' is its own key, or typed as Shift and '=', the only thing ImGui reports is the character, so a check against a key code never sees it.
◆ hasSelection()
| bool undoApp::Terminal::TerminalView::hasSelection |
( |
| ) |
const |
|
inline |
Whether there is a selection to copy.
◆ paste()
Paste the clipboard into the session.
- Parameters
-
| session | Session to paste into |
◆ rowAt()
| int undoApp::Terminal::TerminalView::rowAt |
( |
float |
y | ) |
const |
|
private |
◆ zoom()
| void undoApp::Terminal::TerminalView::zoom |
( |
float & |
fontSize, |
|
|
float |
notches |
|
) |
| const |
|
private |
◆ m_cellHeight
| float undoApp::Terminal::TerminalView::m_cellHeight = 0.0f |
|
private |
◆ m_cellWidth
| float undoApp::Terminal::TerminalView::m_cellWidth = 0.0f |
|
private |
◆ m_dragging
| bool undoApp::Terminal::TerminalView::m_dragging = false |
|
private |
◆ m_fontSize
| float undoApp::Terminal::TerminalView::m_fontSize = 0.0f |
|
private |
Size the glyphs are actually drawn at.
◆ m_hasSelection
| bool undoApp::Terminal::TerminalView::m_hasSelection = false |
|
private |
A finished selection is still there.
◆ m_selecting
| bool undoApp::Terminal::TerminalView::m_selecting = false |
|
private |
◆ m_selection
| Selection undoApp::Terminal::TerminalView::m_selection |
|
private |
Where the drag is, or was.
◆ m_viewLeft
| int undoApp::Terminal::TerminalView::m_viewLeft = 0 |
|
private |
First viewport column under the cursor.
◆ m_viewTop
| int undoApp::Terminal::TerminalView::m_viewTop = 0 |
|
private |
First viewport row under the cursor.
The documentation for this class was generated from the following file: