Flutter Engine
The Flutter Engine
|
Classes | |
interface | EditingStateWatcher |
Public Member Functions | |
ListenableEditingState ( @Nullable TextInputChannel.TextEditState initialState, @NonNull View view) | |
ArrayList< TextEditingDelta > | extractBatchTextEditingDeltas () |
void | clearBatchDeltas () |
void | beginBatchEdit () |
void | endBatchEdit () |
void | setComposingRange (int composingStart, int composingEnd) |
void | setEditingState (TextInputChannel.TextEditState newState) |
void | addEditingStateListener (EditingStateWatcher listener) |
void | removeEditingStateListener (EditingStateWatcher listener) |
SpannableStringBuilder | replace (int start, int end, CharSequence tb, int tbstart, int tbend) |
final int | getSelectionStart () |
final int | getSelectionEnd () |
final int | getComposingStart () |
final int | getComposingEnd () |
void | setSpan (Object what, int start, int end, int flags) |
String | toString () |
The current editing state (text, selection range, composing range) the text input plugin holds.
As the name implies, this class also notifies its listeners when the editing state changes. When there're ongoing batch edits, change notifications will be deferred until all batch edits end (i.e. when the outermost batch edit ends). Listeners added during a batch edit will always be notified when all batch edits end, even if there's no real change.
Adding/removing listeners or changing the editing state in a didChangeEditingState callback may cause unexpected behavior.
Definition at line 30 of file ListenableEditingState.java.
|
inline |
Definition at line 60 of file ListenableEditingState.java.
|
inline |
Definition at line 171 of file ListenableEditingState.java.
|
inline |
Starts a new batch edit during which change notifications will be put on hold until all batch edits end.
Batch edits nest.
Definition at line 93 of file ListenableEditingState.java.
|
inline |
Definition at line 85 of file ListenableEditingState.java.
|
inline |
Ends the current batch edit and flush pending change notifications if the current batch edit is not nested (i.e. it is the last ongoing batch edit).
Definition at line 109 of file ListenableEditingState.java.
|
inline |
Definition at line 78 of file ListenableEditingState.java.
|
inline |
Definition at line 274 of file ListenableEditingState.java.
|
inline |
Definition at line 270 of file ListenableEditingState.java.
|
inline |
Definition at line 266 of file ListenableEditingState.java.
|
inline |
Definition at line 262 of file ListenableEditingState.java.
|
inline |
Definition at line 186 of file ListenableEditingState.java.
|
inline |
Definition at line 197 of file ListenableEditingState.java.
|
inline |
Update the composing region of the current editing state.
If the range is invalid or empty, the current composing region will be removed.
Definition at line 141 of file ListenableEditingState.java.
|
inline |
Called when the framework sends updates to the text input plugin.
This method will also update the composing region if it has changed.
Definition at line 152 of file ListenableEditingState.java.
|
inline |
Definition at line 279 of file ListenableEditingState.java.
|
inline |
Definition at line 293 of file ListenableEditingState.java.