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
Properties
AccessibilityActions
public override AccessibilityActions AccessibilityActions { get; }
Property Value
AccessibilityName
public override string AccessibilityName { get; }
Property Value
AccessibilityRole
public override AccessibilityRole AccessibilityRole { get; }
Property Value
AccessibilityStates
public override AccessibilityStates AccessibilityStates { get; }
Property Value
AccessibilityValue
public override string AccessibilityValue { get; }
Property Value
CaretColumn
Zero-based caret index in the underlying string.
public int CaretColumn { get; protected set; }
Property Value
ClearButtonEnabled
public bool ClearButtonEnabled { get; set; }
Property Value
ClipboardTextProvider
public Func<LineEdit, string> ClipboardTextProvider { get; set; }
Property Value
ContextMenuEnabled
public bool ContextMenuEnabled { get; set; }
Property Value
DeselectOnFocusLoss
public bool DeselectOnFocusLoss { get; set; }
Property Value
DrawControlCharacters
public bool DrawControlCharacters { get; }
Property Value
Editable
public bool Editable { get; set; }
Property Value
Font
public SpriteFont Font { get; set; }
Property Value
- SpriteFont
HasImeComposition
public bool HasImeComposition { get; }
Property Value
HasRedo
public bool HasRedo { get; }
Property Value
HasSelection
public bool HasSelection { get; }
Property Value
HasUndo
public bool HasUndo { get; }
Property Value
ImeCompositionSelection
public Point ImeCompositionSelection { get; }
Property Value
- Point
ImeCompositionText
public string ImeCompositionText { get; }
Property Value
MaxLength
public int MaxLength { get; set; }
Property Value
Padding
public Thickness Padding { get; set; }
Property Value
PlaceholderText
public string PlaceholderText { get; set; }
Property Value
SecretCharacter
public string SecretCharacter { get; set; }
Property Value
SelectAllOnFocus
public bool SelectAllOnFocus { get; set; }
Property Value
SelectedText
public string SelectedText { get; }
Property Value
SelectingEnabled
public bool SelectingEnabled { get; set; }
Property Value
SelectionFrom
public int SelectionFrom { get; }
Property Value
SelectionTo
public int SelectionTo { get; }
Property Value
ShortcutKeysEnabled
public bool ShortcutKeysEnabled { get; set; }
Property Value
StructuredTextBidiOverride
public StructuredTextParser StructuredTextBidiOverride { get; }
Property Value
SubmitOnFocusExit
public bool SubmitOnFocusExit { get; set; }
Property Value
Text
public string Text { get; set; }
Property Value
TextDirection
public TextDirection TextDirection { get; }
Property Value
TextVerticalAlignment
public VerticalAlignment TextVerticalAlignment { get; set; }
Property Value
UIFont
public UIFont UIFont { get; set; }
Property Value
UndoEnabled
public bool UndoEnabled { get; set; }
Property Value
UndoStackMaxSize
public int UndoStackMaxSize { get; set; }
Property Value
Methods
CancelImeComposition()
public void CancelImeComposition()
Clear()
public void Clear()
ClearUndoHistory()
public void ClearUndoHistory()
CommitImeComposition(string)
public void CommitImeComposition(string text = null)
Parameters
textstring
Copy()
public void Copy()
Cut()
public void Cut()
DeleteSelection()
public void DeleteSelection()
DeleteText(int, int)
public void DeleteText(int fromColumn, int toColumn)
Parameters
Deselect()
public void Deselect()
GetCaretColumnAtPosition(Point)
protected virtual int GetCaretColumnAtPosition(Point position)
Parameters
positionPoint
Returns
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
GetDrawControlChars()
public bool GetDrawControlChars()
Returns
GetLanguage()
public string GetLanguage()
Returns
GetMenu()
Returns the retained context popup, equivalent to Godot's get_menu().
public virtual PopupMenu GetMenu()
Returns
GetMinimumSize()
public override Vector2 GetMinimumSize()
Returns
- Vector2
GetScrollOffset()
public float GetScrollOffset()
Returns
GetStructuredTextBidiOverride()
public StructuredTextParser GetStructuredTextBidiOverride()
Returns
GetStructuredTextBidiOverrideOptions()
public IReadOnlyList<object> GetStructuredTextBidiOverrideOptions()
Returns
GetTextDirection()
public TextDirection GetTextDirection()
Returns
GetTextDirectionMenu()
public PopupMenu GetTextDirectionMenu()
Returns
InsertText(string)
public virtual void InsertText(string text)
Parameters
textstring
IsContextMenuEnabled()
public bool IsContextMenuEnabled()
Returns
IsMenuVisible()
public virtual bool IsMenuVisible()
Returns
IsSelectAllOnFocus()
public bool IsSelectAllOnFocus()
Returns
IsSelectingEnabled()
public bool IsSelectingEnabled()
Returns
IsShortcutKeysEnabled()
public bool IsShortcutKeysEnabled()
Returns
MenuOption(LineEditMenuOption)
public void MenuOption(LineEditMenuOption option)
Parameters
optionLineEditMenuOption
OnTemplateApplied()
protected override void OnTemplateApplied()
Paste()
public void Paste()
Paste(string)
public void Paste(string clipboard)
Parameters
clipboardstring
Redo()
public void Redo()
Select(int, int)
public void Select(int from, int to)
Parameters
SelectAll()
public void SelectAll()
SetContextMenuEnabled(bool)
public void SetContextMenuEnabled(bool enabled)
Parameters
enabledbool
SetDrawControlChars(bool)
public void SetDrawControlChars(bool enabled)
Parameters
enabledbool
SetImeComposition(string, int, int)
public void SetImeComposition(string text, int selectionStart = 0, int selectionLength = 0)
Parameters
SetLanguage(string)
public void SetLanguage(string language)
Parameters
languagestring
SetSelectAllOnFocus(bool)
public void SetSelectAllOnFocus(bool enabled)
Parameters
enabledbool
SetSelectingEnabled(bool)
public void SetSelectingEnabled(bool enabled)
Parameters
enabledbool
SetShortcutKeysEnabled(bool)
public void SetShortcutKeysEnabled(bool enabled)
Parameters
enabledbool
SetStructuredTextBidiOverride(StructuredTextParser)
public void SetStructuredTextBidiOverride(StructuredTextParser parser)
Parameters
parserStructuredTextParser
SetStructuredTextBidiOverrideOptions(IEnumerable<object>)
public void SetStructuredTextBidiOverrideOptions(IEnumerable<object> options)
Parameters
optionsIEnumerable<object>
SetTextDirection(TextDirection)
public void SetTextDirection(TextDirection direction)
Parameters
directionTextDirection
Undo()
public void Undo()
Events
CopyRequested
Raised after Copy or Cut submits text to Clipboard.
public event Action<LineEdit, string> CopyRequested
Event Type
TextChangeRejected
public event Action<LineEdit, string> TextChangeRejected
Event Type
TextChanged
public event Action<LineEdit, string> TextChanged
Event Type
TextSubmitted
public event EventHandler TextSubmitted