EditCommand

Known direct subclasses
BackspaceCommand

Represents a backspace operation at the cursor position.

CommitTextCommand

Commit final text to the text box and set the new cursor position.

DeleteAllCommand

Deletes all the text in the buffer.

DeleteSurroundingTextCommand

Delete lengthBeforeCursor characters of text before the current cursor position, and delete lengthAfterCursor characters of text after the current cursor position, excluding the selection.

DeleteSurroundingTextInCodePointsCommand

A variant of DeleteSurroundingTextCommand.

FinishComposingTextCommand

Finishes the composing text that is currently active.

MoveCursorCommand

Moves the cursor with amount characters.

SetComposingRegionCommand

Mark a certain region of text as composing text.

SetComposingTextCommand

Replace the currently composing text with the given text, and set the new cursor position.

SetSelectionCommand

Sets the selection on the text.


EditCommand is a command representation for the platform IME API function calls. The commands from the IME as function calls are translated into command pattern and used by TextInputService.startInput. For example, as a result of commit text function call by IME CommitTextCommand is created.

Summary

Public functions

Unit

Apply the command on the editing buffer.

Cmn

Public functions

applyTo

fun applyTo(buffer: EditingBuffer): Unit

Apply the command on the editing buffer.