Finds the given text, setting the given selection to it, if found.
Appends text at the end, without disturbing user selection.
The layouter maintains a flag to tell if the content has been changed.
Finds the given text, setting the given selection to it, if found.
Gets the text that you need to draw, guaranteeing each call to your delegate will:
Calls your delegate for each segment of the text, guaranteeing you will be called exactly once for each non-nil char in the string and each slice will have exactly one style. A segment may be as small as a single char.
Gets the current text value as a plain-text string.
The rendered size of the text.
This should be called (internally, end users don't need to see it) any time the text or style has changed.
Can override this to define if a char is a word splitter for word wrapping.
Not implemented.
Selections have two parts: an anchor (typically set to where the user clicked the mouse down) and a focus (typically where the user released the mouse button). As you click and drag, you want to change the focus while keeping the anchor the same.
Registers a text style you can use in text segments.
This should be called (internally, end users don't need to see it) any time you're going to return something to the user that is dependent on the layout.
The editor's internal state can be saved and restored as an opaque blob. You might use this to make undo checkpoints and similar.
The editor's internal state can be saved and restored as an opaque blob. You might use this to make undo checkpoints and similar.
Gets the object representing the given selection.
Returns a bitmask of the selections active at any given offset.
The layouter maintains a flag to tell if the content has been changed.
The rendered size of the text.
Set to 0 to disable word wrapping.
Represents a possible registered style for a segment of text.