ExperimentalTextComponent.TextLayout

Undocumented in source.
mixintemplate ExperimentalTextComponent()
static
class TextLayout {
BlockElement[] blocks;
Rectangle boundingBox_;
bool layoutInvalidated;
Color selectionXorColor;
int caretLastDrawnX;
int caretLastDrawnY1;
int caretLastDrawnY2;
bool caretShowingOnScreen;
bool contentEditable;
bool contentCaretable;
bool contentSelectable;
Caret caret;
Caret selectionStart;
Caret selectionEnd;
bool insertMode;
}

Members

Functions

changeAttributes
void changeAttributes()

Rich text editing api. These allow you to manipulate the meta data of the current element and add new elements. They will modify the current selection if there is one and will splice one in if needed.

findText
void findText(string text)

Text search api. They manipulate the selection and/or caret.

identify
TextIdentifyResult identify(int x, int y, bool exact)

exact = true means return null if no match. otherwise, get the closest one that makes sense for a mouse click.

insert
void insert(char[] text)
void insert(dchar ch)

Plain text editing api. These work at the current caret inside the selected inline element.

moveUp
void moveUp()

Caret movement api These should give the user a logical result based on what they see on screen... thus they locate predominately by *pixels* not char index. (These will generally coincide with monospace fonts tho!)

redoLayout
void redoLayout(ScreenPainter painter)

Call this if the inputs change. It will reflow everything

selectAll
void selectAll()

Selection API. See also: caret movement.

Meta