44 std::vector<TextLine>::const_iterator
fPtr;
60 int lineHeight(
size_t index)
const {
return fLines[index].fHeight; }
90 return i < fLines.size() ? fLines[
i].fText.view() :
StringView{
nullptr, 0};
110 std::vector<SkRect> fCursorPos;
111 std::vector<size_t> fLineEndOffsets;
112 std::vector<bool> fWordBoundaries;
115 bool fShaped =
false;
120 std::vector<TextLine> fLines;
125 bool fNeedsReshape =
false;
126 const char* fLocale =
"en";
128 void markDirty(TextLine*);
void paint(SkCanvas *canvas, PaintOpts)
SkRect getLocation(TextPosition)
void setFont(SkFont font)
int lineHeight(size_t index) const
StringView line(size_t i) const
size_t copy(TextPosition pos1, TextPosition pos2, char *dst=nullptr) const
void setFontMgr(sk_sp< SkFontMgr > fontMgr)
TextPosition move(Editor::Movement move, Editor::TextPosition pos) const
TextPosition insert(TextPosition, const char *utf8Text, size_t byteLen)
TextPosition getPosition(SkIPoint)
TextPosition remove(TextPosition, TextPosition)
const SkFont & font() const
static bool operator!=(const SkPlainTextEditor::Editor::TextPosition &u, const SkPlainTextEditor::Editor::TextPosition &v)
static bool operator<(const SkPlainTextEditor::Editor::TextPosition &u, const SkPlainTextEditor::Editor::TextPosition &v)
static bool operator==(const SkPlainTextEditor::Editor::TextPosition &u, const SkPlainTextEditor::Editor::TextPosition &v)
sk_sp< SkFontMgr > fontMgr
SkColor4f fSelectionColor
TextPosition fSelectionEnd
SkColor4f fBackgroundColor
TextPosition fSelectionBegin
SkColor4f fForegroundColor
bool operator!=(const Iterator &other) const
std::vector< TextLine >::const_iterator fPtr
const std::vector< TextLine > & fLines