TextInput.HistoryEntry

Undocumented in source.

Members

Functions

canMergeWith
bool canMergeWith(Rope nextValue)
bool canMergeWith(HistoryEntry nextEntry)

Check if this entry can be merged with (newer) entry given its text content. This is used to combine runs of similar actions together, for example when typing a word, the whole word will form a single entry, instead of creating separate entries per character.

setPreviousEntry
void setPreviousEntry(HistoryEntry entry)
void setPreviousEntry(Rope previousValue)

Set isAdditive and isSubtractive based on the given text representing the last input.

Variables

diff
Rope.DiffRegion diff;

Change made by this entry.

isAdditive
bool isAdditive;

A history entry is "additive" if it adds any new content to the input. An entry is "subtractive" if it removes any part of the input. An entry that replaces content is simultaneously additive and subtractive.

isContinuous
bool isContinuous;

If true, the entry results from an action that was executed immediately after the last action, without changing caret position in the meantime.

isSubtractive
bool isSubtractive;

A history entry is "additive" if it adds any new content to the input. An entry is "subtractive" if it removes any part of the input. An entry that replaces content is simultaneously additive and subtractive.

selectionEnd
size_t selectionEnd;
Undocumented in source.
selectionStart
size_t selectionStart;
Undocumented in source.
value
Rope value;
Undocumented in source.

Meta