Table of Contents

Class TextAreaBuilder

Namespace
MiniTui
Assembly
MiniTui.dll

A multi-line text input (1.x spec §6). Long lines wrap; the view scrolls vertically to keep the cursor visible, and when focused shows the terminal cursor at the insertion point.

public sealed class TextAreaBuilder
Inheritance
TextAreaBuilder
Inherited Members

Methods

Block(BlockBuilder)

Draw a block around the text area. Its border shows focus.

public TextAreaBuilder Block(BlockBuilder block)

Parameters

block BlockBuilder

Returns

TextAreaBuilder

Draw(Buffer, Rect)

Draw the text area inside its block (or area). With a block that has a right border, a scrollbar is drawn on it when the text doesn't fit.

public void Draw(Buffer buf, Rect area)

Parameters

buf Buffer
area Rect

Focused(bool)

Show the cursor and use the focused styles.

public TextAreaBuilder Focused(bool focused = true)

Parameters

focused bool

Returns

TextAreaBuilder

LineNumbers(bool)

Show line numbers in a gutter on the left (1.x spec §16.4). The text wraps in the width left over; the gutter isn't drawn when that would leave no room for text.

public TextAreaBuilder LineNumbers(bool show = true)

Parameters

show bool

Returns

TextAreaBuilder

Placeholder(string?)

Muted text shown on the first row while the text is empty.

public TextAreaBuilder Placeholder(string? placeholder)

Parameters

placeholder string

Returns

TextAreaBuilder

State(TextAreaState)

The text and cursor.

public TextAreaBuilder State(TextAreaState state)

Parameters

state TextAreaState

Returns

TextAreaBuilder

Style(Style)

A style patched over the theme's input style.

public TextAreaBuilder Style(Style style)

Parameters

style Style

Returns

TextAreaBuilder

Wrap(WrapMode)

How long lines break: Word (the default) at whitespace, Char anywhere, or None, which scrolls the view horizontally instead.

public TextAreaBuilder Wrap(WrapMode wrap)

Parameters

wrap WrapMode

Returns

TextAreaBuilder