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