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
blockBlockBuilder
Returns
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
Focused(bool)
Show the cursor and use the focused styles.
public TextAreaBuilder Focused(bool focused = true)
Parameters
focusedbool
Returns
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
showbool
Returns
Placeholder(string?)
Muted text shown on the first row while the text is empty.
public TextAreaBuilder Placeholder(string? placeholder)
Parameters
placeholderstring
Returns
State(TextAreaState)
The text and cursor.
public TextAreaBuilder State(TextAreaState state)
Parameters
stateTextAreaState
Returns
Style(Style)
A style patched over the theme's input style.
public TextAreaBuilder Style(Style style)
Parameters
styleStyle
Returns
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
wrapWrapMode