Table of Contents

Class TerminalTextArea

Namespace
RatatuiUnity

Multi-line text editor: line-aware cursor, vertical + horizontal scrollbars (auto-hide), mouse-wheel scrolling, selection spanning lines, clipboard (preserves newlines), undo/redo, click-and-drag selection, double-click word + triple-click all, focus-time select-all, ReadOnly, optional MaxLength + CharFilter.

public class TerminalTextArea
Inheritance
TerminalTextArea
Inherited Members

Constructors

TerminalTextArea(string)

public TerminalTextArea(string initialValue = "")

Parameters

initialValue string

Properties

AutoCorrection

Enable native autocorrection on the virtual keyboard.

public bool AutoCorrection { get; set; }

Property Value

bool

BlinkPeriod

public float BlinkPeriod { get; set; }

Property Value

float

CharFilter

public Func<char, bool> CharFilter { get; set; }

Property Value

Func<char, bool>

Cursor

public int Cursor { get; set; }

Property Value

int

CursorColumn

public int CursorColumn { get; }

Property Value

int

CursorLine

public int CursorLine { get; }

Property Value

int

HasSelection

public bool HasSelection { get; }

Property Value

bool

KeyboardType

Virtual keyboard layout requested on iOS / Android / mobile WebGL.

public TouchScreenKeyboardType KeyboardType { get; set; }

Property Value

TouchScreenKeyboardType

LineCount

public int LineCount { get; }

Property Value

int

MaxLength

public int MaxLength { get; set; }

Property Value

int

Placeholder

public string Placeholder { get; set; }

Property Value

string

ReadOnly

public bool ReadOnly { get; set; }

Property Value

bool

ScrollLine

public int ScrollLine { get; }

Property Value

int

SelectAllOnFocus

public bool SelectAllOnFocus { get; set; }

Property Value

bool

SelectedText

public string SelectedText { get; }

Property Value

string

SelectionEnd

public int SelectionEnd { get; }

Property Value

int

SelectionStart

public int SelectionStart { get; }

Property Value

int

Value

public string Value { get; set; }

Property Value

string

Methods

ClearSelection()

public void ClearSelection()

Copy()

public bool Copy()

Returns

bool

Cut()

public bool Cut()

Returns

bool

DeleteBack()

public void DeleteBack()

DeleteForward()

public void DeleteForward()

DeleteWordBack()

public void DeleteWordBack()

DeleteWordForward()

public void DeleteWordForward()

HandleKeyEvent(TerminalKeyEvent)

public bool HandleKeyEvent(TerminalKeyEvent e)

Parameters

e TerminalKeyEvent

Returns

bool

HandleMouseEvent(TerminalMouseEvent)

public bool HandleMouseEvent(TerminalMouseEvent e)

Parameters

e TerminalMouseEvent

Returns

bool

InsertChar(char)

public void InsertChar(char c)

Parameters

c char

InsertString(string)

public void InsertString(string s)

Parameters

s string

MoveDocEnd(bool)

public void MoveDocEnd(bool extend)

Parameters

extend bool

MoveDocStart(bool)

public void MoveDocStart(bool extend)

Parameters

extend bool

MoveDown(bool)

public void MoveDown(bool extend)

Parameters

extend bool

MoveLeft(bool)

public void MoveLeft(bool extend)

Parameters

extend bool

MoveLineEnd(bool)

public void MoveLineEnd(bool extend)

Parameters

extend bool

MoveLineStart(bool)

public void MoveLineStart(bool extend)

Parameters

extend bool

MoveRight(bool)

public void MoveRight(bool extend)

Parameters

extend bool

MoveUp(bool)

public void MoveUp(bool extend)

Parameters

extend bool

MoveWordLeft(bool)

public void MoveWordLeft(bool extend)

Parameters

extend bool

MoveWordRight(bool)

public void MoveWordRight(bool extend)

Parameters

extend bool

OnBlur()

public void OnBlur()

OnFocus()

public void OnFocus()

OwnsArea(uint)

True if areaId is the outer area passed to the last Render(RatatuiTerminal, uint, Color, Color, Color, Color, Color, Color, Color, bool) call or one of the scrollbar sub-areas it created. Callers use this to route clicks/scrolls to this widget even though hit-testing resolves to the most deeply nested (split) area.

public bool OwnsArea(uint areaId)

Parameters

areaId uint

Returns

bool

PageDown(bool)

public void PageDown(bool extend)

Parameters

extend bool

PageUp(bool)

public void PageUp(bool extend)

Parameters

extend bool

Paste()

public bool Paste()

Returns

bool

Redo()

public bool Redo()

Returns

bool

Render(RatatuiTerminal, uint, Color, Color, Color, Color, Color, Color, Color, bool)

public void Render(RatatuiTerminal term, uint areaId, Color fg = default, Color bg = default, Color cursorFg = default, Color cursorBg = default, Color selectionFg = default, Color selectionBg = default, Color placeholderFg = default, bool focused = true)

Parameters

term RatatuiTerminal
areaId uint
fg Color
bg Color
cursorFg Color
cursorBg Color
selectionFg Color
selectionBg Color
placeholderFg Color
focused bool

Select(int, int)

public void Select(int start, int end)

Parameters

start int
end int

SelectAll()

public void SelectAll()

SyncMobileKeyboard()

public void SyncMobileKeyboard()

Undo()

public bool Undo()

Returns

bool