73 instantiations of TextPointer
PresentationFramework (73)
MS\Internal\Documents\HostedElements.cs (2)
73_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 118_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer);
MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
121TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 152TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 153TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\PtsHost\FlowDocumentPage.cs (4)
324TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 930elementPosition = new TextPointer((e as TextElement).ElementStart); 944TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 957elementPosition = new TextPointer(searchPosition);
MS\Internal\Text\ComplexLine.cs (1)
279position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward);
System\Windows\Controls\AccessText.cs (5)
574TextPointer navigator = new TextPointer(TextContainer.Start); 604TextPointer underlineStart = new TextPointer(navigator, index); 621navigator = new TextPointer(TextContainer.Start); 634TextPointer keyStart = new TextPointer(navigator, 0); 635TextPointer keyEnd = new TextPointer(navigator, text.Length);
System\Windows\Controls\TextBlock.cs (5)
401position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 1754end = new TextPointer(((TextElement)child).ElementEnd); 1758end = new TextPointer(start); 3639position = new TextPointer((e as TextElement).ElementStart); 3645position = new TextPointer((TextPointer)_complexContent.TextContainer.Start);
System\Windows\Controls\TextBox.cs (3)
172TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 810TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 866TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward);
System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
45textPointerTable = new TextPointer(_textContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\FlowDocument.cs (2)
957TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 959TextPointer childEnd = new TextPointer(childStart);
System\Windows\Documents\List.cs (1)
189TextPointer textNav = new TextPointer(this.ContentStart);
System\Windows\Documents\RangeContentEnumerator.cs (1)
165_navigator = new TextPointer(_start);
System\Windows\Documents\TextContainer.cs (13)
441return new TextPointer(this, offset + 1, direction); 469return (node == null) ? null : new TextPointer(this, node, edge, direction); 857originalPosition = this.HasListeners ? new TextPointer(position, LogicalDirection.Backward) : null; 1109startEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart); 1117endEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeEnd); 1204insertPosition = new TextPointer(this, objectNode, ElementEdge.BeforeStart); 1259deletePosition = new TextPointer(startPosition, LogicalDirection.Forward); 1628startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 1659endPosition = new TextPointer(this, _rootNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 2760startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2765endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 3397TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3409TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart);
System\Windows\Documents\TextEffectResolver.cs (2)
44TextPointer effectStart = new TextPointer(startPosition); 62TextPointer continuousTextEnd = new TextPointer(effectStart);
System\Windows\Documents\TextElement.cs (9)
287TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 290TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 313elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 346contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 379contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 420elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 993beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 1497tree.InsertTextInternal(new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd), textData); 1531position = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd);
System\Windows\Documents\TextElementEnumerator.cs (1)
124_navigator = new TextPointer(_start);
System\Windows\Documents\TextPointer.cs (7)
312return new TextPointer(this); 318return new TextPointer(this, gravity); 898TextPointer position = new TextPointer(this, direction); 1210TextPointer position = new TextPointer(this); 1340TextPointer deleteToPosition = new TextPointer(this, count); 1608TextPointer position = new TextPointer(this); 2581return new TextPointer(this, offset, gravity);
System\Windows\Documents\TextRangeEdit.cs (4)
62splitPosition = new TextPointer(splitPosition); 527position = new TextPointer(position); 1603TextPointer previousPosition = new TextPointer(start); 1607TextPointer nextPosition = new TextPointer(start);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
73navigator = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 473TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
58start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 59end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount - 2, LogicalDirection.Forward);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
53start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 62end = new TextPointer(this.TextContainer, element.TextElementNode, ElementEdge.AfterEnd);
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
53start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 54end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount, LogicalDirection.Forward);
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
49position = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward);
719 references to TextPointer
PresentationFramework (714)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (3)
119list.Add(((TextPointer)start).Parent); 124TextPointer current = (TextPointer)start.CreatePointer();
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
134if (!(start is TextPointer))
MS\Internal\Documents\FlowDocumentPaginator.cs (7)
224TextPointer flowContentPosition = contentPosition as TextPointer; 269TextPointer flowContentPosition; 281flowContentPosition = contentPosition as TextPointer; 396return (position is TextPointer) ? (ContentPosition)position : ContentPosition.Missing; 1004internal GetPageNumberAsyncRequest(TextPointer textPointer, object userState, FlowDocumentPaginator paginator) : base(userState, paginator) 1034internal readonly TextPointer TextPointer;
MS\Internal\Documents\HostedElements.cs (5)
71if (_textSegments[0].Start is TextPointer) 73_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 116if (_textSegments[_currentTextSegment].Start is TextPointer) 118_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer); 203private TextPointer _currentPosition;
MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
121TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 152TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 153TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\Documents\TextDocumentView.cs (2)
1168else if (position is TextPointer && ((TextPointer)position).IsAtRowEnd)
MS\Internal\PtsHost\BreakRecordTable.cs (4)
115internal bool GetPageNumberForContentPosition(TextPointer contentPosition, ref int pageNumber) 249internal void UpdateEntry(int pageNumber, FlowDocumentPage page, PageBreakRecord brOut, TextPointer dependentMax) 435TextPointer dependentMax; 508public TextPointer DependentMax;
MS\Internal\PtsHost\ContainerParagraph.cs (5)
1027Invariant.Assert(textPointer is TextPointer); 1028Invariant.Assert(Element == ((TextPointer)textPointer).Parent); 1040Debug.Assert(textPointer is TextPointer); 1041TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 1089StructuralCache.CurrentFormatContext.DependentMax = (TextPointer) textPointer;
MS\Internal\PtsHost\FlowDocumentPage.cs (8)
316TextPointer elementStart = FindElementPosition(child, isLimitedToTextView); 324TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 747internal TextPointer DependentMax 914private TextPointer FindElementPosition(IInputElement e, bool isLimitedToTextView) 922TextPointer elementPosition = null; 944TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 1105private TextPointer _DependentMax;
MS\Internal\PtsHost\Line.cs (2)
565TextPointer position; 589position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, cp, LogicalDirection.Forward) as TextPointer;
MS\Internal\PtsHost\ListParagraph.cs (7)
61Invariant.Assert(textPointer is TextPointer); 70TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 96if (((TextPointer)textPointer).IsFrozen) 107if (Element == ((TextPointer)textPointer).Parent) 111if (((TextPointer)textPointer).IsFrozen) 121if (((TextPointer)textPointer).IsFrozen) 132StructuralCache.CurrentFormatContext.DependentMax = (TextPointer)textPointer;
MS\Internal\PtsHost\StructuralCache.cs (1)
769internal TextPointer DependentMax { set { _owner._currentPage.DependentMax = value; } }
MS\Internal\PtsHost\TableParaClient.cs (1)
1134if(((TextPointer)position).CompareTo(row.ContentEnd) == 0)
MS\Internal\PtsHost\TextParaClient.cs (9)
675int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)position); 825Debug.Assert(position is TextPointer); 826int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 875Debug.Assert(position is TextPointer); 876int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 918Invariant.Assert(position is TextPointer); 919int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 1116int dcpStart = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)start) - Paragraph.ParagraphStartCharacterPosition; 1117int dcpEnd = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)end) - Paragraph.ParagraphStartCharacterPosition;
MS\Internal\PtsHost\TextParagraph.cs (2)
866TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 896TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\Text\ComplexLine.cs (1)
250TextPointer position;
System\Windows\Automation\Peers\ContentTextAutomationPeer.cs (4)
32public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) 51private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd)
System\Windows\Automation\Peers\TextAutomationPeer.cs (4)
31public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) 50private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd)
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
116TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward); 168private Rect CalculateVisibleRect(ITextView textView, TextElement textElement, TextPointer startPointer, TextPointer endPointer)
System\Windows\Controls\AccessText.cs (7)
574TextPointer navigator = new TextPointer(TextContainer.Start); 587TextPointer keyEnd = navigator.GetPositionAtOffset(index + 1 + keyText.Length); 604TextPointer underlineStart = new TextPointer(navigator, index); 634TextPointer keyStart = new TextPointer(navigator, 0); 635TextPointer keyEnd = new TextPointer(navigator, text.Length); 725TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, TextContainer.End); 727((TextPointer)TextContainer.End).InsertTextElement(run);
System\Windows\Controls\FlowDocumentReader.cs (3)
1972TextPointer contentPosition = viewer.ContentPosition as TextPointer; 2001TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\FlowDocumentScrollViewer.cs (5)
892internal TextPointer ContentPosition 896TextPointer contentPosition = null; 900contentPosition = textView.GetTextPositionFromPoint(new Point(), true) as TextPointer; 1886TextPointer contentPosition = ContentPosition; 1912TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\Primitives\TextBoxBase.cs (4)
1469internal TextPointer GetTextPositionFromPointInternal(Point point, bool snapToText) 1471TextPointer position; 1480position = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, snapToText); 1511internal bool GetRectangleFromTextPosition(TextPointer position, out Rect rect)
System\Windows\Controls\RichTextBox.cs (8)
200public TextPointer GetPositionFromPoint(Point point, bool snapToText) 207return (TextPointer)GetTextPositionFromPointInternal(point, snapToText); 221public SpellingError GetSpellingError(TextPointer position) 240public TextRange GetSpellingErrorRange(TextPointer position) 266public TextPointer GetNextSpellingErrorPosition(TextPointer position, LogicalDirection direction) 270return (TextPointer)this.TextEditor.GetNextSpellingErrorPosition(position, direction); 564public TextPointer CaretPosition
System\Windows\Controls\SinglePageViewer.cs (5)
1023TextPointer textPointer = contentPosition as TextPointer; 1535TextPointer contentPosition = ContentPosition as TextPointer; 1561TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\TextBlock.cs (23)
157TextPointer endPosition = textContainer.End; 187TextPointer endPosition = textContainer.End; 383public TextPointer GetPositionFromPoint(Point point, bool snapToText) 385TextPointer position; 397position = (TextPointer)_complexContent.TextView.GetTextPositionFromPoint(point, snapToText); 401position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 438public TextPointer ContentStart 444return (TextPointer)_complexContent.TextContainer.Start; 455public TextPointer ContentEnd 461return (TextPointer)_complexContent.TextContainer.End; 1745TextPointer start = FindElementPosition((IInputElement)child); 1751TextPointer end = null; 2818if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2826Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent); 2828((TextPointer)position).InsertTextElement(implicitRun); 3623private TextPointer FindElementPosition(IInputElement e) 3631TextPointer position; 3645position = new TextPointer((TextPointer)_complexContent.TextContainer.Start); 3646while (position.CompareTo((TextPointer)_complexContent.TextContainer.End) < 0) 4097((TextContainer)text._complexContent.TextContainer).DeleteContentInternal((TextPointer)text._complexContent.TextContainer.Start, (TextPointer)text._complexContent.TextContainer.End);
System\Windows\Controls\TextBox.cs (34)
160TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward); 172TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 188this.TextContainer.DeleteContentInternal((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 207TextPointer textPointer = GetTextPositionFromPointInternal(point, snapToText); 238TextPointer textPointer = GetStartPositionOfLine(lineIndex); 263TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 293TextPointer textPointerStart = GetStartPositionOfLine(lineIndex); 294TextPointer textPointerEnd = GetEndPositionOfLine(lineIndex); 369TextPointer textPointer = GetStartPositionOfLine(lineIndex); 386TextPointer startOfLine; 387TextPointer endOfLine; 438TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 478TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 810TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 854TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward); 866TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward); 1072return new RangeContentEnumerator((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 1344internal TextPointer StartPosition 1348return (TextPointer)this.TextContainer.Start; 1355internal TextPointer EndPosition 1359return (TextPointer)this.TextContainer.End; 1403private bool GetRectangleFromTextPositionInternal(TextPointer position, bool relativeToTextBox, out Rect rect) 1424private TextPointer GetStartPositionOfLine(int lineIndex) 1438TextPointer textPointer; 1442textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1443textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).Start.CreatePointer(textPointer.LogicalDirection); 1453private TextPointer GetEndPositionOfLine(int lineIndex) 1467TextPointer textPointer; 1471textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1472textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).End.CreatePointer(textPointer.LogicalDirection); 1654TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, (TextPointer)TextContainer.End);
System\Windows\Documents\AnchoredBlock.cs (1)
45protected AnchoredBlock(Block block, TextPointer insertionPosition)
System\Windows\Documents\BlockUIContainer.cs (1)
81TextPointer contentStart = this.ContentStart;
System\Windows\Documents\Bold.cs (3)
68public Bold(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 85public Bold(TextPointer start, TextPointer end) : base(start, end)
System\Windows\Documents\ColumnResizeUndoUnit.cs (2)
17internal ColumnResizeUndoUnit(TextPointer textPointerTable, int columnIndex, double[] columnWidths, double resizeAmount) : base("ColumnResize") 39TextPointer textPointerTable;
System\Windows\Documents\Figure.cs (1)
54public Figure(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
System\Windows\Documents\FixedTextPointer.cs (5)
55/// <see cref="TextPointer.CompareTo"/> 72/// <see cref="TextPointer.CompareTo"/> 80/// <see cref="TextPointer.GetOffsetToPosition"/> 90/// <see cref="TextPointer.GetPointerContext"/> 99/// <see cref="TextPointer.GetTextRunLength"/>
System\Windows\Documents\Floater.cs (1)
62public Floater(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
System\Windows\Documents\FlowDocument.cs (6)
170public TextPointer ContentStart 185public TextPointer ContentEnd 880TextPointer flowContentPosition; 925flowContentPosition = textPointer as TextPointer; 957TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 959TextPointer childEnd = new TextPointer(childStart);
System\Windows\Documents\FrameworkRichTextComposition.cs (8)
40public TextPointer ResultStart 44return _ResultStart == null ? null : (TextPointer)_ResultStart.GetFrozenPointer(LogicalDirection.Backward); 51public TextPointer ResultEnd 55return _ResultEnd == null ? null : (TextPointer)_ResultEnd.GetFrozenPointer(LogicalDirection.Forward); 62public TextPointer CompositionStart 66return _CompositionStart == null ? null : (TextPointer)_CompositionStart.GetFrozenPointer(LogicalDirection.Backward); 73public TextPointer CompositionEnd 77return _CompositionEnd == null ? null : (TextPointer)_CompositionEnd.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\Hyperlink.cs (5)
78public Hyperlink(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 95public Hyperlink(TextPointer start, TextPointer end) : base(start, end) 99TextPointer navigator = this.ContentStart.CreatePointer(); 100TextPointer stop = this.ContentEnd;
System\Windows\Documents\InlineUIContainer.cs (2)
62public InlineUIContainer(UIElement childUIElement, TextPointer insertionPosition) 105TextPointer contentStart = this.ContentStart;
System\Windows\Documents\Italic.cs (3)
68public Italic(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 85public Italic(TextPointer start, TextPointer end) : base(start, end)
System\Windows\Documents\LineBreak.cs (1)
32public LineBreak(TextPointer insertionPosition)
System\Windows\Documents\List.cs (1)
189TextPointer textNav = new TextPointer(this.ContentStart);
System\Windows\Documents\NullTextNavigator.cs (2)
40/// <see cref="TextPointer.CompareTo"/> 56/// <see cref="TextPointer.GetOffsetToPosition"/>
System\Windows\Documents\RangeContentEnumerator.cs (5)
25internal RangeContentEnumerator(TextPointer start, TextPointer end) 356private readonly TextPointer _start; 357private readonly TextPointer _end; 363private TextPointer _navigator;
System\Windows\Documents\Run.cs (2)
56public Run(string text, TextPointer insertionPosition) 247TextPointer contentStart = run.ContentStart;
System\Windows\Documents\Span.cs (5)
54public Span(Inline childInline, TextPointer insertionPosition) 86public Span(TextPointer start, TextPointer end) 211private TextPointer SplitElement(TextPointer position)
System\Windows\Documents\Speller.cs (3)
848if (start is TextPointer) 850debugMessage += $"Xml = {new TextRange((TextPointer)start.TextContainer.Start, (TextPointer)start.TextContainer.End).Xml}";
System\Windows\Documents\TextContainer.cs (56)
208internal void SetValue(TextPointer position, DependencyProperty property, object value) 249internal void SetValues(TextPointer position, LocalValueEnumerator values) 436internal TextPointer CreatePointerAtOffset(int offset, LogicalDirection direction) 459internal TextPointer CreatePointerAtCharOffset(int charOffset, LogicalDirection direction) 513context = TextPointer.GetPointerContextForward(node, edge); 518context = TextPointer.GetPointerContextBackward(node, edge); 538offset = TextPointer.GetSymbolOffset(this, node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 558textNode = TextPointer.GetAdjacentTextNodeSibling(node, node.GetEdgeFromOffsetNoBias(nodeOffset), direction); 562return textNode == null ? 0 : TextPointer.GetTextInRun(this, textNode.GetSymbolOffset(this.Generation), textNode, nodeOffset, direction, textBuffer, startIndex, count); 577adjacentElement = TextPointer.GetAdjacentElement(node, node.GetEdgeFromOffset(nodeOffset, direction), direction); 595scopingNode = TextPointer.GetScopingNode(node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 647moved = TextPointer.GetNextNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 652moved = TextPointer.GetPreviousNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 753internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange) 760internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange, DependencyProperty property, bool affectsRenderOnly) 771internal void AddChange(TextPointer startPosition, TextPointer endPosition, 816internal void InsertTextInternal(TextPointer position, object text) 820TextPointer originalPosition; 928internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 933TextPointer startEdgePosition; 934TextPointer endEdgePosition; 1163internal void InsertEmbeddedObjectInternal(TextPointer position, DependencyObject embeddedObject) 1168TextPointer insertPosition; 1210internal void DeleteContentInternal(TextPointer startPosition, TextPointer endPosition) 1216TextPointer deletePosition; 1575internal bool IsAtCaretUnitBoundary(TextPointer position) 1593TextPointer positionForwardGravity = position.GetPositionAtOffset(0, LogicalDirection.Forward); 1617internal TextPointer Start 1621TextPointer startPosition; 1648internal TextPointer End 1652TextPointer endPosition; 2215private int InsertElementToSiblingTree(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode) 2249private int InsertElementToSiblingTreeComplex(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode, 2279private int DeleteContentFromSiblingTree(SplayTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, bool newFirstIMEVisibleNode, out int charCount) 2391private int CutTopLevelLogicalNodes(TextTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, out int charCount) 2401TextPointer newTreeStart; 2593private int CutContent(TextPointer startPosition, TextPointer endPosition, out int charCount, out SplayTreeNode leftSubTree, out SplayTreeNode middleSubTree, out SplayTreeNode rightSubTree) 2739TextPointer startPosition; 2740TextPointer endPosition; 3215private void ValidateSetValue(TextPointer position) 3320private void FireChangeEvent(TextPointer startPosition, TextPointer endPosition, int symbolCount, 3379private TextTreeTextElementNode GetNextIMEVisibleNode(TextPointer startPosition, TextPointer endPosition) 3397TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3409TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3473internal ExtractChangeEventArgs(TextContainer textTree, TextPointer startPosition, TextTreeTextElementNode node, 3543private readonly TextPointer _startPosition;
System\windows\Documents\TextEditorCharacters.cs (7)
121if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection.Start is TextPointer)) 131TextPointer startResetFormatPosition = (TextPointer)This.Selection.Start; 132TextPointer endResetFormatPosition = (TextPointer)This.Selection.End; 146startResetFormatPosition = (TextPointer)autoWordRange.Start; 147endResetFormatPosition = (TextPointer)autoWordRange.End;
System\windows\Documents\TextEditorContextMenu.cs (2)
80TextPointer start = GetContentPosition(This.Selection.Start) as TextPointer;
System\windows\Documents\TextEditorCopyPaste.cs (8)
882TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.Start); 883TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.End); 886TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.Start); 887TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.End); 941if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 947TextPointer start = TextRangeEditTables.EnsureInsertionPosition((TextPointer)This.Selection.Start); 951TextPointer end = start.GetPositionAtOffset(0, LogicalDirection.Forward);
System\windows\Documents\TextEditorLists.cs (1)
332TextPointer position = thisSelection.Start;
System\windows\Documents\TextEditorSpelling.cs (5)
141if (dontUseRange && textStart is TextPointer) 145((TextPointer)textStart).DeleteTextInRun(textStart.GetOffsetToPosition(textEnd)); 336if (selection.Start is TextPointer) 338isSelectionIgnoringErrors = ((TextPointer)selection.Start).ParentBlock != ((TextPointer)selection.End).ParentBlock;
System\windows\Documents\TextEditorTyping.cs (22)
547if (position is TextPointer && !IsAtListItemStart(deletePosition) && 548HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 626if (position is TextPointer && 627HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 720private static bool HandleDeleteWhenStructuralBoundaryIsCrossed(TextEditor This, TextPointer position, TextPointer deletePosition) 776if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position)) 778Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer; 866private static bool IsBlockUIContainerBoundaryCrossed(TextPointer position1, TextPointer position2) 1056if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 1100TextPointer newEnd = ((TextSelection)This.Selection).End; 1153Invariant.Assert(This.Selection.Start is TextPointer); 1154TextPointer position = (TextPointer)This.Selection.Start; 1184TextPointer newEnd = TextRangeEditTables.EnsureInsertionPosition(position); 1403TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1431TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1875TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false);
System\Windows\Documents\TextEffectResolver.cs (8)
36TextPointer startPosition, 37TextPointer endPosition, 44TextPointer effectStart = new TextPointer(startPosition); 62TextPointer continuousTextEnd = new TextPointer(effectStart); 68continuousTextEnd = (TextPointer)TextPointerBase.Min(continuousTextEnd, endPosition); 98private static void MoveToFirstCharacterSymbol(TextPointer navigator) 106TextPointer navigator, // navigator to move 107TextPointer stopHint // don't move further if we already pass beyond this point
System\Windows\Documents\TextElement.cs (17)
90internal void Reposition(TextPointer start, TextPointer end) 227internal void RepositionWithContent(TextPointer textPosition) 287TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 290TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 304public TextPointer ElementStart 309TextPointer elementStart; 337public TextPointer ContentStart 342TextPointer contentStart; 370public TextPointer ContentEnd 375TextPointer contentEnd; 397internal bool Contains(TextPointer position) 411public TextPointer ElementEnd 416TextPointer elementEnd; 982TextPointer beforeStart; 1520TextPointer position; 1545TextPointer start;
System\Windows\Documents\TextElementCollection.cs (4)
471TextPointer position; 576TextPointer position = (nextElement == null) ? this.ContentEnd : nextElement.ElementStart; 956private TextPointer ContentStart 967private TextPointer ContentEnd
System\Windows\Documents\TextElementEnumerator.cs (5)
23internal TextElementEnumerator(TextPointer start, TextPointer end) 247private readonly TextPointer _start; 248private readonly TextPointer _end; 254private TextPointer _navigator;
System\Windows\Documents\TextPointer.cs (63)
35/// a <see cref="TextPointer.GetOffsetToPosition"/> method).</para> 39/// <see cref="TextPointer.LogicalDirection"/> property.</para> 45/// get from a TextPointer using method <see cref="TextPointer.GetPointerContext"/>.</para> 61/// using traversal methods like <see cref="TextPointer.GetNextContextPosition"/>, 62/// <see cref="TextPointer.GetNextInsertionPosition"/>, <see cref="TextPointer.GetPositionAtOffset(int)"/>, 254internal TextPointer(TextPointer textPointer) 262internal TextPointer(TextPointer position, int offset) 270internal TextPointer(TextPointer position, LogicalDirection direction) 276internal TextPointer(TextPointer position, int offset, LogicalDirection direction) 310internal TextPointer CreatePointer() 316internal TextPointer CreatePointer(LogicalDirection gravity) 429public bool IsInSameDocument(TextPointer textPosition) 451/// text container as this TextPointer (you can use <see cref="TextPointer.IsInSameDocument"/> 454public int CompareTo(TextPointer position) 674public int GetOffsetToPosition(TextPointer position) 867public TextPointer GetPositionAtOffset(int offset) 894/// <para>See examples in <seealso cref="TextPointer.GetPositionAtOffset(int)"/> method with one parameter.</para> 896public TextPointer GetPositionAtOffset(int offset, LogicalDirection direction) 898TextPointer position = new TextPointer(this, direction); 984public TextPointer GetNextContextPosition(LogicalDirection direction) 986return (TextPointer)((ITextPointer)this).GetNextContextPosition(direction); 1057public TextPointer GetInsertionPosition(LogicalDirection direction) 1059return (TextPointer)((ITextPointer)this).GetInsertionPosition(direction); 1063internal TextPointer GetInsertionPosition() 1084/// "insertion position" in the <see cref="TextPointer.GetInsertionPosition(LogicalDirection)"/> 1124public TextPointer GetNextInsertionPosition(LogicalDirection direction) 1126return (TextPointer)((ITextPointer)this).GetNextInsertionPosition(direction); 1166public TextPointer GetLineStartPosition(int count) 1170TextPointer lineStartPosition = GetLineStartPosition(count, out actualCount); 1206public TextPointer GetLineStartPosition(int count, out int actualCount) 1210TextPointer position = new TextPointer(this); 1276TextPointer insertPosition; 1340TextPointer deleteToPosition = new TextPointer(this, count); 1412public TextPointer InsertParagraphBreak() 1434TextPointer position; 1457public TextPointer InsertLineBreak() 1462TextPointer position; 1608TextPointer position = new TextPointer(this); 1619if (position.CompareTo((TextPointer)lineRange.Start) <= 0) 1678/// <para>The <see cref="TextPointer.Parent"/> property for this 1683public TextPointer DocumentStart 1695/// <para>The <see cref="TextPointer.Parent"/> property for this 1700public TextPointer DocumentEnd 1848internal void MoveToPosition(TextPointer textPosition) 2333internal TextPointer GetFrozenPointer(LogicalDirection logicalDirection) 2339return (TextPointer)TextPointerBase.GetFrozenPointer(this, logicalDirection); 2349return CompareTo((TextPointer)position); 2379return GetOffsetToPosition((TextPointer)position); 2427TextPointer textPointer; 2433textPointer = (TextPointer)position; 2608MoveToPosition((TextPointer)position); 2675TextPointer position; 2698position = (TextPointer)_tree.TextView.GetNextCaretUnitPosition(this, oppositeDirection); 2710TextPointer position; 2727position = (TextPointer)_tree.TextView.GetNextCaretUnitPosition(this, direction); 2743TextPointer position; 2758position = (TextPointer)_tree.TextView.GetBackspaceCaretUnitPosition(this); 2787TextRangeEditTables.DeleteContent(this, (TextPointer)limit); 3537TextPointer position = this; 3574internal static DependencyObject GetCommonAncestor(TextPointer position1, TextPointer position2) 3887private void InitializeOffset(TextPointer position, int distance, LogicalDirection direction)
System\Windows\Documents\TextPointerBase.cs (3)
751internal static ListItem GetListItem(TextPointer pointer) 767internal static ListItem GetImmediateListItem(TextPointer position) 786internal static bool IsInEmptyListItem(TextPointer position)
System\Windows\Documents\TextRange.cs (27)
50public TextRange(TextPointer position1, TextPointer position2) : 72internal TextRange(TextPointer position1, TextPointer position2, bool useRestrictiveXamlXmlReader) : 376return _textSegments[0].Start is TextPointer; 642public bool Contains(TextPointer textPointer) 673public void Select(TextPointer position1, TextPointer position2) 688internal void SelectWord(TextPointer textPointer) 1253public TextPointer Start 1257return (TextPointer)((ITextRange)this).Start; 1267public TextPointer End 1271return (TextPointer)((ITextRange)this).End; 1306return ((TextPointer)this.Start).ContainingFrameworkElement; 1575TextPointer startPosition = TextRangeEditTables.EnsureInsertionPosition(this.Start); 1601TextPointer insertionPosition = TextRangeEdit.SplitFormattingElements(this.Start, /*keepEmptyFormatting:*/false); 1633TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1637TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1642TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1659TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1676TextRangeEdit.CharacterResetFormatting((TextPointer)this.Start, (TextPointer)this.End); 1696return TextRangeEditTables.InsertTable((TextPointer)this.End, rowCount, columnCount);
System\Windows\Documents\TextRangeBase.cs (36)
257if (thisRange.Start is TextPointer && 258(cell = TextRangeEditTables.GetTableCellFromPosition((TextPointer)thisRange.Start)) != null) 440if (pointer is TextPointer) // Implement only for concrete TextCotainer returning null otherwise - for optimization 442DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 717else if (typeof(List).IsAssignableFrom(elementType) && navigator is TextPointer) 823if (navigator is TextPointer) // can do somethinng useful only in concrete TextContainer - not in an abstract one 825List list = (List)((TextPointer)navigator).Parent; 1294if (thisRange.Start is TextPointer && 1295((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1296((TextPointer)thisRange.Start).Parent is Run && 1323TextContainer textContainer = ((TextPointer)thisRange.Start).TextContainer; 1324textContainer.DeleteContentInternal((TextPointer)thisRange.Start, (TextPointer)thisRange.End); 1331if (thisRange.Start is TextPointer) 1333TextRangeEdit.MergeFlowDirection((TextPointer)thisRange.Start); 1355bool implicitParagraphInserted = insertPosition is TextPointer && 1363if (insertPosition is TextPointer && explicitInsertPosition == null) 1365TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition((TextPointer)insertPosition); 1374if ((newStart is TextPointer) && ((TextPointer)newStart).Paragraph != null) 1377TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward); 1741if (start is TextPointer adjustedStart) 1743TextPointer adjustedEnd = (TextPointer)end; 1819internal static void NormalizeAnchoredBlockBoundaries(ref TextPointer start, ref TextPointer end) 1922Invariant.Assert(thisRange._TextSegments[0].Start is TextPointer); 1988if (position1 is TextPointer) 1991/*anchorPosition:*/(TextPointer)position1, 1992/*movingPosition:*/(TextPointer)position2, 2035if (position1 is TextPointer) 2048/*anchorPosition:*/(TextPointer)finalStart, 2049/*movingPosition:*/(TextPointer)finalEnd,
System\Windows\Documents\TextRangeEdit.cs (76)
28internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 48internal static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting) 53internal static TextPointer SplitFormattingElement(TextPointer splitPosition, bool keepEmptyFormatting) 161private static bool ExtractEmptyFormattingElements(TextPointer position) 225internal static void SetInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 253internal static bool MergeFormattingInlines(TextPointer position) 320private static void RemoveUnnecessarySpans(TextPointer position) 406internal static void CharacterResetFormatting(TextPointer start, TextPointer end) 434TextPointer mergePosition = parent.ElementStart; 521internal static TextPointer SplitElement(TextPointer position) 589internal static TextPointer InsertParagraphBreak(TextPointer position, bool moveIntoSecondParagraph) 632TextPointer breakPosition = position; 677internal static TextPointer InsertLineBreak(TextPointer position) 716internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value) 739internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 747end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(start, end); 783private static void SetParagraphPropertyWorker(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 804TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward; 806TextPointer contentEnd = block.ContentEnd; 966TextPointer start = firstChild.ElementStart.GetFrozenPointer(LogicalDirection.Backward); 967TextPointer end = lastChild.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 1024private static Block GetNextBlock(TextPointer pointer, TextPointer limit) 1264internal static void MergeFlowDirection(TextPointer position) 1296TextPointer previousPosition = position.CreatePointer(); 1305TextPointer nextPosition = position.CreatePointer(); 1342internal static bool CanApplyStructuralInlineProperty(TextPointer start, TextPointer end) 1344return ValidateApplyStructuralInlineProperty(start, end, TextPointer.GetCommonAncestor(start, end), null); 1414if (!(start is TextPointer)) 1421TextPointer startPosition = (TextPointer)start; 1422TextPointer endPosition = (TextPointer)end; 1509private static void MergeEmptyParagraphsAndBlockUIContainers(TextPointer startPosition, TextPointer endPosition) 1559private static void DeleteEquiScopedContent(TextPointer start, TextPointer end) 1603TextPointer previousPosition = new TextPointer(start); 1607TextPointer nextPosition = new TextPointer(start); 1686private static bool DeleteContentBetweenPositions(TextPointer one, TextPointer two) 1714private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1745private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1868private static void SetNonStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 1892TextPointer nextRunPosition = run.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 1943private static void SetStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 1945DependencyObject commonAncestor = TextPointer.GetCommonAncestor(start, end); 2050TextPointer end = SplitFormattingElements(child.ElementEnd, /*keepEmptyFormatting*/false, limit); 2076private static Run GetNextRun(TextPointer pointer, TextPointer limit) 2106private static void ClearPropertyValueFromSpansAndRuns(TextPointer start, TextPointer end, DependencyProperty formattingProperty) 2131private static void ApplyStructuralInlinePropertyAcrossRun(TextPointer start, TextPointer end, Run run, DependencyProperty formattingProperty, object value) 2156private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value) 2213private static void ApplyStructuralInlinePropertyAcrossParagraphs(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 2253private static bool ValidateApplyStructuralInlineProperty(TextPointer start, TextPointer end, DependencyObject commonAncestor, DependencyProperty property)
System\Windows\Documents\TextRangeEditLists.cs (25)
94TextPointer positionAfterSecondParagraph = secondParagraphOrBlockUIContainer.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 133TextPointer inlineMergingPosition = secondParagraphOrBlockUIContainer.ElementStart; 168internal static bool MergeListsAroundNormalizedPosition(TextPointer mergePosition) 171TextPointer navigator = mergePosition.CreatePointer(); 206internal static bool MergeLists(TextPointer mergePosition) 244TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 269TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.Start); 275TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 339ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 397ListItem lastListItem = TextPointerBase.GetImmediateListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 451ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 510TextPointer outerListItemEnd = outerListItem.ContentEnd; 532TextPointer mergePosition = lastListItem.ContentEnd; 546TextPointer start = unindentedList.ElementStart; 547TextPointer end = unindentedList.ElementEnd; 588TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 631TextPointer position = firstParagraphOrBlockUIContainer.ElementEnd; 632TextPointer startOfSecondParagraph = secondParagraphOrBlockUIContainer.ElementStart; 672internal static bool SplitListsForFlowDirectionChange(TextPointer start, TextPointer end, object newFlowDirectionValue) 759private static TextPointer GetPositionAfterList(List list) 763TextPointer adjustedEnd = list.ElementEnd.GetInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\TextRangeEditTables.cs (58)
46if (!(range.Start is TextPointer)) 54if (table != GetTableFromPosition((TextPointer)range.TextSegments[0].Start)) 59TableCell firstCell = GetTableCellFromPosition((TextPointer)range.TextSegments[0].Start); 66TextPointer lastCellPointer = (TextPointer)range.TextSegments[0].End.GetNextInsertionPosition(LogicalDirection.Backward); 107internal static Table GetTableFromPosition(TextPointer position) 119private static TableRow GetTableRowFromPosition(TextPointer position) 131internal static TableCell GetTableCellFromPosition(TextPointer position) 179if (!(anchorPosition is TextPointer) || !(movingPosition is TextPointer)) 194TextPointer)anchorPosition, (TextPointer)movingPosition, 225TextPointer anchorPosition, TextPointer movingPosition, 280TextPointer anchorPosition, TextPointer movingPosition, 371TextPointer anchorPosition, TextPointer movingPosition, 427internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 431TextPointer movingPosition = selection.MovingPosition; 437if (TextRangeEditTables.IsTableCellRange(selection.AnchorPosition, (TextPointer)movingPosition, 557internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 575Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 586internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction) 589Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 627internal static Table InsertTable(TextPointer insertionPosition, int rowCount, int columnCount) 710internal static TextPointer EnsureInsertionPosition(TextPointer position) 776internal static TextPointer GetAdjustedRowEndPosition(Table currentTable, TextPointer rowEndPosition) 778TextPointer position; 781TextPointer nextInsertionPosition = rowEndPosition; 809private static TextPointer CreateInsertionPositionInIncompleteContent(TextPointer position) 874TextPointer insertionPosition; 889private static TextPointer CreateImplicitRun(TextPointer position) 891TextPointer insertionPosition; 916private static TextPointer CreateImplicitParagraph(TextPointer position) 918TextPointer insertionPosition; 937internal static void DeleteContent(TextPointer start, TextPointer end) 943TextPointer whatWasEnd = end; 1077TableCell cell = GetTableCellFromPosition((TextPointer)textSegment.Start); 1078TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1084TextPointer cellEnd = cell.ElementEnd; 1123TextPointer currentRowPosition = rowCount > 0 ? textRange.End : textRange.Start; 1961private static TextSegment NewNormalizedTextSegment(TextPointer startPosition, TextPointer endPosition) 1991TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward); 1995TextPointer end = endCell.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward); 2044TextPointer anchorPosition, TextPointer movingPosition, 2130TextPointer anchorPosition, TextPointer movingPosition, 2169TextPointer position,
System\Windows\Documents\TextRangeSerialization.cs (19)
591if (elementTypeStandardized == typeof(Table) && textReader is TextPointer) 594WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 696WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 949TextPointer textPointer = context as TextPointer; 1260TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.End); 1293private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1295TextPointer fragmentStart; 1296TextPointer fragmentEnd; 1403private static bool SplitParagraphForPasting(ref TextPointer insertionPosition) 1411TextPointer positionBeforeParagraph = insertionPosition; 1451private static void MergeParagraphsAtPosition(TextPointer position, bool mergingOnFragmentStart) 1453TextPointer navigator = position; 1506private static void ValidateMergingPositions(Type itemType, TextPointer start, TextPointer end) 1554private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1597private static void ApplyContextualProperty(Type targetType, TextPointer start, TextPointer end, DependencyProperty property, object value)
System\Windows\Documents\TextSchema.cs (4)
150internal static bool IsValidChild(TextPointer position, Type childType) 155internal static bool ValidateChild(TextPointer position, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 882TextPointer start = element.ElementStart; 883TextPointer end = element.ElementEnd;
System\windows\Documents\TextSelection.cs (17)
585else if (movingPosition is TextPointer && TextPointerBase.IsAtRowEnd(movingPosition)) 591else if (movingPosition is TextPointer && TextRangeEditTables.MovingPositionCrossesCellBoundary(this)) 1025if (!TextRangeEditTables.IsTableCellRange((TextPointer)_anchorPosition, (TextPointer)((ITextSelection)this).MovingPosition, /*includeCellAtMovingPosition:*/false, out anchorCell, out movingCell)) 1139internal TextPointer AnchorPosition 1145return (TextPointer)((ITextSelection)this).AnchorPosition; 1152internal TextPointer MovingPosition 1158return (TextPointer)((ITextSelection)this).MovingPosition; 1165internal void SetCaretToPosition(TextPointer caretPosition, LogicalDirection direction, bool allowStopAtLineEnd, bool allowStopNearSpace) 1368TextPointer cellStart = table.RowGroups[0].Rows[0].Cells[0].ContentStart; 1400if (thisSelection.Start is TextPointer) 1428if (((ITextSelection)this).Start is TextPointer) 1430TextPointer start = this.Start; 1505if (((ITextSelection)this).Start is TextPointer) 1521if (!(((ITextSelection)this).Start is TextPointer)) 2377Block paragraphOrBlockUIContainer = (caretPosition is TextPointer) ? ((TextPointer)caretPosition).ParagraphOrBlockUIContainer : null;
System\Windows\Documents\TextStore.cs (9)
427Invariant.Assert(navigator is TextPointer); 428TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 1251TextElement startElement = (TextElement)((TextPointer)start).Parent; 1252TextElement endElement = (TextElement)((TextPointer)end).Parent; 3357TextPointer start = startOut as TextPointer; 3366TextPointer end = (TextPointer)endOut; 3390TextPointer previousPosition = start.GetNextInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (9)
30internal TextTreeDeleteContentUndoUnit(TextContainer tree, TextPointer start, TextPointer end) : base(tree, start.GetSymbolOffset()) 67TextPointer navigator; 303internal abstract void Do(TextPointer navigator); 327internal override void Do(TextPointer navigator) 356internal override void Do(TextPointer navigator) 415internal override void Do(TextPointer navigator) 467internal override void Do(TextPointer navigator) 473TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeDumper.cs (1)
94internal static void Dump(TextPointer position)
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
52TextPointer start; 53TextPointer end;
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
47TextPointer start; 48TextPointer end;
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
48TextPointer start; 49TextPointer end;
System\Windows\Documents\TextTreeNode.cs (1)
463internal void InsertAtPosition(TextPointer position)
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
45TextPointer position;
System\Windows\Documents\TextTreeUndo.cs (2)
73internal static TextTreeDeleteContentUndoUnit CreateDeleteContentUndoUnit(TextContainer tree, TextPointer start, TextPointer end)
System\Windows\Documents\Underline.cs (3)
68public Underline(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 85public Underline(TextPointer start, TextPointer end) : base(start, end)
System\Windows\Documents\ValidationHelper.cs (1)
96internal static void ValidateChild(TextPointer position, object child, string paramName)
System.Windows.Controls.Ribbon (5)
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (5)
287TextPointer secondLinePointer = _textBlock1.ContentStart; 335private void MeasureWithConstraint(Size availableSize, out TextPointer secondLinePointer) 369private void MeasureWithoutConstraint(out TextPointer secondLinePointer) 399TextPointer currentLinePointer = _textBlock1.ContentStart.GetLineStartPosition(2); 406TextPointer nextLinePointer = currentLinePointer.GetLineStartPosition(1);