Lines Matching refs:fParagraphIndex
128 const TextLine& cLine = fLines[cursor.fParagraphIndex]; in getLocation()
152 if (pos.fParagraphIndex < fLines.size()) { in insert()
153 fLines[pos.fParagraphIndex].fText.insert(pos.fTextByteIndex, utf8Text, byteLen); in insert()
154 this->markDirty(&fLines[pos.fParagraphIndex]); in insert()
156 SkASSERT(pos.fParagraphIndex == fLines.size()); in insert()
160 pos = Editor::TextPosition{pos.fTextByteIndex + byteLen, pos.fParagraphIndex}; in insert()
161 size_t newlinecount = count_char(fLines[pos.fParagraphIndex].fText, '\n'); in insert()
163 StringSlice src = std::move(fLines[pos.fParagraphIndex].fText); in insert()
164 std::vector<TextLine>::const_iterator next = fLines.begin() + pos.fParagraphIndex + 1; in insert()
166 TextLine* line = &fLines[pos.fParagraphIndex]; in insert()
180 if (start == end || start.fParagraphIndex == fLines.size()) { in remove()
184 if (start.fParagraphIndex == end.fParagraphIndex) { in remove()
186 fLines[start.fParagraphIndex].fText.remove( in remove()
188 this->markDirty(&fLines[start.fParagraphIndex]); in remove()
190 SkASSERT(end.fParagraphIndex < fLines.size()); in remove()
191 auto& line = fLines[start.fParagraphIndex]; in remove()
195 fLines[end.fParagraphIndex].fText.begin() + end.fTextByteIndex, in remove()
196 fLines[end.fParagraphIndex].fText.size() - end.fTextByteIndex); in remove()
198 fLines.erase(fLines.begin() + start.fParagraphIndex + 1, in remove()
199 fLines.begin() + end.fParagraphIndex + 1); in remove()
219 if (start == end || start.fParagraphIndex == fLines.size()) { in copy()
222 if (start.fParagraphIndex == end.fParagraphIndex) { in copy()
224 auto& str = fLines[start.fParagraphIndex].fText; in copy()
229 SkASSERT(end.fParagraphIndex < fLines.size()); in copy()
230 const std::vector<TextLine>::const_iterator firstP = fLines.begin() + start.fParagraphIndex; in copy()
231 const std::vector<TextLine>::const_iterator lastP = fLines.begin() + end.fParagraphIndex; in copy()
285 if (pos.fParagraphIndex >= fLines.size()) { in move()
286 pos.fParagraphIndex = fLines.size() - 1; in move()
287 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size(); in move()
289 pos.fTextByteIndex = align_column(fLines[pos.fParagraphIndex].fText, pos.fTextByteIndex); in move()
292 SkASSERT(pos.fParagraphIndex < fLines.size()); in move()
293 SkASSERT(pos.fTextByteIndex <= fLines[pos.fParagraphIndex].fText.size()); in move()
295 SkASSERT(pos.fTextByteIndex == fLines[pos.fParagraphIndex].fText.size() || in move()
296 !is_utf8_continuation(fLines[pos.fParagraphIndex].fText.begin()[pos.fTextByteIndex])); in move()
303 if (pos.fParagraphIndex > 0) { in move()
304 --pos.fParagraphIndex; in move()
305 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size(); in move()
308 const auto& str = fLines[pos.fParagraphIndex].fText; in move()
314 if (fLines[pos.fParagraphIndex].fText.size() == pos.fTextByteIndex) { in move()
315 if (pos.fParagraphIndex + 1 < fLines.size()) { in move()
316 ++pos.fParagraphIndex; in move()
320 const auto& str = fLines[pos.fParagraphIndex].fText; in move()
327 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets; in move()
334 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets; in move()
339 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size(); in move()
345 SkASSERT(pos.fTextByteIndex < fLines[pos.fParagraphIndex].fCursorPos.size()); in move()
346 float x = fLines[pos.fParagraphIndex].fCursorPos[pos.fTextByteIndex].left(); in move()
347 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets; in move()
352 pos.fTextByteIndex = find_closest_x(fLines[pos.fParagraphIndex].fCursorPos, x, in move()
355 } else if (pos.fParagraphIndex > 0) { in move()
356 --pos.fParagraphIndex; in move()
357 const auto& newLine = fLines[pos.fParagraphIndex]; in move()
369 align_column(fLines[pos.fParagraphIndex].fText, pos.fTextByteIndex); in move()
374 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets; in move()
375 float x = fLines[pos.fParagraphIndex].fCursorPos[pos.fTextByteIndex].left(); in move()
379 const auto& bounds = fLines[pos.fParagraphIndex].fCursorPos; in move()
383 } else if (pos.fParagraphIndex + 1 < fLines.size()) { in move()
384 ++pos.fParagraphIndex; in move()
385 const auto& bounds = fLines[pos.fParagraphIndex].fCursorPos; in move()
386 const std::vector<size_t>& l2 = fLines[pos.fParagraphIndex].fLineEndOffsets; in move()
390 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size(); in move()
393 align_column(fLines[pos.fParagraphIndex].fText, pos.fTextByteIndex); in move()
402 const std::vector<bool>& words = fLines[pos.fParagraphIndex].fWordBoundaries; in move()
403 SkASSERT(words.size() == fLines[pos.fParagraphIndex].fText.size()); in move()
411 const StringSlice& text = fLines[pos.fParagraphIndex].fText; in move()
416 const std::vector<bool>& words = fLines[pos.fParagraphIndex].fWordBoundaries; in move()
443 SkASSERT(pos.fParagraphIndex < fLines.size()); in paint()
444 const TextLine& l = fLines[pos.fParagraphIndex]; in paint()