public class TerminalView extends Canvas:
Reusable interactive terminal widget backed by PseudoTerminal.
TerminalView is intentionally part of the GUI library, not the editor tool, so applications can embed a real shell-like terminal with keyboard input, ANSI line editing, scrolling and process lifecycle notification.
terminal = TerminalView()
terminal.terminated += lambda(e: ActionEvent): print("shell closed")
terminal.runCommand("pwd")| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | isRunningisRunning as Boolean: |
True while the backing pseudo-terminal process is still running. |
| public readonly property | workingDirectoryworkingDirectory as String: |
Current working directory of the underlying shell. |
| Modifier and Type | Member | Description |
|---|---|---|
| public signal property | cwdcwd as String: |
Current working directory tracked by the terminal. |
| Modifier and Type | Member | Description |
|---|---|---|
| public event | terminatedterminated as ActionEvent |
Emitted when the underlying pseudo-terminal process exits. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | TerminalViewTerminalView(command as String = "", cwd as String = "", terminalFont as String = "", fontSize as Int = 15): |
Creates and starts a terminal. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | appendappend(line as String) as Void: |
Appends text to the terminal display without writing to the shell. |
| public | applyFont | Updates the rendered font and recomputes the terminal geometry. |
| public | closeclose() as Void: |
Stops polling and closes the underlying pseudo-terminal. |
| public override | handleTabKey | Sends Tab or Shift+Tab to the terminal instead of moving focus. |
| public override | paintpaint(painter as Painter) as Void: |
No summary. |
| public | runCommandrunCommand(command as String) as Void: |
Writes a command followed by a newline to the pseudo-terminal. |