Searched refs:TextPosition (Results 1 – 3 of 3) sorted by relevance
/external/skia/modules/skplaintexteditor/include/ |
D | editor.h | 58 struct TextPosition { struct 73 TextPosition move(Editor::Movement move, Editor::TextPosition pos) const; argument 74 TextPosition getPosition(SkIPoint); 75 SkRect getLocation(TextPosition); 77 TextPosition insert(TextPosition, const char* utf8Text, size_t byteLen); 79 TextPosition remove(TextPosition, TextPosition); 83 size_t copy(TextPosition pos1, TextPosition pos2, char* dst = nullptr) const; 95 TextPosition fSelectionBegin; 96 TextPosition fSelectionEnd; 97 TextPosition fCursor; [all …]
|
/external/skia/modules/skplaintexteditor/src/ |
D | editor.cpp | 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() 146 Editor::TextPosition Editor::insert(TextPosition pos, const char* utf8Text, size_t 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() 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() [all …]
|
/external/skia/modules/skplaintexteditor/app/ |
D | editor_application.cpp | 95 Editor::TextPosition fTextPos{0, 0}; 96 Editor::TextPosition fMarkPos; 116 fEditor.insert(Editor::TextPosition{0, 0}, in loadFile() 133 if (fMarkPos != Editor::TextPosition()) { in onPaint() 229 if (fMarkPos != Editor::TextPosition()) { in onChar() 236 if (fMarkPos != Editor::TextPosition()) { in onChar() 278 bool move(Editor::TextPosition pos, bool shift) { in move() 279 if (pos == fTextPos || pos == Editor::TextPosition()) { in move() 281 fMarkPos = Editor::TextPosition(); in move() 286 fMarkPos = shift ? fTextPos : Editor::TextPosition(); in move() [all …]
|