Class LineEdit

Namespace
Forma
Assembly
Forma.dll

Single-line editable text. Call InsertText(string) from the host window's text-input callback for IME-safe text entry.

[TemplatePart("PART_EditorPresenter", typeof(LineEditPresenter), true)]
public class LineEdit : TemplatedControl, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable
Inheritance
LineEdit
Implements
Derived
Inherited Members

Constructors

LineEdit()

public LineEdit()

Fields

EditorPresenterPartName

public const string EditorPresenterPartName = "PART_EditorPresenter"

Field Value

string

Properties

AccessibilityActions

public override AccessibilityActions AccessibilityActions { get; }

Property Value

AccessibilityActions

AccessibilityName

public override string AccessibilityName { get; }

Property Value

string

AccessibilityRole

public override AccessibilityRole AccessibilityRole { get; }

Property Value

AccessibilityRole

AccessibilityStates

public override AccessibilityStates AccessibilityStates { get; }

Property Value

AccessibilityStates

AccessibilityValue

public override string AccessibilityValue { get; }

Property Value

string

CaretColumn

Zero-based caret index in the underlying string.

public int CaretColumn { get; protected set; }

Property Value

int

ClearButtonEnabled

public bool ClearButtonEnabled { get; set; }

Property Value

bool

ClipboardTextProvider

Optional per-control override used by Paste() before Clipboard.

public Func<LineEdit, string> ClipboardTextProvider { get; set; }

Property Value

Func<LineEdit, string>

ContextMenuEnabled

public bool ContextMenuEnabled { get; set; }

Property Value

bool

DeselectOnFocusLoss

public bool DeselectOnFocusLoss { get; set; }

Property Value

bool

DrawControlCharacters

public bool DrawControlCharacters { get; }

Property Value

bool

Editable

public bool Editable { get; set; }

Property Value

bool

Font

public SpriteFont Font { get; set; }

Property Value

SpriteFont

HasImeComposition

public bool HasImeComposition { get; }

Property Value

bool

HasRedo

public bool HasRedo { get; }

Property Value

bool

HasSelection

public bool HasSelection { get; }

Property Value

bool

HasUndo

public bool HasUndo { get; }

Property Value

bool

ImeCompositionSelection

public Point ImeCompositionSelection { get; }

Property Value

Point

ImeCompositionText

public string ImeCompositionText { get; }

Property Value

string

MaxLength

public int MaxLength { get; set; }

Property Value

int

Padding

public Thickness Padding { get; set; }

Property Value

Thickness

PlaceholderText

public string PlaceholderText { get; set; }

Property Value

string

SecretCharacter

public string SecretCharacter { get; set; }

Property Value

string

SelectAllOnFocus

public bool SelectAllOnFocus { get; set; }

Property Value

bool

SelectedText

public string SelectedText { get; }

Property Value

string

SelectingEnabled

public bool SelectingEnabled { get; set; }

Property Value

bool

SelectionFrom

public int SelectionFrom { get; }

Property Value

int

SelectionTo

public int SelectionTo { get; }

Property Value

int

ShortcutKeysEnabled

public bool ShortcutKeysEnabled { get; set; }

Property Value

bool

StructuredTextBidiOverride

public StructuredTextParser StructuredTextBidiOverride { get; }

Property Value

StructuredTextParser

SubmitOnFocusExit

public bool SubmitOnFocusExit { get; set; }

Property Value

bool

Text

public string Text { get; set; }

Property Value

string

TextDirection

public TextDirection TextDirection { get; }

Property Value

TextDirection

TextVerticalAlignment

public VerticalAlignment TextVerticalAlignment { get; set; }

Property Value

VerticalAlignment

UIFont

public UIFont UIFont { get; set; }

Property Value

UIFont

UndoEnabled

public bool UndoEnabled { get; set; }

Property Value

bool

UndoStackMaxSize

public int UndoStackMaxSize { get; set; }

Property Value

int

Methods

CancelImeComposition()

public void CancelImeComposition()

Clear()

public void Clear()

ClearUndoHistory()

public void ClearUndoHistory()

CommitImeComposition(string)

public void CommitImeComposition(string text = null)

Parameters

text string

Copy()

public void Copy()

Cut()

public void Cut()

DeleteSelection()

public void DeleteSelection()

DeleteText(int, int)

public void DeleteText(int fromColumn, int toColumn)

Parameters

fromColumn int
toColumn int

Deselect()

public void Deselect()

GetCaretColumnAtPosition(Point)

protected virtual int GetCaretColumnAtPosition(Point position)

Parameters

position Point

Returns

int

GetClearButtonRectangle()

Local clear-button hit region, or an empty rectangle when the affordance is unavailable.

public Rectangle GetClearButtonRectangle()

Returns

Rectangle

GetControlCharacterMenu()

public PopupMenu GetControlCharacterMenu()

Returns

PopupMenu

GetDrawControlChars()

public bool GetDrawControlChars()

Returns

bool

GetLanguage()

public string GetLanguage()

Returns

string

GetMenu()

Returns the retained context popup, equivalent to Godot's get_menu().

public virtual PopupMenu GetMenu()

Returns

PopupMenu

GetMinimumSize()

public override Vector2 GetMinimumSize()

Returns

Vector2

GetScrollOffset()

public float GetScrollOffset()

Returns

float

GetStructuredTextBidiOverride()

public StructuredTextParser GetStructuredTextBidiOverride()

Returns

StructuredTextParser

GetStructuredTextBidiOverrideOptions()

public IReadOnlyList<object> GetStructuredTextBidiOverrideOptions()

Returns

IReadOnlyList<object>

GetTextDirection()

public TextDirection GetTextDirection()

Returns

TextDirection

GetTextDirectionMenu()

public PopupMenu GetTextDirectionMenu()

Returns

PopupMenu

InsertText(string)

public virtual void InsertText(string text)

Parameters

text string

IsContextMenuEnabled()

public bool IsContextMenuEnabled()

Returns

bool

IsMenuVisible()

public virtual bool IsMenuVisible()

Returns

bool

IsSelectAllOnFocus()

public bool IsSelectAllOnFocus()

Returns

bool

IsSelectingEnabled()

public bool IsSelectingEnabled()

Returns

bool

IsShortcutKeysEnabled()

public bool IsShortcutKeysEnabled()

Returns

bool

MenuOption(LineEditMenuOption)

public void MenuOption(LineEditMenuOption option)

Parameters

option LineEditMenuOption

OnTemplateApplied()

protected override void OnTemplateApplied()

Paste()

public void Paste()

Paste(string)

public void Paste(string clipboard)

Parameters

clipboard string

Redo()

public void Redo()

Select(int, int)

public void Select(int from, int to)

Parameters

from int
to int

SelectAll()

public void SelectAll()

SetContextMenuEnabled(bool)

public void SetContextMenuEnabled(bool enabled)

Parameters

enabled bool

SetDrawControlChars(bool)

public void SetDrawControlChars(bool enabled)

Parameters

enabled bool

SetImeComposition(string, int, int)

public void SetImeComposition(string text, int selectionStart = 0, int selectionLength = 0)

Parameters

text string
selectionStart int
selectionLength int

SetLanguage(string)

public void SetLanguage(string language)

Parameters

language string

SetSelectAllOnFocus(bool)

public void SetSelectAllOnFocus(bool enabled)

Parameters

enabled bool

SetSelectingEnabled(bool)

public void SetSelectingEnabled(bool enabled)

Parameters

enabled bool

SetShortcutKeysEnabled(bool)

public void SetShortcutKeysEnabled(bool enabled)

Parameters

enabled bool

SetStructuredTextBidiOverride(StructuredTextParser)

public void SetStructuredTextBidiOverride(StructuredTextParser parser)

Parameters

parser StructuredTextParser

SetStructuredTextBidiOverrideOptions(IEnumerable<object>)

public void SetStructuredTextBidiOverrideOptions(IEnumerable<object> options)

Parameters

options IEnumerable<object>

SetTextDirection(TextDirection)

public void SetTextDirection(TextDirection direction)

Parameters

direction TextDirection

Undo()

public void Undo()

Events

CopyRequested

Raised after Copy or Cut submits text to Clipboard.

public event Action<LineEdit, string> CopyRequested

Event Type

Action<LineEdit, string>

TextChangeRejected

public event Action<LineEdit, string> TextChangeRejected

Event Type

Action<LineEdit, string>

TextChanged

public event Action<LineEdit, string> TextChanged

Event Type

Action<LineEdit, string>

TextSubmitted

public event EventHandler TextSubmitted

Event Type

EventHandler