Skip to content

TextBoxWidget

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

csharp
public sealed record TextBoxWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<TextBoxWidget>

Inheritance

ObjectHex1bWidgetTextBoxWidget

Implements

Constructors

TextBoxWidget(string?)

Parameters:

csharp
public TextBoxWidget(string? Text = null)

Properties

Text

Returns: String

csharp
public string? Text { get; init; }

Methods

OnPaste(Action<PasteEventArgs>)

Sets a synchronous handler called when paste data is received. Overrides the default behavior of inserting pasted text at the cursor position.

Parameters:

Returns: TextBoxWidget

csharp
public TextBoxWidget OnPaste(Action<PasteEventArgs> handler)

OnPaste(Func<PasteEventArgs, Task>)

Sets an asynchronous handler called when paste data is received. Overrides the default behavior of inserting pasted text at the cursor position.

Parameters:

Returns: TextBoxWidget

csharp
public TextBoxWidget OnPaste(Func<PasteEventArgs, Task> handler)

OnSubmit(Action<TextSubmittedEventArgs>)

Sets a synchronous handler called when Enter is pressed in the text box.

Parameters:

Returns: TextBoxWidget

csharp
public TextBoxWidget OnSubmit(Action<TextSubmittedEventArgs> handler)

OnSubmit(Func<TextSubmittedEventArgs, Task>)

Sets an asynchronous handler called when Enter is pressed in the text box.

Parameters:

Returns: TextBoxWidget

csharp
public TextBoxWidget OnSubmit(Func<TextSubmittedEventArgs, Task> handler)

OnTextChanged(Action<TextChangedEventArgs>)

Sets a synchronous handler called when the text content changes.

Parameters:

Returns: TextBoxWidget

csharp
public TextBoxWidget OnTextChanged(Action<TextChangedEventArgs> handler)

OnTextChanged(Func<TextChangedEventArgs, Task>)

Sets an asynchronous handler called when the text content changes.

Parameters:

Returns: TextBoxWidget

csharp
public TextBoxWidget OnTextChanged(Func<TextChangedEventArgs, Task> handler)

Fields

DeleteBackward

Rebindable action: Delete character backward.

Returns: ActionId

csharp
public static readonly ActionId DeleteBackward

DeleteForward

Rebindable action: Delete character forward.

Returns: ActionId

csharp
public static readonly ActionId DeleteForward

DeleteWordBackward

Rebindable action: Delete previous word.

Returns: ActionId

csharp
public static readonly ActionId DeleteWordBackward

DeleteWordForward

Rebindable action: Delete next word.

Returns: ActionId

csharp
public static readonly ActionId DeleteWordForward

InsertText

Rebindable action: Insert typed text.

Returns: ActionId

csharp
public static readonly ActionId InsertText

MoveEnd

Rebindable action: Move cursor to end.

Returns: ActionId

csharp
public static readonly ActionId MoveEnd

MoveHome

Rebindable action: Move cursor to start.

Returns: ActionId

csharp
public static readonly ActionId MoveHome

MoveLeft

Rebindable action: Move cursor left.

Returns: ActionId

csharp
public static readonly ActionId MoveLeft

MoveRight

Rebindable action: Move cursor right.

Returns: ActionId

csharp
public static readonly ActionId MoveRight

MoveWordLeft

Rebindable action: Move cursor to previous word.

Returns: ActionId

csharp
public static readonly ActionId MoveWordLeft

MoveWordRight

Rebindable action: Move cursor to next word.

Returns: ActionId

csharp
public static readonly ActionId MoveWordRight

SelectAll

Rebindable action: Select all text.

Returns: ActionId

csharp
public static readonly ActionId SelectAll

SelectLeft

Rebindable action: Extend selection left.

Returns: ActionId

csharp
public static readonly ActionId SelectLeft

SelectRight

Rebindable action: Extend selection right.

Returns: ActionId

csharp
public static readonly ActionId SelectRight

SelectToEnd

Rebindable action: Select to end.

Returns: ActionId

csharp
public static readonly ActionId SelectToEnd

SelectToStart

Rebindable action: Select to start.

Returns: ActionId

csharp
public static readonly ActionId SelectToStart

Submit

Rebindable action: Submit text.

Returns: ActionId

csharp
public static readonly ActionId Submit

Released under the MIT License.