Table of Contents

Class TextInputMethodClient

Namespace
Avalonia.Input.TextInput
Assembly
Avalonia.Base.dll
public abstract class TextInputMethodClient
Inheritance
TextInputMethodClient
Inherited Members

Constructors

TextInputMethodClient()

protected TextInputMethodClient()

Properties

CursorRectangle

Gets the cursor rectangle relative to the TextViewVisual

public abstract Rect CursorRectangle { get; }

Property Value

Rect

Selection

Gets or sets the curent selection range within current surrounding text.

public abstract TextSelection Selection { get; set; }

Property Value

TextSelection

SupportsPreedit

Indicates if TextViewVisual is capable of displaying non-committed input on the cursor position

public abstract bool SupportsPreedit { get; }

Property Value

bool

SupportsSurroundingText

Indicates if text input client is capable of providing the text around the cursor

public abstract bool SupportsSurroundingText { get; }

Property Value

bool

SurroundingText

Returns the text around the cursor, usually the current paragraph

public abstract string SurroundingText { get; }

Property Value

string

TextViewVisual

The visual that's showing the text

public abstract Visual TextViewVisual { get; }

Property Value

Visual

Methods

ExecuteContextMenuAction(ContextMenuAction)

Execute specific context menu actions

public virtual void ExecuteContextMenuAction(ContextMenuAction action)

Parameters

action ContextMenuAction

The ContextMenuAction to perform

RaiseCursorRectangleChanged()

protected virtual void RaiseCursorRectangleChanged()

RaiseSelectionChanged()

protected virtual void RaiseSelectionChanged()

RaiseSurroundingTextChanged()

protected virtual void RaiseSurroundingTextChanged()

RaiseTextViewVisualChanged()

protected virtual void RaiseTextViewVisualChanged()

RequestReset()

protected virtual void RequestReset()

SetPreeditText(string?)

Sets the non-committed input string

public virtual void SetPreeditText(string? preeditText)

Parameters

preeditText string

SetPreeditText(string?, int?)

Sets the non-committed input string and cursor offset in that string

public virtual void SetPreeditText(string? preeditText, int? cursorPos)

Parameters

preeditText string
cursorPos int?

ShowInputPanel()

public virtual void ShowInputPanel()

Events

CursorRectangleChanged

Fires when the cursor rectangle has changed

public event EventHandler? CursorRectangleChanged

Event Type

EventHandler

ResetRequested

Fires when client wants to reset IME state

public event EventHandler? ResetRequested

Event Type

EventHandler

SelectionChanged

Fires when the selection has changed

public event EventHandler? SelectionChanged

Event Type

EventHandler

SurroundingTextChanged

Fires when the surrounding text has changed

public event EventHandler? SurroundingTextChanged

Event Type

EventHandler

TextViewVisualChanged

Fires when the text view visual has changed

public event EventHandler? TextViewVisualChanged

Event Type

EventHandler