1 write to _lineMetrics
PresentationFramework (1)
src\Framework\MS\Internal\Documents\TextBoxView.cs (1)
420
_lineMetrics
= new List<LineRecord>(1);
122 references to _lineMetrics
PresentationFramework (122)
src\Framework\MS\Internal\Documents\TextBoxView.cs (122)
418
if (
_lineMetrics
== null)
444
if (
_lineMetrics
.Count == 0 || constraintschanged)
459
_lineMetrics
.Count == 1 &&
_lineMetrics
[0].EndOffset == 0)
461
_lineMetrics
.Clear();
476
_lineMetrics
.Clear();
485
Invariant.Assert(
_lineMetrics
.Count >= 1);
516
if (
_lineMetrics
== null ||
_lineMetrics
.Count == 0)
701
int startOffset = Math.Min(
_lineMetrics
[
_lineMetrics
.Count-1].EndOffset, startPosition.Offset);
702
int endOffset = Math.Min(
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset, endPosition.Offset);
720
bool firstLinePartiallyCovered =
_lineMetrics
[firstLineIndex].Offset < startOffset ||
721
_lineMetrics
[firstLineIndex].EndOffset > endOffset;
722
bool lastLinePartiallyCovered =
_lineMetrics
[lastLineIndex].Offset < startOffset ||
723
_lineMetrics
[lastLineIndex].EndOffset > endOffset;
745
double contentOffset = GetContentOffset(
_lineMetrics
[lineIndex].Width, alignment);
746
Rect rect = new Rect(contentOffset, lineIndex * _lineHeight,
_lineMetrics
[lineIndex].Width, _lineHeight);
749
ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex].EndOffset, LogicalDirection.Backward);
779
int nextLineIndex = Math.Max(0, Math.Min(
_lineMetrics
.Count - 1, lineIndex + count));
789
nextLinePosition = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex + linesMoved].Offset, LogicalDirection.Forward);
835
if (position.Offset >
_lineMetrics
[lineIndex].Offset)
894
if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength ==
_lineMetrics
[lineIndex].EndOffset &&
898
if (lineIndex ==
_lineMetrics
.Count - 1)
908
else if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength ==
_lineMetrics
[lineIndex].Offset &&
957
if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength ==
_lineMetrics
[lineIndex].Offset)
990
ITextPointer start = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex].Offset, LogicalDirection.Forward);
991
ITextPointer end = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex].Offset +
_lineMetrics
[lineIndex].ContentLength, LogicalDirection.Forward);
1111
int lastValidOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
1123
int newLastValidOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
1160
if (
_lineMetrics
!= null)
1162
_lineMetrics
.Clear();
1184
int max =
_lineMetrics
.Count;
1186
Invariant.Assert(
_lineMetrics
.Count >= 1);
1193
LineRecord record =
_lineMetrics
[index];
1205
if (offset == record.EndOffset && index <
_lineMetrics
.Count - 1)
1307
if (
_lineMetrics
!= null)
1309
ITextPointer start = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[0].Offset, LogicalDirection.Backward);
1310
ITextPointer end = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[
_lineMetrics
.Count-1].EndOffset, LogicalDirection.Forward);
1537
if(
_lineMetrics
.Count == 0)
1578
LineRecord metrics =
_lineMetrics
[lineIndex];
1646
Invariant.Assert(
_lineMetrics
.Count >= 1);
1654
if (point.Y >= _lineHeight *
_lineMetrics
.Count)
1656
return snapToText ?
_lineMetrics
.Count-1 : -1;
1663
int max =
_lineMetrics
.Count;
1668
LineRecord record =
_lineMetrics
[index];
1732
LineRecord metrics =
_lineMetrics
[lineIndex];
1885
LineRecord metrics =
_lineMetrics
[lineIndex];
2045
int startOffset = Math.Max(
_lineMetrics
[lineIndex].Offset, unclippedStartOffset);
2046
int endOffset = Math.Min(
_lineMetrics
[lineIndex].EndOffset, unclippedEndOffset);
2053
if (unclippedStartOffset ==
_lineMetrics
[lineIndex].EndOffset)
2079
Invariant.Assert(endOffset ==
_lineMetrics
[lineIndex].Offset ||
2080
endOffset ==
_lineMetrics
[lineIndex].Offset +
_lineMetrics
[lineIndex].ContentLength);
2098
if (unclippedEndOffset >=
_lineMetrics
[lineIndex].EndOffset)
2104
double contentOffset = GetContentOffset(
_lineMetrics
[lineIndex].Width, alignment);
2105
Rect rect = new Rect(contentOffset +
_lineMetrics
[lineIndex].Width, lineIndex * _lineHeight, endOfParaGlyphWidth, _lineHeight);
2131
int lineStartOffset =
_lineMetrics
[lineIndex].Offset;
2132
int lineEndOffset =
_lineMetrics
[lineIndex].EndOffset;
2149
if (unclippedStartOffset ==
_lineMetrics
[lineIndex].EndOffset)
2161
Invariant.Assert(endOffset ==
_lineMetrics
[lineIndex].Offset ||
2162
endOffset ==
_lineMetrics
[lineIndex].Offset +
_lineMetrics
[lineIndex].ContentLength);
2177
if (unclippedEndOffset >=
_lineMetrics
[lineIndex].EndOffset)
2183
double contentOffset = GetContentOffset(
_lineMetrics
[lineIndex].Width, alignment);
2184
Rect rect = new Rect(contentOffset +
_lineMetrics
[lineIndex].Width, 0, endOfParaGlyphWidth, _lineHeight);
2204
firstLineIndex = Math.Max(0, Math.Min(firstLineIndex,
_lineMetrics
.Count - 1));
2205
lastLineIndex = Math.Max(0, Math.Min(lastLineIndex,
_lineMetrics
.Count - 1));
2211
lastLineIndex =
_lineMetrics
.Count - 1;
2231
if (
_lineMetrics
.Count == 0)
2239
lineOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
2273
_lineMetrics
.Add(new LineRecord(lineOffset, line));
2329
if (range.StartIndex >
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset)
2349
if (range.StartIndex >
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset)
2388
for (int i = lineIndex + 1; i <
_lineMetrics
.Count; i++)
2390
_lineMetrics
[i].Offset += delta;
2407
lineOffset =
_lineMetrics
[lineIndex].Offset;
2420
_lineMetrics
[lineIndex] = new LineRecord(lineOffset, line);
2447
if (endOffset >
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset)
2450
endOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
2462
for (int i = lastLineIndex + 1; i <
_lineMetrics
.Count; i++)
2464
_lineMetrics
[i].Offset += delta;
2481
lineOffset =
_lineMetrics
[lineIndex].Offset;
2491
(range.StartIndex > lineOffset || range.StartIndex + -delta <
_lineMetrics
[lineIndex].EndOffset))
2498
_lineMetrics
[lineIndex] = new LineRecord(lineOffset, line);
2509
_lineMetrics
.RemoveRange(lineIndex, lastLineIndex - lineIndex + 1);
2524
int originalEndOffset =
_lineMetrics
[lineIndex].EndOffset;
2525
lineOffset =
_lineMetrics
[lineIndex].Offset;
2531
_lineMetrics
[lineIndex] = new LineRecord(lineOffset, line);
2538
if (originalEndOffset !=
_lineMetrics
[lineIndex].EndOffset)
2555
(lineIndex ==
_lineMetrics
.Count ||
2557
lineOffset !=
_lineMetrics
[lineIndex].Offset))
2559
if (lineIndex <
_lineMetrics
.Count &&
2560
lineOffset >=
_lineMetrics
[lineIndex].EndOffset)
2567
_lineMetrics
.RemoveAt(lineIndex); //
2578
if (lineIndex ==
_lineMetrics
.Count ||
2579
lineOffset + line.Length <=
_lineMetrics
[lineIndex].Offset)
2584
_lineMetrics
.Insert(lineIndex, record);
2593
Invariant.Assert(lineOffset <
_lineMetrics
[lineIndex].EndOffset);
2595
var curLine =
_lineMetrics
[lineIndex];
2614
_lineMetrics
[lineIndex] = record;
2631
if (endOfParagraph && lineIndex <
_lineMetrics
.Count)
2633
int count =
_lineMetrics
.Count - lineIndex;
2634
_lineMetrics
.RemoveRange(lineIndex, count);
2645
for (int i = 0; i <
_lineMetrics
.Count; i++)
2647
desiredSize.Width = Math.Max(desiredSize.Width,
_lineMetrics
[i].Width);
2649
desiredSize.Height =
_lineMetrics
.Count * _lineHeight;
2903
_lineMetrics
!= null &&
2904
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset >= position.Offset;
2964
int viewportStart =
_lineMetrics
[firstLineIndex].Offset;
2965
int viewportEnd =
_lineMetrics
[lastLineIndex].EndOffset;