• Home
  • Raw
  • Download

Lines Matching refs:Editor

47 void Editor::markDirty(TextLine* line) {  in markDirty()
53 void Editor::setFont(SkFont font) { in setFont()
61 void Editor::setWidth(int w) { in setWidth()
70 Editor::TextPosition Editor::getPosition(SkIPoint xy) { in getPosition()
71 Editor::TextPosition approximatePosition; in getPosition()
91 return Editor::TextPosition{i, j}; in getPosition()
124 SkRect Editor::getLocation(Editor::TextPosition cursor) { in getLocation()
126 cursor = this->move(Editor::Movement::kNowhere, cursor); in getLocation()
146 Editor::TextPosition Editor::insert(TextPosition pos, const char* utf8Text, size_t byteLen) { in insert()
150 pos = this->move(Editor::Movement::kNowhere, pos); in insert()
158 fLines.push_back(Editor::TextLine(StringSlice(utf8Text, byteLen))); in insert()
160 pos = Editor::TextPosition{pos.fTextByteIndex + byteLen, pos.fParagraphIndex}; in insert()
174 Editor::TextPosition Editor::remove(TextPosition pos1, TextPosition pos2) { in remove()
175 pos1 = this->move(Editor::Movement::kNowhere, pos1); in remove()
176 pos2 = this->move(Editor::Movement::kNowhere, pos2); in remove()
177 auto cmp = [](const Editor::TextPosition& u, const Editor::TextPosition& v) { return u < v; }; in remove()
178 Editor::TextPosition start = std::min(pos1, pos2, cmp); in remove()
179 Editor::TextPosition end = std::max(pos1, pos2, cmp); in remove()
212 size_t Editor::copy(TextPosition pos1, TextPosition pos2, char* dst) const { in copy()
214 pos1 = this->move(Editor::Movement::kNowhere, pos1); in copy()
215 pos2 = this->move(Editor::Movement::kNowhere, pos2); in copy()
216 auto cmp = [](const Editor::TextPosition& u, const Editor::TextPosition& v) { return u < v; }; in copy()
217 Editor::TextPosition start = std::min(pos1, pos2, cmp); in copy()
218 Editor::TextPosition end = std::max(pos1, pos2, cmp); in copy()
280 Editor::TextPosition Editor::move(Editor::Movement move, Editor::TextPosition pos) const { in move()
299 case Editor::Movement::kNowhere: in move()
301 case Editor::Movement::kLeft: in move()
313 case Editor::Movement::kRight: in move()
325 case Editor::Movement::kHome: in move()
332 case Editor::Movement::kEnd: in move()
343 case Editor::Movement::kUp: in move()
372 case Editor::Movement::kDown: in move()
396 case Editor::Movement::kWordLeft: in move()
399 pos = this->move(Editor::Movement::kLeft, pos); in move()
409 case Editor::Movement::kWordRight: in move()
413 pos = this->move(Editor::Movement::kRight, pos); in move()
428 void Editor::paint(SkCanvas* c, PaintOpts options) { in paint()
437 auto cmp = [](const Editor::TextPosition& u, const Editor::TextPosition& v) { return u < v; }; in paint()
441 pos = this->move(Editor::Movement::kRight, pos)) in paint()
449 c->drawRect(Editor::getLocation(options.fCursor), SkPaint(options.fCursorColor)); in paint()
460 void Editor::reshapeAll() { in reshapeAll()