Class TextInput
One line of editable text. Enter runs DarkEffekt.Terminal.UI.TextInput.OnSubmit.
Assembly: DarkEffekt.Terminal.UI
Section titled “Assembly: DarkEffekt.Terminal.UI”public sealed class TextInput : ElementInheritance: System.Object -> DarkEffekt.Terminal.UI.Element
Properties
Section titled “Properties”public string Text { get; set; }Placeholder
Section titled “Placeholder”Shown dimmed while the input is empty.
public string Placeholder { get; set; }OnSubmit
Section titled “OnSubmit”public Action<string> OnSubmit { get; set; }OnChanged
Section titled “OnChanged”public Action<string> OnChanged { get; set; }Focusable
Section titled “Focusable”True for an element that takes keyboard focus.
public override bool Focusable { get; }Methods
Section titled “Methods”MeasureCore(CellSize)
Section titled “MeasureCore(CellSize)”The size this element wants, within the room given.
protected override CellSize MeasureCore(CellSize available)Returns
Section titled “Returns”DarkEffekt.Terminal.UI.CellSize
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.UI.CellSize | available |
RenderCore(CellCanvas)
Section titled “RenderCore(CellCanvas)”protected override void RenderCore(CellCanvas canvas)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.UI.CellCanvas | canvas |
OnKey(in TermKeyEvent)
Section titled “OnKey(in TermKeyEvent)”A key for this element. Return true when it was used; false passes it to the parent.
public override bool OnKey(in TermKeyEvent e)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.TermKeyEvent | e |
OnChar(char, TermModifiers)
Section titled “OnChar(char, TermModifiers)”A typed character for this element. Return true when it was used.
public override bool OnChar(char c, TermModifiers modifiers)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Char |
c |
| DarkEffekt.Terminal.TermModifiers | modifiers |
OnPaste(string)
Section titled “OnPaste(string)”public override void OnPaste(string text)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
text |
OnMouse(in TermMouseEvent)
Section titled “OnMouse(in TermMouseEvent)”A pointer event on this element. Return true when it was used.
public override bool OnMouse(in TermMouseEvent e)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.TermMouseEvent | e |