1 write to _lineMetrics
PresentationFramework (1)
MS\Internal\Documents\TextBoxView.cs (1)
418
_lineMetrics
= new List<LineRecord>(1);
122 references to _lineMetrics
PresentationFramework (122)
MS\Internal\Documents\TextBoxView.cs (122)
416
if (
_lineMetrics
== null)
442
if (
_lineMetrics
.Count == 0 || constraintschanged)
457
_lineMetrics
.Count == 1 &&
_lineMetrics
[0].EndOffset == 0)
459
_lineMetrics
.Clear();
475
_lineMetrics
.Clear();
484
Invariant.Assert(
_lineMetrics
.Count >= 1);
515
if (
_lineMetrics
== null ||
_lineMetrics
.Count == 0)
697
int startOffset = Math.Min(
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset, startPosition.Offset);
698
int endOffset = Math.Min(
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset, endPosition.Offset);
716
bool firstLinePartiallyCovered =
_lineMetrics
[firstLineIndex].Offset < startOffset ||
717
_lineMetrics
[firstLineIndex].EndOffset > endOffset;
718
bool lastLinePartiallyCovered =
_lineMetrics
[lastLineIndex].Offset < startOffset ||
719
_lineMetrics
[lastLineIndex].EndOffset > endOffset;
741
double contentOffset = GetContentOffset(
_lineMetrics
[lineIndex].Width, alignment);
742
Rect rect = new Rect(contentOffset, lineIndex * _lineHeight,
_lineMetrics
[lineIndex].Width, _lineHeight);
745
ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex].EndOffset, LogicalDirection.Backward);
775
int nextLineIndex = Math.Max(0, Math.Min(
_lineMetrics
.Count - 1, lineIndex + count));
785
nextLinePosition = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex + linesMoved].Offset, LogicalDirection.Forward);
831
if (position.Offset >
_lineMetrics
[lineIndex].Offset)
890
if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength ==
_lineMetrics
[lineIndex].EndOffset &&
894
if (lineIndex ==
_lineMetrics
.Count - 1)
904
else if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength ==
_lineMetrics
[lineIndex].Offset &&
953
if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength ==
_lineMetrics
[lineIndex].Offset)
986
ITextPointer start = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex].Offset, LogicalDirection.Forward);
987
ITextPointer end = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[lineIndex].Offset +
_lineMetrics
[lineIndex].ContentLength, LogicalDirection.Forward);
1107
int lastValidOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
1119
int newLastValidOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
1156
if (
_lineMetrics
!= null)
1158
_lineMetrics
.Clear();
1180
int max =
_lineMetrics
.Count;
1182
Invariant.Assert(
_lineMetrics
.Count >= 1);
1189
LineRecord record =
_lineMetrics
[index];
1201
if (offset == record.EndOffset && index <
_lineMetrics
.Count - 1)
1305
if (
_lineMetrics
!= null)
1307
ITextPointer start = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[0].Offset, LogicalDirection.Backward);
1308
ITextPointer end = _host.TextContainer.CreatePointerAtOffset(
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset, LogicalDirection.Forward);
1536
if (
_lineMetrics
.Count == 0)
1577
LineRecord metrics =
_lineMetrics
[lineIndex];
1645
Invariant.Assert(
_lineMetrics
.Count >= 1);
1653
if (point.Y >= _lineHeight *
_lineMetrics
.Count)
1655
return snapToText ?
_lineMetrics
.Count - 1 : -1;
1662
int max =
_lineMetrics
.Count;
1667
LineRecord record =
_lineMetrics
[index];
1734
LineRecord metrics =
_lineMetrics
[lineIndex];
1887
LineRecord metrics =
_lineMetrics
[lineIndex];
2049
int startOffset = Math.Max(
_lineMetrics
[lineIndex].Offset, unclippedStartOffset);
2050
int endOffset = Math.Min(
_lineMetrics
[lineIndex].EndOffset, unclippedEndOffset);
2057
if (unclippedStartOffset ==
_lineMetrics
[lineIndex].EndOffset)
2083
Invariant.Assert(endOffset ==
_lineMetrics
[lineIndex].Offset ||
2084
endOffset ==
_lineMetrics
[lineIndex].Offset +
_lineMetrics
[lineIndex].ContentLength);
2102
if (unclippedEndOffset >=
_lineMetrics
[lineIndex].EndOffset)
2108
double contentOffset = GetContentOffset(
_lineMetrics
[lineIndex].Width, alignment);
2109
Rect rect = new Rect(contentOffset +
_lineMetrics
[lineIndex].Width, lineIndex * _lineHeight, endOfParaGlyphWidth, _lineHeight);
2135
int lineStartOffset =
_lineMetrics
[lineIndex].Offset;
2136
int lineEndOffset =
_lineMetrics
[lineIndex].EndOffset;
2153
if (unclippedStartOffset ==
_lineMetrics
[lineIndex].EndOffset)
2165
Invariant.Assert(endOffset ==
_lineMetrics
[lineIndex].Offset ||
2166
endOffset ==
_lineMetrics
[lineIndex].Offset +
_lineMetrics
[lineIndex].ContentLength);
2181
if (unclippedEndOffset >=
_lineMetrics
[lineIndex].EndOffset)
2187
double contentOffset = GetContentOffset(
_lineMetrics
[lineIndex].Width, alignment);
2188
Rect rect = new Rect(contentOffset +
_lineMetrics
[lineIndex].Width, 0, endOfParaGlyphWidth, _lineHeight);
2208
firstLineIndex = Math.Max(0, Math.Min(firstLineIndex,
_lineMetrics
.Count - 1));
2209
lastLineIndex = Math.Max(0, Math.Min(lastLineIndex,
_lineMetrics
.Count - 1));
2215
lastLineIndex =
_lineMetrics
.Count - 1;
2235
if (
_lineMetrics
.Count == 0)
2243
lineOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
2277
_lineMetrics
.Add(new LineRecord(lineOffset, line));
2333
if (range.StartIndex >
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset)
2353
if (range.StartIndex >
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset)
2392
for (int i = lineIndex + 1; i <
_lineMetrics
.Count; i++)
2394
_lineMetrics
[i].Offset += delta;
2411
lineOffset =
_lineMetrics
[lineIndex].Offset;
2424
_lineMetrics
[lineIndex] = new LineRecord(lineOffset, line);
2451
if (endOffset >
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset)
2454
endOffset =
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset;
2466
for (int i = lastLineIndex + 1; i <
_lineMetrics
.Count; i++)
2468
_lineMetrics
[i].Offset += delta;
2485
lineOffset =
_lineMetrics
[lineIndex].Offset;
2495
(range.StartIndex > lineOffset || range.StartIndex + -delta <
_lineMetrics
[lineIndex].EndOffset))
2502
_lineMetrics
[lineIndex] = new LineRecord(lineOffset, line);
2513
_lineMetrics
.RemoveRange(lineIndex, lastLineIndex - lineIndex + 1);
2528
int originalEndOffset =
_lineMetrics
[lineIndex].EndOffset;
2529
lineOffset =
_lineMetrics
[lineIndex].Offset;
2535
_lineMetrics
[lineIndex] = new LineRecord(lineOffset, line);
2542
if (originalEndOffset !=
_lineMetrics
[lineIndex].EndOffset)
2559
(lineIndex ==
_lineMetrics
.Count ||
2561
lineOffset !=
_lineMetrics
[lineIndex].Offset))
2563
if (lineIndex <
_lineMetrics
.Count &&
2564
lineOffset >=
_lineMetrics
[lineIndex].EndOffset)
2571
_lineMetrics
.RemoveAt(lineIndex); // does not scale!
2582
if (lineIndex ==
_lineMetrics
.Count ||
2583
lineOffset + line.Length <=
_lineMetrics
[lineIndex].Offset)
2588
_lineMetrics
.Insert(lineIndex, record);
2597
Invariant.Assert(lineOffset <
_lineMetrics
[lineIndex].EndOffset);
2599
var curLine =
_lineMetrics
[lineIndex];
2618
_lineMetrics
[lineIndex] = record;
2635
if (endOfParagraph && lineIndex <
_lineMetrics
.Count)
2637
int count =
_lineMetrics
.Count - lineIndex;
2638
_lineMetrics
.RemoveRange(lineIndex, count);
2649
for (int i = 0; i <
_lineMetrics
.Count; i++)
2651
desiredSize.Width = Math.Max(desiredSize.Width,
_lineMetrics
[i].Width);
2653
desiredSize.Height =
_lineMetrics
.Count * _lineHeight;
2925
_lineMetrics
!= null &&
2926
_lineMetrics
[
_lineMetrics
.Count - 1].EndOffset >= position.Offset;
2987
int viewportStart =
_lineMetrics
[firstLineIndex].Offset;
2988
int viewportEnd =
_lineMetrics
[lastLineIndex].EndOffset;