TextAreaElement

io.worxbend.tui.dsl.TextAreaElement
final case class TextAreaElement(state: TextAreaState, options: TextAreaOptions = ..., editable: Boolean = ..., props: ElementProps = ..., search: Option[SearchState] = ...) extends Element

Multi-line editor element. While focused it consumes printable characters, Enter (newline), Backspace, Delete, arrows, Home/End and the shared editing chords (editingChords: selection, word motion, clipboard, kill ring, Ctrl+Z undo, Ctrl+Shift+Z redo) — Tab stays free for focus traversal. A bracketed paste lands as one edit, with CRLF and bare CR normalized to logical line breaks. Paste in the open search edits its first query line instead.

Search: Ctrl+F opens the /query prompt (so does / in a readOnly area); typing searches incrementally, Enter keeps the match and closes the prompt, Esc cancels back to where the search started. Afterwards F3 / Shift+F3 (and n / N when read-only) step to the next and previous match.

searchable hands the search to a caller-owned w.SearchState instead, the path log, scrollView and markdown take: a searchBar over the same state types the query, the matches are highlighted in the theme's search styles, and every move of the search puts the caret on the current match. F3 / Shift+F3 (and n / N when read-only) then step that shared search, and Ctrl+F / / are left to bubble to the app, which owns the bar.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Element
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

This node's own type, so a fluent extension gives back what it was handed: progressBar(0.5).fill.bare type-checks because .fill returns a ProgressBarElement, not an abstract Element. Every concrete node fixes it to itself with one line, type Self = ThatNodeType.

This node's own type, so a fluent extension gives back what it was handed: progressBar(0.5).fill.bare type-checks because .fill returns a ProgressBarElement, not an abstract Element. Every concrete node fixes it to itself with one line, type Self = ThatNodeType.

Attributes

Value members

Concrete methods

override def debugName: String

The factory-style name of this node — panel, button, scrollView — for the element-tree snapshot and any other diagnostic that has to say what a node is without reflecting over its class. Every node type declares its own; a decorator answers with the name of the node it wraps. The default is only there so a node added without one still renders — ElementTreeSnapshotSpec fails the build until the override is written.

The factory-style name of this node — panel, button, scrollView — for the element-tree snapshot and any other diagnostic that has to say what a node is without reflecting over its class. Every node type declares its own; a decorator answers with the name of the node it wraps. The default is only there so a node added without one still renders — ElementTreeSnapshotSpec fails the build until the override is written.

Attributes

Definition Classes
def lexer(lexer: Lexer): TextAreaElement

Highlights the lines through lexer — see TextAreaOptions.lexer.

Highlights the lines through lexer — see TextAreaOptions.lexer.

Attributes

Draws a line-number gutter.

Draws a line-number gutter.

Attributes

def options(options: TextAreaOptions): TextAreaElement

Replaces every widget option at once.

Replaces every widget option at once.

Attributes

override def pointerShape: Option[PointerShape]

The mouse pointer this node wants shown over it, when it wants one: the hand over a button or a link, the I-beam over a text field. None leaves the pointer as it is. An explicit .pointer(shape) on the node lands in props.pointerShape and takes precedence; the interactive nodes override this with their own default.

The mouse pointer this node wants shown over it, when it wants one: the hand over a button or a link, the I-beam over a text field. None leaves the pointer as it is. An explicit .pointer(shape) on the node lands in props.pointerShape and takes precedence; the interactive nodes override this with their own default.

Attributes

Definition Classes

A viewer: motion, selection, copy and search work, edits do not — and /, n, N search like less.

A viewer: motion, selection, copy and search work, edits do not — and /, n, N search like less.

Attributes

def searchable(state: SearchState): TextAreaElement

Searches this area through state — the shared w.SearchState path; see the class notes. Pair it with a searchBar over the same state (or over the state a w.SearchState.view came from).

Searches this area through state — the shared w.SearchState path; see the class notes. Pair it with a searchBar over the same state (or over the state a w.SearchState.view came from).

Attributes

def widget: Widget

Soft-wraps long lines instead of scrolling sideways.

Soft-wraps long lines instead of scrolling sideways.

Attributes

Inherited methods

def accessibleName: String

What this node is called when it is announced — button Save, checkbox agree — before the interaction states ElementHost.accessibleLabel appends. Defaults to debugName; a node with a label of its own says it.

What this node is called when it is announced — button Save, checkbox agree — before the interaction states ElementHost.accessibleLabel appends. Defaults to debugName; a node with a label of its own says it.

Attributes

Inherited from:
Element
def children: Seq[Element]

Attributes

Inherited from:
Element
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
def style(style: Style): Self

This element with style as its own — the content style on every node: a text's text, a list's body, a panel's children and inner area. A container's border is frameStyle instead. The fluent builders (.fg, .bold, .styled(...)) edit the same style rather than replacing it.

This element with style as its own — the content style on every node: a text's text, a list's body, a panel's children and inner area. A container's border is frameStyle instead. The fluent builders (.fg, .bold, .styled(...)) edit the same style rather than replacing it.

Attributes

Inherited from:
Element
def style: Style

Attributes

Inherited from:
Element