73 instantiations of TextPointer
PresentationFramework (73)
MS\Internal\Documents\HostedElements.cs (2)
74_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 119_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); 931elementPosition = new TextPointer((e as TextElement).ElementStart); 945TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 958elementPosition = new TextPointer(searchPosition);
MS\Internal\Text\ComplexLine.cs (1)
283position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward);
System\Windows\Controls\AccessText.cs (5)
575TextPointer navigator = new TextPointer(TextContainer.Start); 605TextPointer underlineStart = new TextPointer(navigator, index); 622navigator = new TextPointer(TextContainer.Start); 635TextPointer keyStart = new TextPointer(navigator, 0); 636TextPointer keyEnd = new TextPointer(navigator, text.Length);
System\Windows\Controls\TextBlock.cs (5)
402position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 1755end = new TextPointer(((TextElement)child).ElementEnd); 1759end = new TextPointer(start); 3640position = new TextPointer((e as TextElement).ElementStart); 3646position = new TextPointer((TextPointer)_complexContent.TextContainer.Start);
System\Windows\Controls\TextBox.cs (3)
173TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 811TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 867TextPointer 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)
958TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 960TextPointer childEnd = new TextPointer(childStart);
System\Windows\Documents\List.cs (1)
190TextPointer textNav = new TextPointer(this.ContentStart);
System\Windows\Documents\RangeContentEnumerator.cs (1)
166_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; 1110startEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart); 1118endEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeEnd); 1205insertPosition = new TextPointer(this, objectNode, ElementEdge.BeforeStart); 1260deletePosition = new TextPointer(startPosition, LogicalDirection.Forward); 1629startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 1660endPosition = new TextPointer(this, _rootNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 2764startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2769endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 3404TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3416TextPointer 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)
288TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 291TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 314elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 347contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 380contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 421elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 994beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 1498tree.InsertTextInternal(new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd), textData); 1532position = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd);
System\Windows\Documents\TextElementEnumerator.cs (1)
125_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);
719 references to TextPointer
PresentationFramework (714)
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)
72if (_textSegments[0].Start is TextPointer) 74_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 117if (_textSegments[_currentTextSegment].Start is TextPointer) 119_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer); 204TextPointer _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)
1169else 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) 436TextPointer dependentMax; 509public TextPointer DependentMax;
MS\Internal\PtsHost\ContainerParagraph.cs (5)
1028Invariant.Assert(textPointer is TextPointer); 1029Invariant.Assert(Element == ((TextPointer)textPointer).Parent); 1041Debug.Assert(textPointer is TextPointer); 1042TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 1090StructuralCache.CurrentFormatContext.DependentMax = (TextPointer) textPointer;
MS\Internal\PtsHost\FlowDocumentPage.cs (8)
317TextPointer elementStart = FindElementPosition(child, isLimitedToTextView); 325TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 748internal TextPointer DependentMax 915private TextPointer FindElementPosition(IInputElement e, bool isLimitedToTextView) 923TextPointer elementPosition = null; 945TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 1106private TextPointer _DependentMax;
MS\Internal\PtsHost\Line.cs (2)
566TextPointer position; 590position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, cp, LogicalDirection.Forward) as TextPointer;
MS\Internal\PtsHost\ListParagraph.cs (7)
62Invariant.Assert(textPointer is TextPointer); 71TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 97if (((TextPointer)textPointer).IsFrozen) 108if (Element == ((TextPointer)textPointer).Parent) 112if (((TextPointer)textPointer).IsFrozen) 122if (((TextPointer)textPointer).IsFrozen) 133StructuralCache.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)
867TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 897TextElement 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)
575TextPointer navigator = new TextPointer(TextContainer.Start); 588TextPointer keyEnd = navigator.GetPositionAtOffset(index + 1 + keyText.Length); 605TextPointer underlineStart = new TextPointer(navigator, index); 635TextPointer keyStart = new TextPointer(navigator, 0); 636TextPointer keyEnd = new TextPointer(navigator, text.Length); 726TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, TextContainer.End); 728((TextPointer)TextContainer.End).InsertTextElement(run);
System\Windows\Controls\FlowDocumentReader.cs (3)
1973TextPointer contentPosition = viewer.ContentPosition as TextPointer; 2002TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\FlowDocumentScrollViewer.cs (5)
896internal TextPointer ContentPosition 900TextPointer contentPosition = null; 904contentPosition = textView.GetTextPositionFromPoint(new Point(), true) as TextPointer; 1902TextPointer contentPosition = ContentPosition; 1928TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\Primitives\TextBoxBase.cs (4)
1473internal TextPointer GetTextPositionFromPointInternal(Point point, bool snapToText) 1475TextPointer position; 1484position = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, snapToText); 1515internal 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); 565public TextPointer CaretPosition
System\Windows\Controls\SinglePageViewer.cs (5)
1024TextPointer textPointer = contentPosition as TextPointer; 1536TextPointer contentPosition = ContentPosition as TextPointer; 1562TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\TextBlock.cs (23)
158TextPointer endPosition = textContainer.End; 188TextPointer endPosition = textContainer.End; 384public TextPointer GetPositionFromPoint(Point point, bool snapToText) 386TextPointer position; 398position = (TextPointer)_complexContent.TextView.GetTextPositionFromPoint(point, snapToText); 402position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 439public TextPointer ContentStart 445return (TextPointer)_complexContent.TextContainer.Start; 456public TextPointer ContentEnd 462return (TextPointer)_complexContent.TextContainer.End; 1746TextPointer start = FindElementPosition((IInputElement)child); 1752TextPointer end = null; 2819if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2827Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent); 2829((TextPointer)position).InsertTextElement(implicitRun); 3624private TextPointer FindElementPosition(IInputElement e) 3632TextPointer position; 3646position = new TextPointer((TextPointer)_complexContent.TextContainer.Start); 3647while (position.CompareTo((TextPointer)_complexContent.TextContainer.End) < 0) 4098((TextContainer)text._complexContent.TextContainer).DeleteContentInternal((TextPointer)text._complexContent.TextContainer.Start, (TextPointer)text._complexContent.TextContainer.End);
System\Windows\Controls\TextBox.cs (34)
161TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward); 173TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 189this.TextContainer.DeleteContentInternal((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 208TextPointer textPointer = GetTextPositionFromPointInternal(point, snapToText); 239TextPointer textPointer = GetStartPositionOfLine(lineIndex); 264TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 294TextPointer textPointerStart = GetStartPositionOfLine(lineIndex); 295TextPointer textPointerEnd = GetEndPositionOfLine(lineIndex); 370TextPointer textPointer = GetStartPositionOfLine(lineIndex); 387TextPointer startOfLine; 388TextPointer endOfLine; 439TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 479TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 811TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 855TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward); 867TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward); 1073return new RangeContentEnumerator((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 1345internal TextPointer StartPosition 1349return (TextPointer)this.TextContainer.Start; 1356internal TextPointer EndPosition 1360return (TextPointer)this.TextContainer.End; 1404private bool GetRectangleFromTextPositionInternal(TextPointer position, bool relativeToTextBox, out Rect rect) 1425private TextPointer GetStartPositionOfLine(int lineIndex) 1439TextPointer textPointer; 1443textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1444textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).Start.CreatePointer(textPointer.LogicalDirection); 1454private TextPointer GetEndPositionOfLine(int lineIndex) 1468TextPointer textPointer; 1472textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1473textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).End.CreatePointer(textPointer.LogicalDirection); 1655TextContainer.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)
56/// <see cref="TextPointer.CompareTo"/> 73/// <see cref="TextPointer.CompareTo"/> 81/// <see cref="TextPointer.GetOffsetToPosition"/> 91/// <see cref="TextPointer.GetPointerContext"/> 100/// <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 881TextPointer flowContentPosition; 926flowContentPosition = textPointer as TextPointer; 958TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 960TextPointer 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) 106TextPointer 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)
41/// <see cref="TextPointer.CompareTo"/> 57/// <see cref="TextPointer.GetOffsetToPosition"/>
System\Windows\Documents\RangeContentEnumerator.cs (5)
26internal RangeContentEnumerator(TextPointer start, TextPointer end) 357private readonly TextPointer _start; 358private readonly TextPointer _end; 364private TextPointer _navigator;
System\Windows\Documents\Run.cs (2)
57public Run(string text, TextPointer insertionPosition) 248TextPointer contentStart = run.ContentStart;
System\Windows\Documents\Span.cs (5)
55public Span(Inline childInline, TextPointer insertionPosition) 87public Span(TextPointer start, TextPointer end) 212private TextPointer SplitElement(TextPointer position)
System\Windows\Documents\Speller.cs (3)
849if (start is TextPointer) 851debugMessage += $"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; 929internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 934TextPointer startEdgePosition; 935TextPointer endEdgePosition; 1164internal void InsertEmbeddedObjectInternal(TextPointer position, DependencyObject embeddedObject) 1169TextPointer insertPosition; 1211internal void DeleteContentInternal(TextPointer startPosition, TextPointer endPosition) 1217TextPointer deletePosition; 1576internal bool IsAtCaretUnitBoundary(TextPointer position) 1594TextPointer positionForwardGravity = position.GetPositionAtOffset(0, LogicalDirection.Forward); 1618internal TextPointer Start 1622TextPointer startPosition; 1649internal TextPointer End 1653TextPointer endPosition; 2216private int InsertElementToSiblingTree(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode) 2250private int InsertElementToSiblingTreeComplex(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode, 2280private int DeleteContentFromSiblingTree(SplayTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, bool newFirstIMEVisibleNode, out int charCount) 2395private int CutTopLevelLogicalNodes(TextTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, out int charCount) 2405TextPointer newTreeStart; 2597private int CutContent(TextPointer startPosition, TextPointer endPosition, out int charCount, out SplayTreeNode leftSubTree, out SplayTreeNode middleSubTree, out SplayTreeNode rightSubTree) 2743TextPointer startPosition; 2744TextPointer endPosition; 3222private void ValidateSetValue(TextPointer position) 3327private void FireChangeEvent(TextPointer startPosition, TextPointer endPosition, int symbolCount, 3386private TextTreeTextElementNode GetNextIMEVisibleNode(TextPointer startPosition, TextPointer endPosition) 3404TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3416TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3480internal ExtractChangeEventArgs(TextContainer textTree, TextPointer startPosition, TextTreeTextElementNode node, 3550private 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)
883TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.Start); 884TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.End); 887TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.Start); 888TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.End); 942if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 948TextPointer start = TextRangeEditTables.EnsureInsertionPosition((TextPointer)This.Selection.Start); 952TextPointer 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)
548if (position is TextPointer && !IsAtListItemStart(deletePosition) && 549HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 627if (position is TextPointer && 628HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 721private static bool HandleDeleteWhenStructuralBoundaryIsCrossed(TextEditor This, TextPointer position, TextPointer deletePosition) 777if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position)) 779Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer; 867private static bool IsBlockUIContainerBoundaryCrossed(TextPointer position1, TextPointer position2) 1057if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 1101TextPointer newEnd = ((TextSelection)This.Selection).End; 1154Invariant.Assert(This.Selection.Start is TextPointer); 1155TextPointer position = (TextPointer)This.Selection.Start; 1185TextPointer newEnd = TextRangeEditTables.EnsureInsertionPosition(position); 1404TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1432TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1876TextPointer 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)
91internal void Reposition(TextPointer start, TextPointer end) 228internal void RepositionWithContent(TextPointer textPosition) 288TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 291TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 305public TextPointer ElementStart 310TextPointer elementStart; 338public TextPointer ContentStart 343TextPointer contentStart; 371public TextPointer ContentEnd 376TextPointer contentEnd; 398internal bool Contains(TextPointer position) 412public TextPointer ElementEnd 417TextPointer elementEnd; 983TextPointer beforeStart; 1521TextPointer position; 1546TextPointer 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)
24internal TextElementEnumerator(TextPointer start, TextPointer end) 248private readonly TextPointer _start; 249private readonly TextPointer _end; 255private 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)
51public TextRange(TextPointer position1, TextPointer position2) : 73internal TextRange(TextPointer position1, TextPointer position2, bool useRestrictiveXamlXmlReader) : 377return _textSegments[0].Start is TextPointer; 643public bool Contains(TextPointer textPointer) 674public void Select(TextPointer position1, TextPointer position2) 689internal void SelectWord(TextPointer textPointer) 1254public TextPointer Start 1258return (TextPointer)((ITextRange)this).Start; 1268public TextPointer End 1272return (TextPointer)((ITextRange)this).End; 1307return ((TextPointer)this.Start).ContainingFrameworkElement; 1576TextPointer startPosition = TextRangeEditTables.EnsureInsertionPosition(this.Start); 1602TextPointer insertionPosition = TextRangeEdit.SplitFormattingElements(this.Start, /*keepEmptyFormatting:*/false); 1634TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1638TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1643TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1660TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1677TextRangeEdit.CharacterResetFormatting((TextPointer)this.Start, (TextPointer)this.End); 1697return TextRangeEditTables.InsertTable((TextPointer)this.End, rowCount, columnCount);
System\Windows\Documents\TextRangeBase.cs (36)
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 adjustedStart) 1744TextPointer adjustedEnd = (TextPointer)end; 1820internal static void NormalizeAnchoredBlockBoundaries(ref TextPointer start, ref TextPointer end) 1923Invariant.Assert(thisRange._TextSegments[0].Start is TextPointer); 1989if (position1 is TextPointer) 1992/*anchorPosition:*/(TextPointer)position1, 1993/*movingPosition:*/(TextPointer)position2, 2036if (position1 is TextPointer) 2049/*anchorPosition:*/(TextPointer)finalStart, 2050/*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); 340ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 398ListItem lastListItem = TextPointerBase.GetImmediateListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 452ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 511TextPointer outerListItemEnd = outerListItem.ContentEnd; 533TextPointer mergePosition = lastListItem.ContentEnd; 547TextPointer start = unindentedList.ElementStart; 548TextPointer end = unindentedList.ElementEnd; 589TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 632TextPointer position = firstParagraphOrBlockUIContainer.ElementEnd; 633TextPointer startOfSecondParagraph = secondParagraphOrBlockUIContainer.ElementStart; 673internal static bool SplitListsForFlowDirectionChange(TextPointer start, TextPointer end, object newFlowDirectionValue) 760private static TextPointer GetPositionAfterList(List list) 764TextPointer 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) 711internal static TextPointer EnsureInsertionPosition(TextPointer position) 777internal static TextPointer GetAdjustedRowEndPosition(Table currentTable, TextPointer rowEndPosition) 779TextPointer position; 782TextPointer nextInsertionPosition = rowEndPosition; 810private static TextPointer CreateInsertionPositionInIncompleteContent(TextPointer position) 875TextPointer insertionPosition; 890private static TextPointer CreateImplicitRun(TextPointer position) 892TextPointer insertionPosition; 917private static TextPointer CreateImplicitParagraph(TextPointer position) 919TextPointer insertionPosition; 938internal static void DeleteContent(TextPointer start, TextPointer end) 944TextPointer whatWasEnd = end; 1078TableCell cell = GetTableCellFromPosition((TextPointer)textSegment.Start); 1079TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1085TextPointer cellEnd = cell.ElementEnd; 1124TextPointer currentRowPosition = rowCount > 0 ? textRange.End : textRange.Start; 1962private static TextSegment NewNormalizedTextSegment(TextPointer startPosition, TextPointer endPosition) 1992TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward); 1996TextPointer end = endCell.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward); 2045TextPointer anchorPosition, TextPointer movingPosition, 2131TextPointer anchorPosition, TextPointer movingPosition, 2170TextPointer 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) 883TextPointer start = element.ElementStart; 884TextPointer end = element.ElementEnd;
System\windows\Documents\TextSelection.cs (17)
586else if (movingPosition is TextPointer && TextPointerBase.IsAtRowEnd(movingPosition)) 592else if (movingPosition is TextPointer && TextRangeEditTables.MovingPositionCrossesCellBoundary(this)) 1026if (!TextRangeEditTables.IsTableCellRange((TextPointer)_anchorPosition, (TextPointer)((ITextSelection)this).MovingPosition, /*includeCellAtMovingPosition:*/false, out anchorCell, out movingCell)) 1140internal TextPointer AnchorPosition 1146return (TextPointer)((ITextSelection)this).AnchorPosition; 1153internal TextPointer MovingPosition 1159return (TextPointer)((ITextSelection)this).MovingPosition; 1166internal void SetCaretToPosition(TextPointer caretPosition, LogicalDirection direction, bool allowStopAtLineEnd, bool allowStopNearSpace) 1369TextPointer cellStart = table.RowGroups[0].Rows[0].Cells[0].ContentStart; 1401if (thisSelection.Start is TextPointer) 1429if (((ITextSelection)this).Start is TextPointer) 1431TextPointer start = this.Start; 1506if (((ITextSelection)this).Start is TextPointer) 1522if (!(((ITextSelection)this).Start is TextPointer)) 2378Block 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); 1252TextElement startElement = (TextElement)((TextPointer)start).Parent; 1253TextElement endElement = (TextElement)((TextPointer)end).Parent; 3367TextPointer start = startOut as TextPointer; 3376TextPointer end = (TextPointer)endOut; 3400TextPointer 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)
74internal 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);