public interface ITerminal extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
blur()
Unfocus the terminal.
|
void |
clear()
Clear the entire buffer, making the prompt line the new first line.
|
void |
clearSelection()
Clears the current terminal selection.
|
void |
focus()
Focus the terminal.
|
CompletableFuture<String> |
getSelection()
Gets the terminal's current selection, this is useful for implementing copy behavior outside of
xterm.js.
|
CompletableFuture<Boolean> |
hasSelection()
Gets whether the terminal has an active selection.
|
void |
paste(String data)
Writes text to the terminal, performing the necessary transformations for pasted text.
|
void |
refresh(int start,
int end)
Tells the renderer to refresh terminal content between two rows (inclusive) at the next
opportunity.
|
void |
reset()
Perform a full reset (RIS, aka '\x1bc').
|
void |
resize(int columns,
int rows)
Resizes the terminal.
|
void |
scrollLines(int amount)
Scroll the display of the terminal
|
void |
scrollPages(int pageCount)
Scroll the display of the terminal by a number of pages.
|
void |
scrollToBottom()
Scrolls the display of the terminal to the bottom.
|
void |
scrollToLine(int line)
Scrolls to a line within the buffer.
|
void |
scrollToTop()
Scrolls the display of the terminal to the top.
|
void |
select(int column,
int row,
int length)
Selects text within the terminal.
|
void |
selectAll()
Selects all text within the terminal.
|
void |
selectLines(int start,
int end)
Selects text in the buffer between 2 lines.
|
void |
write(String data)
Write data to the terminal.
|
void |
writeln(String data)
Writes data to the terminal, followed by a break line character (\n).
|
void blur()
void focus()
CompletableFuture<Boolean> hasSelection()
CompletableFuture<String> getSelection()
void clearSelection()
void select(int column,
int row,
int length)
column - The column the selection starts at.row - The row the selection starts at.length - The length of the selection.void selectAll()
void selectLines(int start,
int end)
start - The 0-based line index to select from (inclusive).end - The 0-based line index to select to (inclusive).void scrollLines(int amount)
amount - The number of lines to scroll down (negative scroll up).void scrollPages(int pageCount)
pageCount - The number of pages to scroll (negative scrolls up).void scrollToTop()
void scrollToBottom()
void scrollToLine(int line)
line - The 0-based line index to scroll to.void clear()
void write(String data)
data - The data to write to the terminal.void writeln(String data)
data - The data to write to the terminal. This can either be raw bytes given as Uint8Array
from the pty or a string. Raw bytes will always be treated as UTF-8 encoded, string data as
UTF-16.callback - Optional callback that fires when the data was processed by the parser.void paste(String data)
data - The text to write to the terminal.void refresh(int start,
int end)
start - The row to start from (between 0 and this.rows - 1).end - The row to end at (between start and this.rows - 1).void reset()
void resize(int columns,
int rows)
Copyright © 2020–2023 Flowing Code. All rights reserved.