terminalview

package
v0.0.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeKey

func EncodeKey(event KeyEvent) ([]byte, bool)

EncodeKey translates native key events into conventional xterm input bytes. Ctrl+C/D/Z remain distinct ETX/EOT/SUB bytes. Clipboard shortcuts are routed by UITerminalView and must never leak control bytes into the PTY.

Types

type KeyEvent

type KeyEvent struct {
	Key   int
	Text  string
	State int
}

KeyEvent is a stable, testable projection of FLTK keyboard state.

type Size

type Size struct {
	Columns int
	Rows    int
}

Size is the terminal grid size in character cells. It is transport-neutral and can be passed directly to PTY, SSH window-change, or ConPTY adapters.

type UITerminalView

type UITerminalView struct {
	// contains filtered or unexported fields
}

UITerminalView is a native ANSI/VT presentation and input surface. It owns terminal parsing, scrollback, selection, focus, and key-sequence translation; it intentionally does not own a process or network connection.

func NewUITerminalView

func NewUITerminalView(r *foundation.Rect) *UITerminalView

func (*UITerminalView) Append

func (t *UITerminalView) Append(text string)

func (*UITerminalView) Clear

func (t *UITerminalView) Clear()

func (*UITerminalView) ClearHistory

func (t *UITerminalView) ClearHistory()

func (*UITerminalView) Feed

func (t *UITerminalView) Feed(data []byte)

func (*UITerminalView) OnInput

func (t *UITerminalView) OnInput(handler func([]byte))

OnInput receives exact terminal bytes for printable/IME text, control keys, navigation keys, and paste commits. Returning ownership to the caller keeps PTY and SSH lifecycle outside the reusable native widget.

func (*UITerminalView) OnResize

func (t *UITerminalView) OnResize(handler func(Size))

func (*UITerminalView) Raw

func (*UITerminalView) Reset

func (t *UITerminalView) Reset()

func (*UITerminalView) SetAutomationID

func (t *UITerminalView) SetAutomationID(id string) *UITerminalView

func (*UITerminalView) SetAutomationName

func (t *UITerminalView) SetAutomationName(name string) *UITerminalView

func (*UITerminalView) SetBackgroundColor

func (t *UITerminalView) SetBackgroundColor(color uint)

func (*UITerminalView) SetFont

func (t *UITerminalView) SetFont(font fltk_bridge.Font)

func (*UITerminalView) SetFontSize

func (t *UITerminalView) SetFontSize(size int)

func (*UITerminalView) SetHistoryRows

func (t *UITerminalView) SetHistoryRows(rows int)

func (*UITerminalView) SetMargins

func (t *UITerminalView) SetMargins(left, top, right, bottom int)

func (*UITerminalView) SetRedrawRate

func (t *UITerminalView) SetRedrawRate(seconds float32)

func (*UITerminalView) SetSelectionColors

func (t *UITerminalView) SetSelectionColors(foreground, background uint)

func (*UITerminalView) SetTextColor

func (t *UITerminalView) SetTextColor(color uint)

func (*UITerminalView) Size

func (t *UITerminalView) Size() Size

func (*UITerminalView) Text

func (t *UITerminalView) Text() string

func (*UITerminalView) View

func (t *UITerminalView) View() *view.UIView

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL