73 instantiations of TextPointer
PresentationFramework (73)
MS\Internal\Documents\HostedElements.cs (2)
84_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 129_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer);
MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
126TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 157TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 158TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\PtsHost\FlowDocumentPage.cs (4)
333TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 945elementPosition = new TextPointer((e as TextElement).ElementStart); 959TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 972elementPosition = new TextPointer(searchPosition);
MS\Internal\Text\ComplexLine.cs (1)
288position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward);
System\Windows\Controls\AccessText.cs (5)
575TextPointer navigator = new TextPointer(TextContainer.Start); 603TextPointer underlineStart = new TextPointer(navigator, index); 620navigator = new TextPointer(TextContainer.Start); 633TextPointer keyStart = new TextPointer(navigator, 0); 634TextPointer keyEnd = new TextPointer(navigator, text.Length);
System\Windows\Controls\TextBlock.cs (5)
414position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 1773end = new TextPointer(((TextElement)child).ElementEnd); 1777end = new TextPointer(start); 3659position = new TextPointer((e as TextElement).ElementStart); 3665position = new TextPointer((TextPointer)_complexContent.TextContainer.Start);
System\Windows\Controls\TextBox.cs (3)
178TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 816TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 872TextPointer 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)
176_navigator = new TextPointer(_start);
System\Windows\Documents\TextContainer.cs (13)
447return new TextPointer(this, offset + 1, direction); 475return (node == null) ? null : new TextPointer(this, node, edge, direction); 863originalPosition = this.HasListeners ? new TextPointer(position, LogicalDirection.Backward) : null; 1118startEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart); 1126endEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeEnd); 1213insertPosition = new TextPointer(this, objectNode, ElementEdge.BeforeStart); 1271deletePosition = new TextPointer(startPosition, LogicalDirection.Forward); 1640startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 1671endPosition = new TextPointer(this, _rootNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 2793startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2798endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 3436TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3448TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart);
System\Windows\Documents\TextEffectResolver.cs (2)
49TextPointer effectStart = new TextPointer(startPosition); 67TextPointer continuousTextEnd = new TextPointer(effectStart);
System\Windows\Documents\TextElement.cs (9)
303TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 306TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 329elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 362contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 395contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 436elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 1009beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 1516tree.InsertTextInternal(new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd), textData); 1550position = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd);
System\Windows\Documents\TextElementEnumerator.cs (1)
135_navigator = new TextPointer(_start);
System\Windows\Documents\TextPointer.cs (7)
318return new TextPointer(this); 324return new TextPointer(this, gravity); 904TextPointer position = new TextPointer(this, direction); 1216TextPointer position = new TextPointer(this); 1346TextPointer deleteToPosition = new TextPointer(this, count); 1614TextPointer position = new TextPointer(this); 2587return new TextPointer(this, offset, gravity);
System\Windows\Documents\TextRangeEdit.cs (4)
65splitPosition = new TextPointer(splitPosition); 530position = new TextPointer(position); 1606TextPointer previousPosition = new TextPointer(start); 1610TextPointer nextPosition = new TextPointer(start);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
76navigator = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 476TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
62start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 63end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount - 2, LogicalDirection.Forward);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
55start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 64end = new TextPointer(this.TextContainer, element.TextElementNode, ElementEdge.AfterEnd);
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
55start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 56end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount, LogicalDirection.Forward);
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
51position = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward);
723 references to TextPointer
PresentationFramework (718)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (3)
129list.Add(((TextPointer)start).Parent); 134TextPointer current = (TextPointer)start.CreatePointer();
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
145if (!(start is TextPointer))
MS\Internal\Documents\FlowDocumentPaginator.cs (7)
229TextPointer flowContentPosition = contentPosition as TextPointer; 274TextPointer flowContentPosition; 286flowContentPosition = contentPosition as TextPointer; 401return (position is TextPointer) ? (ContentPosition)position : ContentPosition.Missing; 1009internal GetPageNumberAsyncRequest(TextPointer textPointer, object userState, FlowDocumentPaginator paginator) : base(userState, paginator) 1039internal readonly TextPointer TextPointer;
MS\Internal\Documents\HostedElements.cs (5)
82if (_textSegments[0].Start is TextPointer) 84_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 127if (_textSegments[_currentTextSegment].Start is TextPointer) 129_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer); 215TextPointer _currentPosition;
MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
126TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 157TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 158TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\Documents\TextDocumentView.cs (2)
1190else if (position is TextPointer && ((TextPointer)position).IsAtRowEnd)
MS\Internal\PtsHost\BreakRecordTable.cs (4)
118internal bool GetPageNumberForContentPosition(TextPointer contentPosition, ref int pageNumber) 252internal void UpdateEntry(int pageNumber, FlowDocumentPage page, PageBreakRecord brOut, TextPointer dependentMax) 439TextPointer dependentMax; 512public TextPointer DependentMax;
MS\Internal\PtsHost\ContainerParagraph.cs (5)
1051Invariant.Assert(textPointer is TextPointer); 1052Invariant.Assert(Element == ((TextPointer)textPointer).Parent); 1064Debug.Assert(textPointer is TextPointer); 1065TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 1113StructuralCache.CurrentFormatContext.DependentMax = (TextPointer) textPointer;
MS\Internal\PtsHost\FlowDocumentPage.cs (10)
325TextPointer elementStart = FindElementPosition(child, isLimitedToTextView); 333TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 756internal TextPointer DependentMax 929private TextPointer FindElementPosition(IInputElement e, bool isLimitedToTextView) 937TextPointer elementPosition = null; 952if (!(_structuralCache.TextContainer.Start is TextPointer) || 953!(_structuralCache.TextContainer.End is TextPointer)) 959TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 1123private TextPointer _DependentMax;
MS\Internal\PtsHost\Line.cs (2)
584TextPointer position; 608position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, cp, LogicalDirection.Forward) as TextPointer;
MS\Internal\PtsHost\ListParagraph.cs (7)
74Invariant.Assert(textPointer is TextPointer); 83TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 109if (((TextPointer)textPointer).IsFrozen) 120if (Element == ((TextPointer)textPointer).Parent) 124if (((TextPointer)textPointer).IsFrozen) 134if (((TextPointer)textPointer).IsFrozen) 145StructuralCache.CurrentFormatContext.DependentMax = (TextPointer)textPointer;
MS\Internal\PtsHost\StructuralCache.cs (1)
776internal TextPointer DependentMax { set { _owner._currentPage.DependentMax = value; } }
MS\Internal\PtsHost\TableParaClient.cs (1)
1141if(((TextPointer)position).CompareTo(row.ContentEnd) == 0)
MS\Internal\PtsHost\TextParaClient.cs (9)
682int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)position); 832Debug.Assert(position is TextPointer); 833int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 882Debug.Assert(position is TextPointer); 883int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 925Invariant.Assert(position is TextPointer); 926int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 1123int dcpStart = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)start) - Paragraph.ParagraphStartCharacterPosition; 1124int dcpEnd = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)end) - Paragraph.ParagraphStartCharacterPosition;
MS\Internal\PtsHost\TextParagraph.cs (2)
890TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 920TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\Text\ComplexLine.cs (1)
259TextPointer position;
System\Windows\Automation\Peers\ContentTextAutomationPeer.cs (4)
34public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) 53private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd)
System\Windows\Automation\Peers\TextAutomationPeer.cs (4)
33public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) 52private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd)
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
121TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward); 173private 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); 603TextPointer underlineStart = new TextPointer(navigator, index); 633TextPointer keyStart = new TextPointer(navigator, 0); 634TextPointer keyEnd = new TextPointer(navigator, text.Length); 724TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, TextContainer.End); 726((TextPointer)TextContainer.End).InsertTextElement(run);
System\Windows\Controls\FlowDocumentReader.cs (3)
2013TextPointer contentPosition = viewer.ContentPosition as TextPointer; 2042TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\FlowDocumentScrollViewer.cs (5)
903internal TextPointer ContentPosition 907TextPointer contentPosition = null; 911contentPosition = textView.GetTextPositionFromPoint(new Point(), true) as TextPointer; 1941TextPointer contentPosition = ContentPosition; 1967TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\Primitives\TextBoxBase.cs (4)
1534internal TextPointer GetTextPositionFromPointInternal(Point point, bool snapToText) 1536TextPointer position; 1548position = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, snapToText); 1579internal bool GetRectangleFromTextPosition(TextPointer position, out Rect rect)
System\Windows\Controls\RichTextBox.cs (8)
205public TextPointer GetPositionFromPoint(Point point, bool snapToText) 212return (TextPointer)GetTextPositionFromPointInternal(point, snapToText); 226public SpellingError GetSpellingError(TextPointer position) 245public TextRange GetSpellingErrorRange(TextPointer position) 271public TextPointer GetNextSpellingErrorPosition(TextPointer position, LogicalDirection direction) 275return (TextPointer)this.TextEditor.GetNextSpellingErrorPosition(position, direction); 567public TextPointer CaretPosition
System\Windows\Controls\SinglePageViewer.cs (5)
1025TextPointer textPointer = contentPosition as TextPointer; 1540TextPointer contentPosition = ContentPosition as TextPointer; 1566TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
System\Windows\Controls\TextBlock.cs (23)
170TextPointer endPosition = textContainer.End; 200TextPointer endPosition = textContainer.End; 396public TextPointer GetPositionFromPoint(Point point, bool snapToText) 398TextPointer position; 410position = (TextPointer)_complexContent.TextView.GetTextPositionFromPoint(point, snapToText); 414position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 451public TextPointer ContentStart 457return (TextPointer)_complexContent.TextContainer.Start; 468public TextPointer ContentEnd 474return (TextPointer)_complexContent.TextContainer.End; 1764TextPointer start = FindElementPosition((IInputElement)child); 1770TextPointer end = null; 2840if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2848Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent); 2850((TextPointer)position).InsertTextElement(implicitRun); 3643private TextPointer FindElementPosition(IInputElement e) 3651TextPointer position; 3665position = new TextPointer((TextPointer)_complexContent.TextContainer.Start); 3666while (position.CompareTo((TextPointer)_complexContent.TextContainer.End) < 0) 4117((TextContainer)text._complexContent.TextContainer).DeleteContentInternal((TextPointer)text._complexContent.TextContainer.Start, (TextPointer)text._complexContent.TextContainer.End);
System\Windows\Controls\TextBox.cs (34)
166TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward); 178TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 194this.TextContainer.DeleteContentInternal((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 213TextPointer textPointer = GetTextPositionFromPointInternal(point, snapToText); 244TextPointer textPointer = GetStartPositionOfLine(lineIndex); 269TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 299TextPointer textPointerStart = GetStartPositionOfLine(lineIndex); 300TextPointer textPointerEnd = GetEndPositionOfLine(lineIndex); 375TextPointer textPointer = GetStartPositionOfLine(lineIndex); 392TextPointer startOfLine; 393TextPointer endOfLine; 444TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 484TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 816TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 860TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward); 872TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward); 1078return new RangeContentEnumerator((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 1350internal TextPointer StartPosition 1354return (TextPointer)this.TextContainer.Start; 1361internal TextPointer EndPosition 1365return (TextPointer)this.TextContainer.End; 1409private bool GetRectangleFromTextPositionInternal(TextPointer position, bool relativeToTextBox, out Rect rect) 1430private TextPointer GetStartPositionOfLine(int lineIndex) 1444TextPointer textPointer; 1448textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1449textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).Start.CreatePointer(textPointer.LogicalDirection); 1459private TextPointer GetEndPositionOfLine(int lineIndex) 1473TextPointer textPointer; 1477textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1478textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).End.CreatePointer(textPointer.LogicalDirection); 1660TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, (TextPointer)TextContainer.End);
System\Windows\Documents\AnchoredBlock.cs (1)
47protected AnchoredBlock(Block block, TextPointer insertionPosition)
System\Windows\Documents\BlockUIContainer.cs (1)
83TextPointer 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)
57public Figure(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
System\Windows\Documents\FixedTextPointer.cs (5)
63/// <see cref="TextPointer.CompareTo"/> 80/// <see cref="TextPointer.CompareTo"/> 88/// <see cref="TextPointer.GetOffsetToPosition"/> 98/// <see cref="TextPointer.GetPointerContext"/> 107/// <see cref="TextPointer.GetTextRunLength"/>
System\Windows\Documents\Floater.cs (1)
64public 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)
45public TextPointer ResultStart 49return _ResultStart == null ? null : (TextPointer)_ResultStart.GetFrozenPointer(LogicalDirection.Backward); 56public TextPointer ResultEnd 60return _ResultEnd == null ? null : (TextPointer)_ResultEnd.GetFrozenPointer(LogicalDirection.Forward); 67public TextPointer CompositionStart 71return _CompositionStart == null ? null : (TextPointer)_CompositionStart.GetFrozenPointer(LogicalDirection.Backward); 78public TextPointer CompositionEnd 82return _CompositionEnd == null ? null : (TextPointer)_CompositionEnd.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\Hyperlink.cs (5)
85public Hyperlink(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 102public Hyperlink(TextPointer start, TextPointer end) : base(start, end) 106TextPointer navigator = this.ContentStart.CreatePointer(); 107TextPointer stop = this.ContentEnd;
System\Windows\Documents\InlineUIContainer.cs (2)
65public InlineUIContainer(UIElement childUIElement, TextPointer insertionPosition) 117TextPointer 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)
46/// <see cref="TextPointer.CompareTo"/> 62/// <see cref="TextPointer.GetOffsetToPosition"/>
System\Windows\Documents\RangeContentEnumerator.cs (5)
33internal RangeContentEnumerator(TextPointer start, TextPointer end) 367private readonly TextPointer _start; 368private readonly TextPointer _end; 374private TextPointer _navigator;
System\Windows\Documents\Run.cs (2)
57public Run(string text, TextPointer insertionPosition) 257TextPointer contentStart = run.ContentStart;
System\Windows\Documents\Span.cs (5)
56public Span(Inline childInline, TextPointer insertionPosition) 97public Span(TextPointer start, TextPointer end) 222private TextPointer SplitElement(TextPointer position)
System\Windows\Documents\Speller.cs (3)
869if (start is TextPointer) 871debugMessage += $"Xml = {new TextRange((TextPointer)start.TextContainer.Start, (TextPointer)start.TextContainer.End).Xml}";
System\Windows\Documents\TextContainer.cs (56)
214internal void SetValue(TextPointer position, DependencyProperty property, object value) 255internal void SetValues(TextPointer position, LocalValueEnumerator values) 442internal TextPointer CreatePointerAtOffset(int offset, LogicalDirection direction) 465internal TextPointer CreatePointerAtCharOffset(int charOffset, LogicalDirection direction) 519context = TextPointer.GetPointerContextForward(node, edge); 524context = TextPointer.GetPointerContextBackward(node, edge); 544offset = TextPointer.GetSymbolOffset(this, node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 564textNode = TextPointer.GetAdjacentTextNodeSibling(node, node.GetEdgeFromOffsetNoBias(nodeOffset), direction); 568return textNode == null ? 0 : TextPointer.GetTextInRun(this, textNode.GetSymbolOffset(this.Generation), textNode, nodeOffset, direction, textBuffer, startIndex, count); 583adjacentElement = TextPointer.GetAdjacentElement(node, node.GetEdgeFromOffset(nodeOffset, direction), direction); 601scopingNode = TextPointer.GetScopingNode(node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 653moved = TextPointer.GetNextNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 658moved = TextPointer.GetPreviousNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 759internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange) 766internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange, DependencyProperty property, bool affectsRenderOnly) 777internal void AddChange(TextPointer startPosition, TextPointer endPosition, 822internal void InsertTextInternal(TextPointer position, object text) 826TextPointer originalPosition; 937internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 942TextPointer startEdgePosition; 943TextPointer endEdgePosition; 1172internal void InsertEmbeddedObjectInternal(TextPointer position, DependencyObject embeddedObject) 1177TextPointer insertPosition; 1219internal void DeleteContentInternal(TextPointer startPosition, TextPointer endPosition) 1225TextPointer deletePosition; 1587internal bool IsAtCaretUnitBoundary(TextPointer position) 1605TextPointer positionForwardGravity = position.GetPositionAtOffset(0, LogicalDirection.Forward); 1629internal TextPointer Start 1633TextPointer startPosition; 1660internal TextPointer End 1664TextPointer endPosition; 2233private int InsertElementToSiblingTree(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode) 2267private int InsertElementToSiblingTreeComplex(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode, 2297private int DeleteContentFromSiblingTree(SplayTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, bool newFirstIMEVisibleNode, out int charCount) 2421private int CutTopLevelLogicalNodes(TextTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, out int charCount) 2431TextPointer newTreeStart; 2623private int CutContent(TextPointer startPosition, TextPointer endPosition, out int charCount, out SplayTreeNode leftSubTree, out SplayTreeNode middleSubTree, out SplayTreeNode rightSubTree) 2772TextPointer startPosition; 2773TextPointer endPosition; 3254private void ValidateSetValue(TextPointer position) 3359private void FireChangeEvent(TextPointer startPosition, TextPointer endPosition, int symbolCount, 3418private TextTreeTextElementNode GetNextIMEVisibleNode(TextPointer startPosition, TextPointer endPosition) 3436TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3448TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3512internal ExtractChangeEventArgs(TextContainer textTree, TextPointer startPosition, TextTreeTextElementNode node, 3582private readonly TextPointer _startPosition;
System\windows\Documents\TextEditorCharacters.cs (7)
138if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection.Start is TextPointer)) 148TextPointer startResetFormatPosition = (TextPointer)This.Selection.Start; 149TextPointer endResetFormatPosition = (TextPointer)This.Selection.End; 163startResetFormatPosition = (TextPointer)autoWordRange.Start; 164endResetFormatPosition = (TextPointer)autoWordRange.End;
System\windows\Documents\TextEditorContextMenu.cs (2)
83TextPointer start = GetContentPosition(This.Selection.Start) as TextPointer;
System\windows\Documents\TextEditorCopyPaste.cs (8)
894TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.Start); 895TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.End); 898TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.Start); 899TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.End); 953if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 959TextPointer start = TextRangeEditTables.EnsureInsertionPosition((TextPointer)This.Selection.Start); 963TextPointer end = start.GetPositionAtOffset(0, LogicalDirection.Forward);
System\windows\Documents\TextEditorLists.cs (1)
349TextPointer position = thisSelection.Start;
System\windows\Documents\TextEditorSpelling.cs (5)
143if (dontUseRange && textStart is TextPointer) 147((TextPointer)textStart).DeleteTextInRun(textStart.GetOffsetToPosition(textEnd)); 338if (selection.Start is TextPointer) 340isSelectionIgnoringErrors = ((TextPointer)selection.Start).ParentBlock != ((TextPointer)selection.End).ParentBlock;
System\windows\Documents\TextEditorTyping.cs (22)
566if (position is TextPointer && !IsAtListItemStart(deletePosition) && 567HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 645if (position is TextPointer && 646HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 739private static bool HandleDeleteWhenStructuralBoundaryIsCrossed(TextEditor This, TextPointer position, TextPointer deletePosition) 795if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position)) 797Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer; 885private static bool IsBlockUIContainerBoundaryCrossed(TextPointer position1, TextPointer position2) 1075if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 1119TextPointer newEnd = ((TextSelection)This.Selection).End; 1172Invariant.Assert(This.Selection.Start is TextPointer); 1173TextPointer position = (TextPointer)This.Selection.Start; 1203TextPointer newEnd = TextRangeEditTables.EnsureInsertionPosition(position); 1425TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1453TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1897TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false);
System\Windows\Documents\TextEffectResolver.cs (8)
41TextPointer startPosition, 42TextPointer endPosition, 49TextPointer effectStart = new TextPointer(startPosition); 67TextPointer continuousTextEnd = new TextPointer(effectStart); 73continuousTextEnd = (TextPointer)TextPointerBase.Min(continuousTextEnd, endPosition); 103private static void MoveToFirstCharacterSymbol(TextPointer navigator) 111TextPointer navigator, // navigator to move 112TextPointer stopHint // don't move further if we already pass beyond this point
System\Windows\Documents\TextElement.cs (17)
95internal void Reposition(TextPointer start, TextPointer end) 239internal void RepositionWithContent(TextPointer textPosition) 303TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 306TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 320public TextPointer ElementStart 325TextPointer elementStart; 353public TextPointer ContentStart 358TextPointer contentStart; 386public TextPointer ContentEnd 391TextPointer contentEnd; 413internal bool Contains(TextPointer position) 427public TextPointer ElementEnd 432TextPointer elementEnd; 998TextPointer beforeStart; 1539TextPointer position; 1564TextPointer start;
System\Windows\Documents\TextElementCollection.cs (4)
474TextPointer position; 579TextPointer position = (nextElement == null) ? this.ContentEnd : nextElement.ElementStart; 959private TextPointer ContentStart 970private TextPointer ContentEnd
System\Windows\Documents\TextElementEnumerator.cs (5)
34internal TextElementEnumerator(TextPointer start, TextPointer end) 258private readonly TextPointer _start; 259private readonly TextPointer _end; 265private TextPointer _navigator;
System\Windows\Documents\TextPointer.cs (63)
41/// a <see cref="TextPointer.GetOffsetToPosition"/> method).</para> 45/// <see cref="TextPointer.LogicalDirection"/> property.</para> 51/// get from a TextPointer using method <see cref="TextPointer.GetPointerContext"/>.</para> 67/// using traversal methods like <see cref="TextPointer.GetNextContextPosition"/>, 68/// <see cref="TextPointer.GetNextInsertionPosition"/>, <see cref="TextPointer.GetPositionAtOffset(int)"/>, 260internal TextPointer(TextPointer textPointer) 268internal TextPointer(TextPointer position, int offset) 276internal TextPointer(TextPointer position, LogicalDirection direction) 282internal TextPointer(TextPointer position, int offset, LogicalDirection direction) 316internal TextPointer CreatePointer() 322internal TextPointer CreatePointer(LogicalDirection gravity) 435public bool IsInSameDocument(TextPointer textPosition) 457/// text container as this TextPointer (you can use <see cref="TextPointer.IsInSameDocument"/> 460public int CompareTo(TextPointer position) 680public int GetOffsetToPosition(TextPointer position) 873public TextPointer GetPositionAtOffset(int offset) 900/// <para>See examples in <seealso cref="TextPointer.GetPositionAtOffset(int)"/> method with one parameter.</para> 902public TextPointer GetPositionAtOffset(int offset, LogicalDirection direction) 904TextPointer position = new TextPointer(this, direction); 990public TextPointer GetNextContextPosition(LogicalDirection direction) 992return (TextPointer)((ITextPointer)this).GetNextContextPosition(direction); 1063public TextPointer GetInsertionPosition(LogicalDirection direction) 1065return (TextPointer)((ITextPointer)this).GetInsertionPosition(direction); 1069internal TextPointer GetInsertionPosition() 1090/// "insertion position" in the <see cref="TextPointer.GetInsertionPosition(LogicalDirection)"/> 1130public TextPointer GetNextInsertionPosition(LogicalDirection direction) 1132return (TextPointer)((ITextPointer)this).GetNextInsertionPosition(direction); 1172public TextPointer GetLineStartPosition(int count) 1176TextPointer lineStartPosition = GetLineStartPosition(count, out actualCount); 1212public TextPointer GetLineStartPosition(int count, out int actualCount) 1216TextPointer position = new TextPointer(this); 1282TextPointer insertPosition; 1346TextPointer deleteToPosition = new TextPointer(this, count); 1418public TextPointer InsertParagraphBreak() 1440TextPointer position; 1463public TextPointer InsertLineBreak() 1468TextPointer position; 1614TextPointer position = new TextPointer(this); 1625if (position.CompareTo((TextPointer)lineRange.Start) <= 0) 1684/// <para>The <see cref="TextPointer.Parent"/> property for this 1689public TextPointer DocumentStart 1701/// <para>The <see cref="TextPointer.Parent"/> property for this 1706public TextPointer DocumentEnd 1854internal void MoveToPosition(TextPointer textPosition) 2339internal TextPointer GetFrozenPointer(LogicalDirection logicalDirection) 2345return (TextPointer)TextPointerBase.GetFrozenPointer(this, logicalDirection); 2355return CompareTo((TextPointer)position); 2385return GetOffsetToPosition((TextPointer)position); 2433TextPointer textPointer; 2439textPointer = (TextPointer)position; 2614MoveToPosition((TextPointer)position); 2681TextPointer position; 2704position = (TextPointer)_tree.TextView.GetNextCaretUnitPosition(this, oppositeDirection); 2716TextPointer position; 2733position = (TextPointer)_tree.TextView.GetNextCaretUnitPosition(this, direction); 2749TextPointer position; 2764position = (TextPointer)_tree.TextView.GetBackspaceCaretUnitPosition(this); 2793TextRangeEditTables.DeleteContent(this, (TextPointer)limit); 3543TextPointer position = this; 3580internal static DependencyObject GetCommonAncestor(TextPointer position1, TextPointer position2) 3893private void InitializeOffset(TextPointer position, int distance, LogicalDirection direction)
System\Windows\Documents\TextPointerBase.cs (3)
757internal static ListItem GetListItem(TextPointer pointer) 773internal static ListItem GetImmediateListItem(TextPointer position) 792internal static bool IsInEmptyListItem(TextPointer position)
System\Windows\Documents\TextRange.cs (27)
60public TextRange(TextPointer position1, TextPointer position2) : 82internal TextRange(TextPointer position1, TextPointer position2, bool useRestrictiveXamlXmlReader) : 386return _textSegments[0].Start is TextPointer; 652public bool Contains(TextPointer textPointer) 683public void Select(TextPointer position1, TextPointer position2) 698internal void SelectWord(TextPointer textPointer) 1265public TextPointer Start 1269return (TextPointer)((ITextRange)this).Start; 1279public TextPointer End 1283return (TextPointer)((ITextRange)this).End; 1318return ((TextPointer)this.Start).ContainingFrameworkElement; 1587TextPointer startPosition = TextRangeEditTables.EnsureInsertionPosition(this.Start); 1612TextPointer insertionPosition = TextRangeEdit.SplitFormattingElements(this.Start, /*keepEmptyFormatting:*/false); 1644TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1648TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1653TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1670TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1687TextRangeEdit.CharacterResetFormatting((TextPointer)this.Start, (TextPointer)this.End); 1707return TextRangeEditTables.InsertTable((TextPointer)this.End, rowCount, columnCount);
System\Windows\Documents\TextRangeBase.cs (38)
261if (thisRange.Start is TextPointer && 262(cell = TextRangeEditTables.GetTableCellFromPosition((TextPointer)thisRange.Start)) != null) 444if (pointer is TextPointer) // Implement only for concrete TextCotainer returning null otherwise - for optimization 446DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 721else if (typeof(List).IsAssignableFrom(elementType) && navigator is TextPointer) 827if (navigator is TextPointer) // can do somethinng useful only in concrete TextContainer - not in an abstract one 829List list = (List)((TextPointer)navigator).Parent; 1298if (thisRange.Start is TextPointer && 1299((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1300((TextPointer)thisRange.Start).Parent is Run && 1327TextContainer textContainer = ((TextPointer)thisRange.Start).TextContainer; 1328textContainer.DeleteContentInternal((TextPointer)thisRange.Start, (TextPointer)thisRange.End); 1335if (thisRange.Start is TextPointer) 1337TextRangeEdit.MergeFlowDirection((TextPointer)thisRange.Start); 1359bool implicitParagraphInserted = insertPosition is TextPointer && 1367if (insertPosition is TextPointer && explicitInsertPosition == null) 1369TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition((TextPointer)insertPosition); 1378if ((newStart is TextPointer) && ((TextPointer)newStart).Paragraph != null) 1381TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward); 1745if (start is TextPointer) 1747TextPointer adjustedStart = (TextPointer)start; 1748TextPointer adjustedEnd = (TextPointer)end; 1824internal static void NormalizeAnchoredBlockBoundaries(ref TextPointer start, ref TextPointer end) 1927Invariant.Assert(thisRange._TextSegments[0].Start is TextPointer); 1993if (position1 is TextPointer) 1996/*anchorPosition:*/(TextPointer)position1, 1997/*movingPosition:*/(TextPointer)position2, 2040if (position1 is TextPointer) 2053/*anchorPosition:*/(TextPointer)finalStart, 2054/*movingPosition:*/(TextPointer)finalEnd,
System\Windows\Documents\TextRangeEdit.cs (76)
31internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 51internal static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting) 56internal static TextPointer SplitFormattingElement(TextPointer splitPosition, bool keepEmptyFormatting) 164private static bool ExtractEmptyFormattingElements(TextPointer position) 228internal static void SetInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 256internal static bool MergeFormattingInlines(TextPointer position) 323private static void RemoveUnnecessarySpans(TextPointer position) 409internal static void CharacterResetFormatting(TextPointer start, TextPointer end) 437TextPointer mergePosition = parent.ElementStart; 524internal static TextPointer SplitElement(TextPointer position) 592internal static TextPointer InsertParagraphBreak(TextPointer position, bool moveIntoSecondParagraph) 635TextPointer breakPosition = position; 680internal static TextPointer InsertLineBreak(TextPointer position) 719internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value) 742internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 750end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(start, end); 786private static void SetParagraphPropertyWorker(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 807TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward; 809TextPointer contentEnd = block.ContentEnd; 969TextPointer start = firstChild.ElementStart.GetFrozenPointer(LogicalDirection.Backward); 970TextPointer end = lastChild.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 1027private static Block GetNextBlock(TextPointer pointer, TextPointer limit) 1267internal static void MergeFlowDirection(TextPointer position) 1299TextPointer previousPosition = position.CreatePointer(); 1308TextPointer nextPosition = position.CreatePointer(); 1345internal static bool CanApplyStructuralInlineProperty(TextPointer start, TextPointer end) 1347return ValidateApplyStructuralInlineProperty(start, end, TextPointer.GetCommonAncestor(start, end), null); 1417if (!(start is TextPointer)) 1424TextPointer startPosition = (TextPointer)start; 1425TextPointer endPosition = (TextPointer)end; 1512private static void MergeEmptyParagraphsAndBlockUIContainers(TextPointer startPosition, TextPointer endPosition) 1562private static void DeleteEquiScopedContent(TextPointer start, TextPointer end) 1606TextPointer previousPosition = new TextPointer(start); 1610TextPointer nextPosition = new TextPointer(start); 1689private static bool DeleteContentBetweenPositions(TextPointer one, TextPointer two) 1717private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1748private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1871private static void SetNonStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 1895TextPointer nextRunPosition = run.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 1946private static void SetStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 1948DependencyObject commonAncestor = TextPointer.GetCommonAncestor(start, end); 2053TextPointer end = SplitFormattingElements(child.ElementEnd, /*keepEmptyFormatting*/false, limit); 2079private static Run GetNextRun(TextPointer pointer, TextPointer limit) 2109private static void ClearPropertyValueFromSpansAndRuns(TextPointer start, TextPointer end, DependencyProperty formattingProperty) 2134private static void ApplyStructuralInlinePropertyAcrossRun(TextPointer start, TextPointer end, Run run, DependencyProperty formattingProperty, object value) 2159private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value) 2216private static void ApplyStructuralInlinePropertyAcrossParagraphs(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 2256private static bool ValidateApplyStructuralInlineProperty(TextPointer start, TextPointer end, DependencyObject commonAncestor, DependencyProperty property)
System\Windows\Documents\TextRangeEditLists.cs (25)
97TextPointer positionAfterSecondParagraph = secondParagraphOrBlockUIContainer.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 136TextPointer inlineMergingPosition = secondParagraphOrBlockUIContainer.ElementStart; 171internal static bool MergeListsAroundNormalizedPosition(TextPointer mergePosition) 174TextPointer navigator = mergePosition.CreatePointer(); 209internal static bool MergeLists(TextPointer mergePosition) 247TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 272TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.Start); 278TextPointer 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)
49if (!(range.Start is TextPointer)) 57if (table != GetTableFromPosition((TextPointer)range.TextSegments[0].Start)) 62TableCell firstCell = GetTableCellFromPosition((TextPointer)range.TextSegments[0].Start); 69TextPointer lastCellPointer = (TextPointer)range.TextSegments[0].End.GetNextInsertionPosition(LogicalDirection.Backward); 110internal static Table GetTableFromPosition(TextPointer position) 122private static TableRow GetTableRowFromPosition(TextPointer position) 134internal static TableCell GetTableCellFromPosition(TextPointer position) 182if (!(anchorPosition is TextPointer) || !(movingPosition is TextPointer)) 197TextPointer)anchorPosition, (TextPointer)movingPosition, 228TextPointer anchorPosition, TextPointer movingPosition, 283TextPointer anchorPosition, TextPointer movingPosition, 374TextPointer anchorPosition, TextPointer movingPosition, 430internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 434TextPointer movingPosition = selection.MovingPosition; 440if (TextRangeEditTables.IsTableCellRange(selection.AnchorPosition, (TextPointer)movingPosition, 560internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 578Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 589internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction) 592Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 630internal static Table InsertTable(TextPointer insertionPosition, int rowCount, int columnCount) 709internal static TextPointer EnsureInsertionPosition(TextPointer position) 775internal static TextPointer GetAdjustedRowEndPosition(Table currentTable, TextPointer rowEndPosition) 777TextPointer position; 780TextPointer nextInsertionPosition = rowEndPosition; 808private static TextPointer CreateInsertionPositionInIncompleteContent(TextPointer position) 873TextPointer insertionPosition; 888private static TextPointer CreateImplicitRun(TextPointer position) 890TextPointer insertionPosition; 915private static TextPointer CreateImplicitParagraph(TextPointer position) 917TextPointer insertionPosition; 936internal static void DeleteContent(TextPointer start, TextPointer end) 942TextPointer whatWasEnd = end; 1076TableCell cell = GetTableCellFromPosition((TextPointer)textSegment.Start); 1077TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1083TextPointer cellEnd = cell.ElementEnd; 1122TextPointer currentRowPosition = rowCount > 0 ? textRange.End : textRange.Start; 1960private static TextSegment NewNormalizedTextSegment(TextPointer startPosition, TextPointer endPosition) 1990TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward); 1994TextPointer end = endCell.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward); 2043TextPointer anchorPosition, TextPointer movingPosition, 2129TextPointer anchorPosition, TextPointer movingPosition, 2168TextPointer position,
System\Windows\Documents\TextRangeSerialization.cs (19)
598if (elementTypeStandardized == typeof(Table) && textReader is TextPointer) 601WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 703WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 956TextPointer textPointer = context as TextPointer; 1267TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.End); 1300private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1302TextPointer fragmentStart; 1303TextPointer fragmentEnd; 1410private static bool SplitParagraphForPasting(ref TextPointer insertionPosition) 1418TextPointer positionBeforeParagraph = insertionPosition; 1458private static void MergeParagraphsAtPosition(TextPointer position, bool mergingOnFragmentStart) 1460TextPointer navigator = position; 1513private static void ValidateMergingPositions(Type itemType, TextPointer start, TextPointer end) 1561private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1604private static void ApplyContextualProperty(Type targetType, TextPointer start, TextPointer end, DependencyProperty property, object value)
System\Windows\Documents\TextSchema.cs (4)
152internal static bool IsValidChild(TextPointer position, Type childType) 157internal static bool ValidateChild(TextPointer position, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 889TextPointer start = element.ElementStart; 890TextPointer end = element.ElementEnd;
System\windows\Documents\TextSelection.cs (17)
601else if (movingPosition is TextPointer && TextPointerBase.IsAtRowEnd(movingPosition)) 607else if (movingPosition is TextPointer && TextRangeEditTables.MovingPositionCrossesCellBoundary(this)) 1044if (!TextRangeEditTables.IsTableCellRange((TextPointer)_anchorPosition, (TextPointer)((ITextSelection)this).MovingPosition, /*includeCellAtMovingPosition:*/false, out anchorCell, out movingCell)) 1158internal TextPointer AnchorPosition 1164return (TextPointer)((ITextSelection)this).AnchorPosition; 1171internal TextPointer MovingPosition 1177return (TextPointer)((ITextSelection)this).MovingPosition; 1184internal void SetCaretToPosition(TextPointer caretPosition, LogicalDirection direction, bool allowStopAtLineEnd, bool allowStopNearSpace) 1387TextPointer cellStart = table.RowGroups[0].Rows[0].Cells[0].ContentStart; 1419if (thisSelection.Start is TextPointer) 1447if (((ITextSelection)this).Start is TextPointer) 1449TextPointer start = this.Start; 1524if (((ITextSelection)this).Start is TextPointer) 1540if (!(((ITextSelection)this).Start is TextPointer)) 2396Block paragraphOrBlockUIContainer = (caretPosition is TextPointer) ? ((TextPointer)caretPosition).ParagraphOrBlockUIContainer : null;
System\Windows\Documents\TextStore.cs (9)
439Invariant.Assert(navigator is TextPointer); 440TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 1266TextElement startElement = (TextElement)((TextPointer)start).Parent; 1267TextElement endElement = (TextElement)((TextPointer)end).Parent; 3394TextPointer start = startOut as TextPointer; 3403TextPointer end = (TextPointer)endOut; 3427TextPointer previousPosition = start.GetNextInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (9)
33internal TextTreeDeleteContentUndoUnit(TextContainer tree, TextPointer start, TextPointer end) : base(tree, start.GetSymbolOffset()) 70TextPointer navigator; 306internal abstract void Do(TextPointer navigator); 330internal override void Do(TextPointer navigator) 359internal override void Do(TextPointer navigator) 418internal override void Do(TextPointer navigator) 470internal override void Do(TextPointer navigator) 476TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeDumper.cs (1)
98internal static void Dump(TextPointer position)
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
56TextPointer start; 57TextPointer end;
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
49TextPointer start; 50TextPointer end;
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
50TextPointer start; 51TextPointer end;
System\Windows\Documents\TextTreeNode.cs (1)
465internal void InsertAtPosition(TextPointer position)
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
47TextPointer 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)
99internal static void ValidateChild(TextPointer position, object child, string paramName)
System.Windows.Controls.Ribbon (5)
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (5)
291TextPointer secondLinePointer = _textBlock1.ContentStart; 339private void MeasureWithConstraint(Size availableSize, out TextPointer secondLinePointer) 373private void MeasureWithoutConstraint(out TextPointer secondLinePointer) 403TextPointer currentLinePointer = _textBlock1.ContentStart.GetLineStartPosition(2); 410TextPointer nextLinePointer = currentLinePointer.GetLineStartPosition(1);