TextBoxWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
public sealed record TextBoxWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<TextBoxWidget>Inheritance
Object → Hex1bWidget → TextBoxWidget
Implements
Constructors
TextBoxWidget(string?)
Parameters:
Text(String):
public TextBoxWidget(string? Text = null)Properties
Text
Returns: String
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:
handler(Action<PasteEventArgs>):
Returns: TextBoxWidget
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:
handler(Func<PasteEventArgs, Task>):
Returns: TextBoxWidget
public TextBoxWidget OnPaste(Func<PasteEventArgs, Task> handler)OnSubmit(Action<TextSubmittedEventArgs>)
Sets a synchronous handler called when Enter is pressed in the text box.
Parameters:
handler(Action<TextSubmittedEventArgs>):
Returns: TextBoxWidget
public TextBoxWidget OnSubmit(Action<TextSubmittedEventArgs> handler)OnSubmit(Func<TextSubmittedEventArgs, Task>)
Sets an asynchronous handler called when Enter is pressed in the text box.
Parameters:
handler(Func<TextSubmittedEventArgs, Task>):
Returns: TextBoxWidget
public TextBoxWidget OnSubmit(Func<TextSubmittedEventArgs, Task> handler)OnTextChanged(Action<TextChangedEventArgs>)
Sets a synchronous handler called when the text content changes.
Parameters:
handler(Action<TextChangedEventArgs>):
Returns: TextBoxWidget
public TextBoxWidget OnTextChanged(Action<TextChangedEventArgs> handler)OnTextChanged(Func<TextChangedEventArgs, Task>)
Sets an asynchronous handler called when the text content changes.
Parameters:
handler(Func<TextChangedEventArgs, Task>):
Returns: TextBoxWidget
public TextBoxWidget OnTextChanged(Func<TextChangedEventArgs, Task> handler)Fields
DeleteBackward
Rebindable action: Delete character backward.
Returns: ActionId
public static readonly ActionId DeleteBackwardDeleteForward
Rebindable action: Delete character forward.
Returns: ActionId
public static readonly ActionId DeleteForwardDeleteWordBackward
Rebindable action: Delete previous word.
Returns: ActionId
public static readonly ActionId DeleteWordBackwardDeleteWordForward
Rebindable action: Delete next word.
Returns: ActionId
public static readonly ActionId DeleteWordForwardInsertText
Rebindable action: Insert typed text.
Returns: ActionId
public static readonly ActionId InsertTextMoveEnd
Rebindable action: Move cursor to end.
Returns: ActionId
public static readonly ActionId MoveEndMoveHome
Rebindable action: Move cursor to start.
Returns: ActionId
public static readonly ActionId MoveHomeMoveLeft
Rebindable action: Move cursor left.
Returns: ActionId
public static readonly ActionId MoveLeftMoveRight
Rebindable action: Move cursor right.
Returns: ActionId
public static readonly ActionId MoveRightMoveWordLeft
Rebindable action: Move cursor to previous word.
Returns: ActionId
public static readonly ActionId MoveWordLeftMoveWordRight
Rebindable action: Move cursor to next word.
Returns: ActionId
public static readonly ActionId MoveWordRightSelectAll
Rebindable action: Select all text.
Returns: ActionId
public static readonly ActionId SelectAllSelectLeft
Rebindable action: Extend selection left.
Returns: ActionId
public static readonly ActionId SelectLeftSelectRight
Rebindable action: Extend selection right.
Returns: ActionId
public static readonly ActionId SelectRightSelectToEnd
Rebindable action: Select to end.
Returns: ActionId
public static readonly ActionId SelectToEndSelectToStart
Rebindable action: Select to start.
Returns: ActionId
public static readonly ActionId SelectToStartSubmit
Rebindable action: Submit text.
Returns: ActionId
public static readonly ActionId Submit