73 instantiations of TextPointer
PresentationFramework (73)
MS\Internal\Documents\HostedElements.cs (2)
80_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 125_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer);
MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
122TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 153TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 154TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\PtsHost\FlowDocumentPage.cs (4)
325TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 937elementPosition = new TextPointer((e as TextElement).ElementStart); 951TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 964elementPosition = new TextPointer(searchPosition);
MS\Internal\Text\ComplexLine.cs (1)
283position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward);
System\Windows\Controls\AccessText.cs (5)
573TextPointer navigator = new TextPointer(TextContainer.Start); 601TextPointer underlineStart = new TextPointer(navigator, index); 618navigator = new TextPointer(TextContainer.Start); 631TextPointer keyStart = new TextPointer(navigator, 0); 632TextPointer keyEnd = new TextPointer(navigator, text.Length);
System\Windows\Controls\TextBlock.cs (5)
404position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 1763end = new TextPointer(((TextElement)child).ElementEnd); 1767end = new TextPointer(start); 3649position = new TextPointer((e as TextElement).ElementStart); 3655position = new TextPointer((TextPointer)_complexContent.TextContainer.Start);
System\Windows\Controls\TextBox.cs (3)
171TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 809TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 865TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward);
System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
46textPointerTable = new TextPointer(_textContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\FlowDocument.cs (2)
961TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 963TextPointer childEnd = new TextPointer(childStart);
System\Windows\Documents\List.cs (1)
190TextPointer textNav = new TextPointer(this.ContentStart);
System\Windows\Documents\RangeContentEnumerator.cs (1)
172_navigator = new TextPointer(_start);
System\Windows\Documents\TextContainer.cs (13)
442return new TextPointer(this, offset + 1, direction); 470return (node == null) ? null : new TextPointer(this, node, edge, direction); 858originalPosition = this.HasListeners ? new TextPointer(position, LogicalDirection.Backward) : null; 1113startEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart); 1121endEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeEnd); 1208insertPosition = new TextPointer(this, objectNode, ElementEdge.BeforeStart); 1266deletePosition = new TextPointer(startPosition, LogicalDirection.Forward); 1635startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 1666endPosition = new TextPointer(this, _rootNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 2788startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2793endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 3431TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3443TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart);
System\Windows\Documents\TextEffectResolver.cs (2)
45TextPointer effectStart = new TextPointer(startPosition); 63TextPointer continuousTextEnd = new TextPointer(effectStart);
System\Windows\Documents\TextElement.cs (9)
302TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 305TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 328elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 361contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 394contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 435elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 1008beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 1515tree.InsertTextInternal(new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd), textData); 1549position = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd);
System\Windows\Documents\TextElementEnumerator.cs (1)
129_navigator = new TextPointer(_start);
System\Windows\Documents\TextPointer.cs (7)
313return new TextPointer(this); 319return new TextPointer(this, gravity); 899TextPointer position = new TextPointer(this, direction); 1211TextPointer position = new TextPointer(this); 1341TextPointer deleteToPosition = new TextPointer(this, count); 1609TextPointer position = new TextPointer(this); 2582return new TextPointer(this, offset, gravity);
System\Windows\Documents\TextRangeEdit.cs (4)
63splitPosition = new TextPointer(splitPosition); 528position = new TextPointer(position); 1604TextPointer previousPosition = new TextPointer(start); 1608TextPointer nextPosition = new TextPointer(start);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
74navigator = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 474TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
59start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 60end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount - 2, LogicalDirection.Forward);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
54start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 63end = new TextPointer(this.TextContainer, element.TextElementNode, ElementEdge.AfterEnd);
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
54start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 55end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount, LogicalDirection.Forward);
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
50position = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward);
723 references to TextPointer
PresentationFramework (718)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (3)
120list.Add(((TextPointer)start).Parent); 125TextPointer current = (TextPointer)start.CreatePointer();
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
135if (!(start is TextPointer))
MS\Internal\Documents\FlowDocumentPaginator.cs (7)
225TextPointer flowContentPosition = contentPosition as TextPointer; 270TextPointer flowContentPosition; 282flowContentPosition = contentPosition as TextPointer; 397return (position is TextPointer) ? (ContentPosition)position : ContentPosition.Missing; 1005internal GetPageNumberAsyncRequest(TextPointer textPointer, object userState, FlowDocumentPaginator paginator) : base(userState, paginator) 1035internal readonly TextPointer TextPointer;
MS\Internal\Documents\HostedElements.cs (5)
78if (_textSegments[0].Start is TextPointer) 80_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 123if (_textSegments[_currentTextSegment].Start is TextPointer) 125_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer); 211TextPointer _currentPosition;
MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
122TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 153TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 154TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\Documents\TextDocumentView.cs (2)
1188else if (position is TextPointer && ((TextPointer)position).IsAtRowEnd)
MS\Internal\PtsHost\BreakRecordTable.cs (4)
116internal bool GetPageNumberForContentPosition(TextPointer contentPosition, ref int pageNumber) 250internal void UpdateEntry(int pageNumber, FlowDocumentPage page, PageBreakRecord brOut, TextPointer dependentMax) 437TextPointer dependentMax; 510public TextPointer DependentMax;
MS\Internal\PtsHost\ContainerParagraph.cs (5)
1046Invariant.Assert(textPointer is TextPointer); 1047Invariant.Assert(Element == ((TextPointer)textPointer).Parent); 1059Debug.Assert(textPointer is TextPointer); 1060TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 1108StructuralCache.CurrentFormatContext.DependentMax = (TextPointer) textPointer;
MS\Internal\PtsHost\FlowDocumentPage.cs (10)
317TextPointer elementStart = FindElementPosition(child, isLimitedToTextView); 325TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 748internal TextPointer DependentMax 921private TextPointer FindElementPosition(IInputElement e, bool isLimitedToTextView) 929TextPointer elementPosition = null; 944if (!(_structuralCache.TextContainer.Start is TextPointer) || 945!(_structuralCache.TextContainer.End is TextPointer)) 951TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 1115private TextPointer _DependentMax;
MS\Internal\PtsHost\Line.cs (2)
578TextPointer position; 602position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, cp, LogicalDirection.Forward) as TextPointer;
MS\Internal\PtsHost\ListParagraph.cs (7)
71Invariant.Assert(textPointer is TextPointer); 80TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 106if (((TextPointer)textPointer).IsFrozen) 117if (Element == ((TextPointer)textPointer).Parent) 121if (((TextPointer)textPointer).IsFrozen) 131if (((TextPointer)textPointer).IsFrozen) 142StructuralCache.CurrentFormatContext.DependentMax = (TextPointer)textPointer;
MS\Internal\PtsHost\StructuralCache.cs (1)
770internal TextPointer DependentMax { set { _owner._currentPage.DependentMax = value; } }
MS\Internal\PtsHost\TableParaClient.cs (1)
1135if(((TextPointer)position).CompareTo(row.ContentEnd) == 0)
MS\Internal\PtsHost\TextParaClient.cs (9)
676int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)position); 826Debug.Assert(position is TextPointer); 827int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 876Debug.Assert(position is TextPointer); 877int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 919Invariant.Assert(position is TextPointer); 920int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 1117int dcpStart = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)start) - Paragraph.ParagraphStartCharacterPosition; 1118int dcpEnd = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)end) - Paragraph.ParagraphStartCharacterPosition;
MS\Internal\PtsHost\TextParagraph.cs (2)
883TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 913TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\Text\ComplexLine.cs (1)
254TextPointer position;
System\Windows\Automation\Peers\ContentTextAutomationPeer.cs (4)
33public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) 52private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd)
System\Windows\Automation\Peers\TextAutomationPeer.cs (4)
32public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) 51private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd)
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
117TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward); 169private Rect CalculateVisibleRect(ITextView textView, TextElement textElement, TextPointer startPointer, TextPointer endPointer)
System\Windows\Controls\AccessText.cs (7)
573TextPointer navigator = new TextPointer(TextContainer.Start); 586TextPointer keyEnd = navigator.GetPositionAtOffset(index + 1 + keyText.Length); 601TextPointer underlineStart = new TextPointer(navigator, index); 631TextPointer keyStart = new TextPointer(navigator, 0); 632TextPointer keyEnd = new TextPointer(navigator, text.Length); 722TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, TextContainer.End); 724((TextPointer)TextContainer.End).InsertTextElement(run);
System\Windows\Controls\FlowDocumentReader.cs (3)
2008TextPointer contentPosition = viewer.ContentPosition as TextPointer; 2037TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\FlowDocumentScrollViewer.cs (5)
900internal TextPointer ContentPosition 904TextPointer contentPosition = null; 908contentPosition = textView.GetTextPositionFromPoint(new Point(), true) as TextPointer; 1938TextPointer contentPosition = ContentPosition; 1964TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\Primitives\TextBoxBase.cs (4)
1525internal TextPointer GetTextPositionFromPointInternal(Point point, bool snapToText) 1527TextPointer position; 1539position = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, snapToText); 1570internal bool GetRectangleFromTextPosition(TextPointer position, out Rect rect)
System\Windows\Controls\RichTextBox.cs (8)
201public TextPointer GetPositionFromPoint(Point point, bool snapToText) 208return (TextPointer)GetTextPositionFromPointInternal(point, snapToText); 222public SpellingError GetSpellingError(TextPointer position) 241public TextRange GetSpellingErrorRange(TextPointer position) 267public TextPointer GetNextSpellingErrorPosition(TextPointer position, LogicalDirection direction) 271return (TextPointer)this.TextEditor.GetNextSpellingErrorPosition(position, direction); 563public TextPointer CaretPosition
System\Windows\Controls\SinglePageViewer.cs (5)
1022TextPointer textPointer = contentPosition as TextPointer; 1537TextPointer contentPosition = ContentPosition as TextPointer; 1563TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\TextBlock.cs (23)
160TextPointer endPosition = textContainer.End; 190TextPointer endPosition = textContainer.End; 386public TextPointer GetPositionFromPoint(Point point, bool snapToText) 388TextPointer position; 400position = (TextPointer)_complexContent.TextView.GetTextPositionFromPoint(point, snapToText); 404position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 441public TextPointer ContentStart 447return (TextPointer)_complexContent.TextContainer.Start; 458public TextPointer ContentEnd 464return (TextPointer)_complexContent.TextContainer.End; 1754TextPointer start = FindElementPosition((IInputElement)child); 1760TextPointer end = null; 2830if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2838Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent); 2840((TextPointer)position).InsertTextElement(implicitRun); 3633private TextPointer FindElementPosition(IInputElement e) 3641TextPointer position; 3655position = new TextPointer((TextPointer)_complexContent.TextContainer.Start); 3656while (position.CompareTo((TextPointer)_complexContent.TextContainer.End) < 0) 4107((TextContainer)text._complexContent.TextContainer).DeleteContentInternal((TextPointer)text._complexContent.TextContainer.Start, (TextPointer)text._complexContent.TextContainer.End);
System\Windows\Controls\TextBox.cs (34)
159TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward); 171TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 187this.TextContainer.DeleteContentInternal((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 206TextPointer textPointer = GetTextPositionFromPointInternal(point, snapToText); 237TextPointer textPointer = GetStartPositionOfLine(lineIndex); 262TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 292TextPointer textPointerStart = GetStartPositionOfLine(lineIndex); 293TextPointer textPointerEnd = GetEndPositionOfLine(lineIndex); 368TextPointer textPointer = GetStartPositionOfLine(lineIndex); 385TextPointer startOfLine; 386TextPointer endOfLine; 437TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 477TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 809TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 853TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward); 865TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward); 1071return new RangeContentEnumerator((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 1343internal TextPointer StartPosition 1347return (TextPointer)this.TextContainer.Start; 1354internal TextPointer EndPosition 1358return (TextPointer)this.TextContainer.End; 1402private bool GetRectangleFromTextPositionInternal(TextPointer position, bool relativeToTextBox, out Rect rect) 1423private TextPointer GetStartPositionOfLine(int lineIndex) 1437TextPointer textPointer; 1441textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1442textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).Start.CreatePointer(textPointer.LogicalDirection); 1452private TextPointer GetEndPositionOfLine(int lineIndex) 1466TextPointer textPointer; 1470textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1471textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).End.CreatePointer(textPointer.LogicalDirection); 1653TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, (TextPointer)TextContainer.End);
System\Windows\Documents\AnchoredBlock.cs (1)
46protected AnchoredBlock(Block block, TextPointer insertionPosition)
System\Windows\Documents\BlockUIContainer.cs (1)
82TextPointer contentStart = this.ContentStart;
System\Windows\Documents\Bold.cs (3)
69public Bold(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 86public Bold(TextPointer start, TextPointer end) : base(start, end)
System\Windows\Documents\ColumnResizeUndoUnit.cs (2)
18internal ColumnResizeUndoUnit(TextPointer textPointerTable, int columnIndex, double[] columnWidths, double resizeAmount) : base("ColumnResize") 40TextPointer textPointerTable;
System\Windows\Documents\Figure.cs (1)
55public Figure(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
System\Windows\Documents\FixedTextPointer.cs (5)
58/// <see cref="TextPointer.CompareTo"/> 75/// <see cref="TextPointer.CompareTo"/> 83/// <see cref="TextPointer.GetOffsetToPosition"/> 93/// <see cref="TextPointer.GetPointerContext"/> 102/// <see cref="TextPointer.GetTextRunLength"/>
System\Windows\Documents\Floater.cs (1)
63public Floater(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
System\Windows\Documents\FlowDocument.cs (6)
171public TextPointer ContentStart 186public TextPointer ContentEnd 884TextPointer flowContentPosition; 929flowContentPosition = textPointer as TextPointer; 961TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 963TextPointer childEnd = new TextPointer(childStart);
System\Windows\Documents\FrameworkRichTextComposition.cs (8)
41public TextPointer ResultStart 45return _ResultStart == null ? null : (TextPointer)_ResultStart.GetFrozenPointer(LogicalDirection.Backward); 52public TextPointer ResultEnd 56return _ResultEnd == null ? null : (TextPointer)_ResultEnd.GetFrozenPointer(LogicalDirection.Forward); 63public TextPointer CompositionStart 67return _CompositionStart == null ? null : (TextPointer)_CompositionStart.GetFrozenPointer(LogicalDirection.Backward); 74public TextPointer CompositionEnd 78return _CompositionEnd == null ? null : (TextPointer)_CompositionEnd.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\Hyperlink.cs (5)
79public Hyperlink(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 96public Hyperlink(TextPointer start, TextPointer end) : base(start, end) 100TextPointer navigator = this.ContentStart.CreatePointer(); 101TextPointer stop = this.ContentEnd;
System\Windows\Documents\InlineUIContainer.cs (2)
63public InlineUIContainer(UIElement childUIElement, TextPointer insertionPosition) 115TextPointer contentStart = this.ContentStart;
System\Windows\Documents\Italic.cs (3)
69public Italic(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 86public Italic(TextPointer start, TextPointer end) : base(start, end)
System\Windows\Documents\LineBreak.cs (1)
33public LineBreak(TextPointer insertionPosition)
System\Windows\Documents\List.cs (1)
190TextPointer textNav = new TextPointer(this.ContentStart);
System\Windows\Documents\NullTextNavigator.cs (2)
43/// <see cref="TextPointer.CompareTo"/> 59/// <see cref="TextPointer.GetOffsetToPosition"/>
System\Windows\Documents\RangeContentEnumerator.cs (5)
29internal RangeContentEnumerator(TextPointer start, TextPointer end) 363private readonly TextPointer _start; 364private readonly TextPointer _end; 370private TextPointer _navigator;
System\Windows\Documents\Run.cs (2)
57public Run(string text, TextPointer insertionPosition) 257TextPointer contentStart = run.ContentStart;
System\Windows\Documents\Span.cs (5)
55public Span(Inline childInline, TextPointer insertionPosition) 96public Span(TextPointer start, TextPointer end) 221private TextPointer SplitElement(TextPointer position)
System\Windows\Documents\Speller.cs (3)
852if (start is TextPointer) 854debugMessage += $"Xml = {new TextRange((TextPointer)start.TextContainer.Start, (TextPointer)start.TextContainer.End).Xml}";
System\Windows\Documents\TextContainer.cs (56)
209internal void SetValue(TextPointer position, DependencyProperty property, object value) 250internal void SetValues(TextPointer position, LocalValueEnumerator values) 437internal TextPointer CreatePointerAtOffset(int offset, LogicalDirection direction) 460internal TextPointer CreatePointerAtCharOffset(int charOffset, LogicalDirection direction) 514context = TextPointer.GetPointerContextForward(node, edge); 519context = TextPointer.GetPointerContextBackward(node, edge); 539offset = TextPointer.GetSymbolOffset(this, node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 559textNode = TextPointer.GetAdjacentTextNodeSibling(node, node.GetEdgeFromOffsetNoBias(nodeOffset), direction); 563return textNode == null ? 0 : TextPointer.GetTextInRun(this, textNode.GetSymbolOffset(this.Generation), textNode, nodeOffset, direction, textBuffer, startIndex, count); 578adjacentElement = TextPointer.GetAdjacentElement(node, node.GetEdgeFromOffset(nodeOffset, direction), direction); 596scopingNode = TextPointer.GetScopingNode(node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 648moved = TextPointer.GetNextNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 653moved = TextPointer.GetPreviousNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 754internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange) 761internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange, DependencyProperty property, bool affectsRenderOnly) 772internal void AddChange(TextPointer startPosition, TextPointer endPosition, 817internal void InsertTextInternal(TextPointer position, object text) 821TextPointer originalPosition; 932internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 937TextPointer startEdgePosition; 938TextPointer endEdgePosition; 1167internal void InsertEmbeddedObjectInternal(TextPointer position, DependencyObject embeddedObject) 1172TextPointer insertPosition; 1214internal void DeleteContentInternal(TextPointer startPosition, TextPointer endPosition) 1220TextPointer deletePosition; 1582internal bool IsAtCaretUnitBoundary(TextPointer position) 1600TextPointer positionForwardGravity = position.GetPositionAtOffset(0, LogicalDirection.Forward); 1624internal TextPointer Start 1628TextPointer startPosition; 1655internal TextPointer End 1659TextPointer endPosition; 2228private int InsertElementToSiblingTree(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode) 2262private int InsertElementToSiblingTreeComplex(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode, 2292private int DeleteContentFromSiblingTree(SplayTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, bool newFirstIMEVisibleNode, out int charCount) 2416private int CutTopLevelLogicalNodes(TextTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, out int charCount) 2426TextPointer newTreeStart; 2618private int CutContent(TextPointer startPosition, TextPointer endPosition, out int charCount, out SplayTreeNode leftSubTree, out SplayTreeNode middleSubTree, out SplayTreeNode rightSubTree) 2767TextPointer startPosition; 2768TextPointer endPosition; 3249private void ValidateSetValue(TextPointer position) 3354private void FireChangeEvent(TextPointer startPosition, TextPointer endPosition, int symbolCount, 3413private TextTreeTextElementNode GetNextIMEVisibleNode(TextPointer startPosition, TextPointer endPosition) 3431TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3443TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3507internal ExtractChangeEventArgs(TextContainer textTree, TextPointer startPosition, TextTreeTextElementNode node, 3577private readonly TextPointer _startPosition;
System\windows\Documents\TextEditorCharacters.cs (7)
122if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection.Start is TextPointer)) 132TextPointer startResetFormatPosition = (TextPointer)This.Selection.Start; 133TextPointer endResetFormatPosition = (TextPointer)This.Selection.End; 147startResetFormatPosition = (TextPointer)autoWordRange.Start; 148endResetFormatPosition = (TextPointer)autoWordRange.End;
System\windows\Documents\TextEditorContextMenu.cs (2)
81TextPointer start = GetContentPosition(This.Selection.Start) as TextPointer;
System\windows\Documents\TextEditorCopyPaste.cs (8)
881TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.Start); 882TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.End); 885TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.Start); 886TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.End); 940if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 946TextPointer start = TextRangeEditTables.EnsureInsertionPosition((TextPointer)This.Selection.Start); 950TextPointer end = start.GetPositionAtOffset(0, LogicalDirection.Forward);
System\windows\Documents\TextEditorLists.cs (1)
333TextPointer position = thisSelection.Start;
System\windows\Documents\TextEditorSpelling.cs (5)
142if (dontUseRange && textStart is TextPointer) 146((TextPointer)textStart).DeleteTextInRun(textStart.GetOffsetToPosition(textEnd)); 337if (selection.Start is TextPointer) 339isSelectionIgnoringErrors = ((TextPointer)selection.Start).ParentBlock != ((TextPointer)selection.End).ParentBlock;
System\windows\Documents\TextEditorTyping.cs (22)
557if (position is TextPointer && !IsAtListItemStart(deletePosition) && 558HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 636if (position is TextPointer && 637HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 730private static bool HandleDeleteWhenStructuralBoundaryIsCrossed(TextEditor This, TextPointer position, TextPointer deletePosition) 786if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position)) 788Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer; 876private static bool IsBlockUIContainerBoundaryCrossed(TextPointer position1, TextPointer position2) 1066if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 1110TextPointer newEnd = ((TextSelection)This.Selection).End; 1163Invariant.Assert(This.Selection.Start is TextPointer); 1164TextPointer position = (TextPointer)This.Selection.Start; 1194TextPointer newEnd = TextRangeEditTables.EnsureInsertionPosition(position); 1416TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1444TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1888TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false);
System\Windows\Documents\TextEffectResolver.cs (8)
37TextPointer startPosition, 38TextPointer endPosition, 45TextPointer effectStart = new TextPointer(startPosition); 63TextPointer continuousTextEnd = new TextPointer(effectStart); 69continuousTextEnd = (TextPointer)TextPointerBase.Min(continuousTextEnd, endPosition); 99private static void MoveToFirstCharacterSymbol(TextPointer navigator) 107TextPointer navigator, // navigator to move 108TextPointer stopHint // don't move further if we already pass beyond this point
System\Windows\Documents\TextElement.cs (17)
94internal void Reposition(TextPointer start, TextPointer end) 238internal void RepositionWithContent(TextPointer textPosition) 302TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 305TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 319public TextPointer ElementStart 324TextPointer elementStart; 352public TextPointer ContentStart 357TextPointer contentStart; 385public TextPointer ContentEnd 390TextPointer contentEnd; 412internal bool Contains(TextPointer position) 426public TextPointer ElementEnd 431TextPointer elementEnd; 997TextPointer beforeStart; 1538TextPointer position; 1563TextPointer start;
System\Windows\Documents\TextElementCollection.cs (4)
472TextPointer position; 577TextPointer position = (nextElement == null) ? this.ContentEnd : nextElement.ElementStart; 957private TextPointer ContentStart 968private TextPointer ContentEnd
System\Windows\Documents\TextElementEnumerator.cs (5)
28internal TextElementEnumerator(TextPointer start, TextPointer end) 252private readonly TextPointer _start; 253private readonly TextPointer _end; 259private TextPointer _navigator;
System\Windows\Documents\TextPointer.cs (63)
36/// a <see cref="TextPointer.GetOffsetToPosition"/> method).</para> 40/// <see cref="TextPointer.LogicalDirection"/> property.</para> 46/// get from a TextPointer using method <see cref="TextPointer.GetPointerContext"/>.</para> 62/// using traversal methods like <see cref="TextPointer.GetNextContextPosition"/>, 63/// <see cref="TextPointer.GetNextInsertionPosition"/>, <see cref="TextPointer.GetPositionAtOffset(int)"/>, 255internal TextPointer(TextPointer textPointer) 263internal TextPointer(TextPointer position, int offset) 271internal TextPointer(TextPointer position, LogicalDirection direction) 277internal TextPointer(TextPointer position, int offset, LogicalDirection direction) 311internal TextPointer CreatePointer() 317internal TextPointer CreatePointer(LogicalDirection gravity) 430public bool IsInSameDocument(TextPointer textPosition) 452/// text container as this TextPointer (you can use <see cref="TextPointer.IsInSameDocument"/> 455public int CompareTo(TextPointer position) 675public int GetOffsetToPosition(TextPointer position) 868public TextPointer GetPositionAtOffset(int offset) 895/// <para>See examples in <seealso cref="TextPointer.GetPositionAtOffset(int)"/> method with one parameter.</para> 897public TextPointer GetPositionAtOffset(int offset, LogicalDirection direction) 899TextPointer position = new TextPointer(this, direction); 985public TextPointer GetNextContextPosition(LogicalDirection direction) 987return (TextPointer)((ITextPointer)this).GetNextContextPosition(direction); 1058public TextPointer GetInsertionPosition(LogicalDirection direction) 1060return (TextPointer)((ITextPointer)this).GetInsertionPosition(direction); 1064internal TextPointer GetInsertionPosition() 1085/// "insertion position" in the <see cref="TextPointer.GetInsertionPosition(LogicalDirection)"/> 1125public TextPointer GetNextInsertionPosition(LogicalDirection direction) 1127return (TextPointer)((ITextPointer)this).GetNextInsertionPosition(direction); 1167public TextPointer GetLineStartPosition(int count) 1171TextPointer lineStartPosition = GetLineStartPosition(count, out actualCount); 1207public TextPointer GetLineStartPosition(int count, out int actualCount) 1211TextPointer position = new TextPointer(this); 1277TextPointer insertPosition; 1341TextPointer deleteToPosition = new TextPointer(this, count); 1413public TextPointer InsertParagraphBreak() 1435TextPointer position; 1458public TextPointer InsertLineBreak() 1463TextPointer position; 1609TextPointer position = new TextPointer(this); 1620if (position.CompareTo((TextPointer)lineRange.Start) <= 0) 1679/// <para>The <see cref="TextPointer.Parent"/> property for this 1684public TextPointer DocumentStart 1696/// <para>The <see cref="TextPointer.Parent"/> property for this 1701public TextPointer DocumentEnd 1849internal void MoveToPosition(TextPointer textPosition) 2334internal TextPointer GetFrozenPointer(LogicalDirection logicalDirection) 2340return (TextPointer)TextPointerBase.GetFrozenPointer(this, logicalDirection); 2350return CompareTo((TextPointer)position); 2380return GetOffsetToPosition((TextPointer)position); 2428TextPointer textPointer; 2434textPointer = (TextPointer)position; 2609MoveToPosition((TextPointer)position); 2676TextPointer position; 2699position = (TextPointer)_tree.TextView.GetNextCaretUnitPosition(this, oppositeDirection); 2711TextPointer position; 2728position = (TextPointer)_tree.TextView.GetNextCaretUnitPosition(this, direction); 2744TextPointer position; 2759position = (TextPointer)_tree.TextView.GetBackspaceCaretUnitPosition(this); 2788TextRangeEditTables.DeleteContent(this, (TextPointer)limit); 3538TextPointer position = this; 3575internal static DependencyObject GetCommonAncestor(TextPointer position1, TextPointer position2) 3888private void InitializeOffset(TextPointer position, int distance, LogicalDirection direction)
System\Windows\Documents\TextPointerBase.cs (3)
752internal static ListItem GetListItem(TextPointer pointer) 768internal static ListItem GetImmediateListItem(TextPointer position) 787internal static bool IsInEmptyListItem(TextPointer position)
System\Windows\Documents\TextRange.cs (27)
57public TextRange(TextPointer position1, TextPointer position2) : 79internal TextRange(TextPointer position1, TextPointer position2, bool useRestrictiveXamlXmlReader) : 383return _textSegments[0].Start is TextPointer; 649public bool Contains(TextPointer textPointer) 680public void Select(TextPointer position1, TextPointer position2) 695internal void SelectWord(TextPointer textPointer) 1262public TextPointer Start 1266return (TextPointer)((ITextRange)this).Start; 1276public TextPointer End 1280return (TextPointer)((ITextRange)this).End; 1315return ((TextPointer)this.Start).ContainingFrameworkElement; 1584TextPointer startPosition = TextRangeEditTables.EnsureInsertionPosition(this.Start); 1609TextPointer insertionPosition = TextRangeEdit.SplitFormattingElements(this.Start, /*keepEmptyFormatting:*/false); 1641TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1645TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1650TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1667TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1684TextRangeEdit.CharacterResetFormatting((TextPointer)this.Start, (TextPointer)this.End); 1704return TextRangeEditTables.InsertTable((TextPointer)this.End, rowCount, columnCount);
System\Windows\Documents\TextRangeBase.cs (38)
258if (thisRange.Start is TextPointer && 259(cell = TextRangeEditTables.GetTableCellFromPosition((TextPointer)thisRange.Start)) != null) 441if (pointer is TextPointer) // Implement only for concrete TextCotainer returning null otherwise - for optimization 443DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 718else if (typeof(List).IsAssignableFrom(elementType) && navigator is TextPointer) 824if (navigator is TextPointer) // can do somethinng useful only in concrete TextContainer - not in an abstract one 826List list = (List)((TextPointer)navigator).Parent; 1295if (thisRange.Start is TextPointer && 1296((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1297((TextPointer)thisRange.Start).Parent is Run && 1324TextContainer textContainer = ((TextPointer)thisRange.Start).TextContainer; 1325textContainer.DeleteContentInternal((TextPointer)thisRange.Start, (TextPointer)thisRange.End); 1332if (thisRange.Start is TextPointer) 1334TextRangeEdit.MergeFlowDirection((TextPointer)thisRange.Start); 1356bool implicitParagraphInserted = insertPosition is TextPointer && 1364if (insertPosition is TextPointer && explicitInsertPosition == null) 1366TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition((TextPointer)insertPosition); 1375if ((newStart is TextPointer) && ((TextPointer)newStart).Paragraph != null) 1378TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward); 1742if (start is TextPointer) 1744TextPointer adjustedStart = (TextPointer)start; 1745TextPointer adjustedEnd = (TextPointer)end; 1821internal static void NormalizeAnchoredBlockBoundaries(ref TextPointer start, ref TextPointer end) 1924Invariant.Assert(thisRange._TextSegments[0].Start is TextPointer); 1990if (position1 is TextPointer) 1993/*anchorPosition:*/(TextPointer)position1, 1994/*movingPosition:*/(TextPointer)position2, 2037if (position1 is TextPointer) 2050/*anchorPosition:*/(TextPointer)finalStart, 2051/*movingPosition:*/(TextPointer)finalEnd,
System\Windows\Documents\TextRangeEdit.cs (76)
29internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 49internal static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting) 54internal static TextPointer SplitFormattingElement(TextPointer splitPosition, bool keepEmptyFormatting) 162private static bool ExtractEmptyFormattingElements(TextPointer position) 226internal static void SetInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 254internal static bool MergeFormattingInlines(TextPointer position) 321private static void RemoveUnnecessarySpans(TextPointer position) 407internal static void CharacterResetFormatting(TextPointer start, TextPointer end) 435TextPointer mergePosition = parent.ElementStart; 522internal static TextPointer SplitElement(TextPointer position) 590internal static TextPointer InsertParagraphBreak(TextPointer position, bool moveIntoSecondParagraph) 633TextPointer breakPosition = position; 678internal static TextPointer InsertLineBreak(TextPointer position) 717internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value) 740internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 748end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(start, end); 784private static void SetParagraphPropertyWorker(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 805TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward; 807TextPointer contentEnd = block.ContentEnd; 967TextPointer start = firstChild.ElementStart.GetFrozenPointer(LogicalDirection.Backward); 968TextPointer end = lastChild.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 1025private static Block GetNextBlock(TextPointer pointer, TextPointer limit) 1265internal static void MergeFlowDirection(TextPointer position) 1297TextPointer previousPosition = position.CreatePointer(); 1306TextPointer nextPosition = position.CreatePointer(); 1343internal static bool CanApplyStructuralInlineProperty(TextPointer start, TextPointer end) 1345return ValidateApplyStructuralInlineProperty(start, end, TextPointer.GetCommonAncestor(start, end), null); 1415if (!(start is TextPointer)) 1422TextPointer startPosition = (TextPointer)start; 1423TextPointer endPosition = (TextPointer)end; 1510private static void MergeEmptyParagraphsAndBlockUIContainers(TextPointer startPosition, TextPointer endPosition) 1560private static void DeleteEquiScopedContent(TextPointer start, TextPointer end) 1604TextPointer previousPosition = new TextPointer(start); 1608TextPointer nextPosition = new TextPointer(start); 1687private static bool DeleteContentBetweenPositions(TextPointer one, TextPointer two) 1715private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1746private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1869private static void SetNonStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 1893TextPointer nextRunPosition = run.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 1944private static void SetStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 1946DependencyObject commonAncestor = TextPointer.GetCommonAncestor(start, end); 2051TextPointer end = SplitFormattingElements(child.ElementEnd, /*keepEmptyFormatting*/false, limit); 2077private static Run GetNextRun(TextPointer pointer, TextPointer limit) 2107private static void ClearPropertyValueFromSpansAndRuns(TextPointer start, TextPointer end, DependencyProperty formattingProperty) 2132private static void ApplyStructuralInlinePropertyAcrossRun(TextPointer start, TextPointer end, Run run, DependencyProperty formattingProperty, object value) 2157private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value) 2214private static void ApplyStructuralInlinePropertyAcrossParagraphs(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 2254private static bool ValidateApplyStructuralInlineProperty(TextPointer start, TextPointer end, DependencyObject commonAncestor, DependencyProperty property)
System\Windows\Documents\TextRangeEditLists.cs (25)
95TextPointer positionAfterSecondParagraph = secondParagraphOrBlockUIContainer.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 134TextPointer inlineMergingPosition = secondParagraphOrBlockUIContainer.ElementStart; 169internal static bool MergeListsAroundNormalizedPosition(TextPointer mergePosition) 172TextPointer navigator = mergePosition.CreatePointer(); 207internal static bool MergeLists(TextPointer mergePosition) 245TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 270TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.Start); 276TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 338ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 396ListItem lastListItem = TextPointerBase.GetImmediateListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 450ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 509TextPointer outerListItemEnd = outerListItem.ContentEnd; 531TextPointer mergePosition = lastListItem.ContentEnd; 545TextPointer start = unindentedList.ElementStart; 546TextPointer end = unindentedList.ElementEnd; 587TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 630TextPointer position = firstParagraphOrBlockUIContainer.ElementEnd; 631TextPointer startOfSecondParagraph = secondParagraphOrBlockUIContainer.ElementStart; 671internal static bool SplitListsForFlowDirectionChange(TextPointer start, TextPointer end, object newFlowDirectionValue) 758private static TextPointer GetPositionAfterList(List list) 762TextPointer adjustedEnd = list.ElementEnd.GetInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\TextRangeEditTables.cs (58)
47if (!(range.Start is TextPointer)) 55if (table != GetTableFromPosition((TextPointer)range.TextSegments[0].Start)) 60TableCell firstCell = GetTableCellFromPosition((TextPointer)range.TextSegments[0].Start); 67TextPointer lastCellPointer = (TextPointer)range.TextSegments[0].End.GetNextInsertionPosition(LogicalDirection.Backward); 108internal static Table GetTableFromPosition(TextPointer position) 120private static TableRow GetTableRowFromPosition(TextPointer position) 132internal static TableCell GetTableCellFromPosition(TextPointer position) 180if (!(anchorPosition is TextPointer) || !(movingPosition is TextPointer)) 195TextPointer)anchorPosition, (TextPointer)movingPosition, 226TextPointer anchorPosition, TextPointer movingPosition, 281TextPointer anchorPosition, TextPointer movingPosition, 372TextPointer anchorPosition, TextPointer movingPosition, 428internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 432TextPointer movingPosition = selection.MovingPosition; 438if (TextRangeEditTables.IsTableCellRange(selection.AnchorPosition, (TextPointer)movingPosition, 558internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 576Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 587internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction) 590Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 628internal static Table InsertTable(TextPointer insertionPosition, int rowCount, int columnCount) 707internal static TextPointer EnsureInsertionPosition(TextPointer position) 773internal static TextPointer GetAdjustedRowEndPosition(Table currentTable, TextPointer rowEndPosition) 775TextPointer position; 778TextPointer nextInsertionPosition = rowEndPosition; 806private static TextPointer CreateInsertionPositionInIncompleteContent(TextPointer position) 871TextPointer insertionPosition; 886private static TextPointer CreateImplicitRun(TextPointer position) 888TextPointer insertionPosition; 913private static TextPointer CreateImplicitParagraph(TextPointer position) 915TextPointer insertionPosition; 934internal static void DeleteContent(TextPointer start, TextPointer end) 940TextPointer whatWasEnd = end; 1074TableCell cell = GetTableCellFromPosition((TextPointer)textSegment.Start); 1075TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1081TextPointer cellEnd = cell.ElementEnd; 1120TextPointer currentRowPosition = rowCount > 0 ? textRange.End : textRange.Start; 1958private static TextSegment NewNormalizedTextSegment(TextPointer startPosition, TextPointer endPosition) 1988TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward); 1992TextPointer end = endCell.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward); 2041TextPointer anchorPosition, TextPointer movingPosition, 2127TextPointer anchorPosition, TextPointer movingPosition, 2166TextPointer position,
System\Windows\Documents\TextRangeSerialization.cs (19)
592if (elementTypeStandardized == typeof(Table) && textReader is TextPointer) 595WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 697WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 950TextPointer textPointer = context as TextPointer; 1261TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.End); 1294private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1296TextPointer fragmentStart; 1297TextPointer fragmentEnd; 1404private static bool SplitParagraphForPasting(ref TextPointer insertionPosition) 1412TextPointer positionBeforeParagraph = insertionPosition; 1452private static void MergeParagraphsAtPosition(TextPointer position, bool mergingOnFragmentStart) 1454TextPointer navigator = position; 1507private static void ValidateMergingPositions(Type itemType, TextPointer start, TextPointer end) 1555private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1598private static void ApplyContextualProperty(Type targetType, TextPointer start, TextPointer end, DependencyProperty property, object value)
System\Windows\Documents\TextSchema.cs (4)
151internal static bool IsValidChild(TextPointer position, Type childType) 156internal static bool ValidateChild(TextPointer position, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 888TextPointer start = element.ElementStart; 889TextPointer end = element.ElementEnd;
System\windows\Documents\TextSelection.cs (17)
598else if (movingPosition is TextPointer && TextPointerBase.IsAtRowEnd(movingPosition)) 604else if (movingPosition is TextPointer && TextRangeEditTables.MovingPositionCrossesCellBoundary(this)) 1041if (!TextRangeEditTables.IsTableCellRange((TextPointer)_anchorPosition, (TextPointer)((ITextSelection)this).MovingPosition, /*includeCellAtMovingPosition:*/false, out anchorCell, out movingCell)) 1155internal TextPointer AnchorPosition 1161return (TextPointer)((ITextSelection)this).AnchorPosition; 1168internal TextPointer MovingPosition 1174return (TextPointer)((ITextSelection)this).MovingPosition; 1181internal void SetCaretToPosition(TextPointer caretPosition, LogicalDirection direction, bool allowStopAtLineEnd, bool allowStopNearSpace) 1384TextPointer cellStart = table.RowGroups[0].Rows[0].Cells[0].ContentStart; 1416if (thisSelection.Start is TextPointer) 1444if (((ITextSelection)this).Start is TextPointer) 1446TextPointer start = this.Start; 1521if (((ITextSelection)this).Start is TextPointer) 1537if (!(((ITextSelection)this).Start is TextPointer)) 2393Block paragraphOrBlockUIContainer = (caretPosition is TextPointer) ? ((TextPointer)caretPosition).ParagraphOrBlockUIContainer : null;
System\Windows\Documents\TextStore.cs (9)
428Invariant.Assert(navigator is TextPointer); 429TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 1255TextElement startElement = (TextElement)((TextPointer)start).Parent; 1256TextElement endElement = (TextElement)((TextPointer)end).Parent; 3374TextPointer start = startOut as TextPointer; 3383TextPointer end = (TextPointer)endOut; 3407TextPointer previousPosition = start.GetNextInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (9)
31internal TextTreeDeleteContentUndoUnit(TextContainer tree, TextPointer start, TextPointer end) : base(tree, start.GetSymbolOffset()) 68TextPointer navigator; 304internal abstract void Do(TextPointer navigator); 328internal override void Do(TextPointer navigator) 357internal override void Do(TextPointer navigator) 416internal override void Do(TextPointer navigator) 468internal override void Do(TextPointer navigator) 474TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeDumper.cs (1)
95internal static void Dump(TextPointer position)
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
53TextPointer start; 54TextPointer end;
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
48TextPointer start; 49TextPointer end;
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
49TextPointer start; 50TextPointer end;
System\Windows\Documents\TextTreeNode.cs (1)
464internal void InsertAtPosition(TextPointer position)
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
46TextPointer position;
System\Windows\Documents\TextTreeUndo.cs (2)
72internal static TextTreeDeleteContentUndoUnit CreateDeleteContentUndoUnit(TextContainer tree, TextPointer start, TextPointer end)
System\Windows\Documents\Underline.cs (3)
69public Underline(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 86public Underline(TextPointer start, TextPointer end) : base(start, end)
System\Windows\Documents\ValidationHelper.cs (1)
97internal static void ValidateChild(TextPointer position, object child, string paramName)
System.Windows.Controls.Ribbon (5)
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (5)
288TextPointer secondLinePointer = _textBlock1.ContentStart; 336private void MeasureWithConstraint(Size availableSize, out TextPointer secondLinePointer) 370private void MeasureWithoutConstraint(out TextPointer secondLinePointer) 400TextPointer currentLinePointer = _textBlock1.ContentStart.GetLineStartPosition(2); 407TextPointer nextLinePointer = currentLinePointer.GetLineStartPosition(1);