Navigation
API > API/Plugins > API/Plugins/Terminal
Ring-buffer-backed character cell grid with configurable scrollback.
Rows are stored in a flat ring buffer. The viewport (the visible portion) is always the last ViewportRows rows of the active buffer. Scrollback rows accumulate above the viewport up to ScrollbackLimit.
| Name | FTerminalBuffer |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Terminal/Source/Terminal/Public/TerminalBuffer.h |
| Include Path | #include "TerminalBuffer.h" |
Syntax
class FTerminalBuffer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTerminalBuffer() |
TerminalBuffer.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Cursor | FTerminalCursor | TerminalBuffer.h | ||
| DefaultCell | FTerminalCell | Default cell used for clearing and new lines. | TerminalBuffer.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAlternateBufferActive | bool | Alternate buffer state. | TerminalBuffer.h | |
| Columns | int32 | TerminalBuffer.h | ||
| RingStart | int32 | TerminalBuffer.h | ||
| Rows | TArray< TArray< FTerminalCell > > | Ring buffer of rows. Each row is a TArray |
TerminalBuffer.h | |
| SavedCursor | FTerminalCursor | TerminalBuffer.h | ||
| SavedMainRows | TArray< TArray< FTerminalCell > > | TerminalBuffer.h | ||
| SavedRingStart | int32 | TerminalBuffer.h | ||
| SavedTotalRowsWritten | int32 | TerminalBuffer.h | ||
| ScrollbackLimit | int32 | TerminalBuffer.h | ||
| TotalRowsWritten | int32 | TerminalBuffer.h | ||
| ViewportRows | int32 | TerminalBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ActivateAlternateBuffer() |
Alternate screen buffer support. | TerminalBuffer.h | |
void Clear() |
Clear the entire buffer. | TerminalBuffer.h | |
void ClearScrollback() |
Clear all scrollback rows, keeping only the current viewport content. | TerminalBuffer.h | |
void DeactivateAlternateBuffer() |
TerminalBuffer.h | ||
void FillRegion
(
int32 AbsoluteRowStart, |
Fill a region of cells with a given cell value. | TerminalBuffer.h | |
int32 GetAbsoluteRow
(
int32 ViewportRow, |
Get the absolute row index for a given viewport row (0 = top of viewport) and scroll offset. | TerminalBuffer.h | |
const FTerminalCell & GetCell
(
int32 AbsoluteRow, |
Get a cell by absolute row index (0 = oldest scrollback row) and column. | TerminalBuffer.h | |
int32 GetColumns() |
TerminalBuffer.h | ||
int32 GetScrollbackLength() |
Get the number of rows available for scrollback (above the viewport). | TerminalBuffer.h | |
FString GetTextInRange
(
int32 StartRow, |
Get text content from a range of buffer-absolute rows. | TerminalBuffer.h | |
int32 GetTotalRows() |
Get the total number of rows written (viewport + scrollback). | TerminalBuffer.h | |
int32 GetViewportRows() |
TerminalBuffer.h | ||
void Initialize
(
int32 InColumns, |
TerminalBuffer.h | ||
bool IsAlternateBufferActive() |
TerminalBuffer.h | ||
void PushNewLine() |
Push a new blank line at the bottom, advancing the ring buffer. | TerminalBuffer.h | |
void Resize
(
int32 InColumns, |
TerminalBuffer.h | ||
void ScrollRegionDown
(
int32 TopRow, |
Scroll a region of viewport rows down by Count lines, filling new lines with blank cells. | TerminalBuffer.h | |
void ScrollRegionUp
(
int32 TopRow, |
Scroll a region of viewport rows up by Count lines, filling new lines with blank cells. | TerminalBuffer.h | |
void SetCell
(
int32 AbsoluteRow, |
Set a cell by absolute row index and column. | TerminalBuffer.h |