73 instantiations of TextPointer
PresentationFramework (73)
src\Framework\MS\Internal\Documents\HostedElements.cs (2)
92_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 137_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer);
src\Framework\MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
128TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 162TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 163TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (4)
335TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 967elementPosition = new TextPointer((e as TextElement).ElementStart); 981TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 994elementPosition = new TextPointer(searchPosition);
src\Framework\MS\Internal\Text\ComplexLine.cs (1)
292position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward);
src\Framework\System\Windows\Controls\AccessText.cs (5)
575TextPointer navigator = new TextPointer(TextContainer.Start); 603TextPointer underlineStart = new TextPointer(navigator, index); 621navigator = new TextPointer(TextContainer.Start); 634TextPointer keyStart = new TextPointer(navigator, 0); 635TextPointer keyEnd = new TextPointer(navigator, text.Length);
src\Framework\System\Windows\Controls\TextBlock.cs (5)
432position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 1861end = new TextPointer(((TextElement)child).ElementEnd); 1865end = new TextPointer(start); 3648position = new TextPointer((e as TextElement).ElementStart); 3654position = new TextPointer((TextPointer)_complexContent.TextContainer.Start);
src\Framework\System\Windows\Controls\TextBox.cs (3)
191TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 848TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 907TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward);
src\Framework\System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
52textPointerTable = new TextPointer(_textContainer.Start, _cpTable, LogicalDirection.Forward);
src\Framework\System\Windows\Documents\FlowDocument.cs (2)
969TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 971TextPointer childEnd = new TextPointer(childStart);
src\Framework\System\Windows\Documents\List.cs (1)
200TextPointer textNav = new TextPointer(this.ContentStart);
src\Framework\System\Windows\Documents\RangeContentEnumerator.cs (1)
184_navigator = new TextPointer(_start);
src\Framework\System\Windows\Documents\TextContainer.cs (13)
462return new TextPointer(this, offset + 1, direction); 490return (node == null) ? null : new TextPointer(this, node, edge, direction); 878originalPosition = this.HasListeners ? new TextPointer(position, LogicalDirection.Backward) : null; 1133startEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart); 1141endEdgePosition = new TextPointer(this, elementNode, ElementEdge.BeforeEnd); 1228insertPosition = new TextPointer(this, objectNode, ElementEdge.BeforeStart); 1286deletePosition = new TextPointer(startPosition, LogicalDirection.Forward); 1655startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 1686endPosition = new TextPointer(this, _rootNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 2808startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2813endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 3452TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3464TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart);
src\Framework\System\Windows\Documents\TextEffectResolver.cs (2)
58TextPointer effectStart = new TextPointer(startPosition); 76TextPointer continuousTextEnd = new TextPointer(effectStart);
src\Framework\System\Windows\Documents\TextElement.cs (9)
308TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 311TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 334elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 367contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 400contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 441elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward); 1054beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 1564tree.InsertTextInternal(new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd), textData); 1601position = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd);
src\Framework\System\Windows\Documents\TextElementEnumerator.cs (1)
141_navigator = new TextPointer(_start);
src\Framework\System\Windows\Documents\TextPointer.cs (7)
326return new TextPointer(this); 332return new TextPointer(this, gravity); 915TextPointer position = new TextPointer(this, direction); 1227TextPointer position = new TextPointer(this); 1360TextPointer deleteToPosition = new TextPointer(this, count); 1628TextPointer position = new TextPointer(this); 2613return new TextPointer(this, offset, gravity);
src\Framework\System\Windows\Documents\TextRangeEdit.cs (4)
67splitPosition = new TextPointer(splitPosition); 532position = new TextPointer(position); 1608TextPointer previousPosition = new TextPointer(start); 1612TextPointer nextPosition = new TextPointer(start);
src\Framework\System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
82navigator = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 499TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
src\Framework\System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
65start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 66end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount - 2, LogicalDirection.Forward);
src\Framework\System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
58start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 67end = new TextPointer(this.TextContainer, element.TextElementNode, ElementEdge.AfterEnd);
src\Framework\System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
58start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 59end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount, LogicalDirection.Forward);
src\Framework\System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
57position = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward);
701 references to TextPointer
PresentationFramework (701)
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (3)
133list.Add(((TextPointer)start).Parent); 138TextPointer current = (TextPointer)start.CreatePointer();
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
155if (!(start is TextPointer))
src\Framework\MS\Internal\Documents\FlowDocumentPaginator.cs (7)
237TextPointer flowContentPosition = contentPosition as TextPointer; 282TextPointer flowContentPosition; 297flowContentPosition = contentPosition as TextPointer; 415return (position is TextPointer) ? (ContentPosition)position : ContentPosition.Missing; 1026internal GetPageNumberAsyncRequest(TextPointer textPointer, object userState, FlowDocumentPaginator paginator) : base(userState, paginator) 1056internal readonly TextPointer TextPointer;
src\Framework\MS\Internal\Documents\HostedElements.cs (5)
90if (_textSegments[0].Start is TextPointer) 92_currentPosition = new TextPointer(_textSegments[0].Start as TextPointer); 135if (_textSegments[_currentTextSegment].Start is TextPointer) 137_currentPosition = new TextPointer(_textSegments[_currentTextSegment].Start as TextPointer); 223TextPointer _currentPosition;
src\Framework\MS\Internal\Documents\TableTextElementCollectionInternal.cs (3)
128TextPointer insertPosition = new TextPointer(itemInsert.ContentStart, -1); 162TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 163TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
src\Framework\MS\Internal\Documents\TextDocumentView.cs (2)
1198else if (position is TextPointer && ((TextPointer)position).IsAtRowEnd)
src\Framework\MS\Internal\PtsHost\BreakRecordTable.cs (4)
120internal bool GetPageNumberForContentPosition(TextPointer contentPosition, ref int pageNumber) 254internal void UpdateEntry(int pageNumber, FlowDocumentPage page, PageBreakRecord brOut, TextPointer dependentMax) 441TextPointer dependentMax; 514public TextPointer DependentMax;
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (5)
1077Invariant.Assert(textPointer is TextPointer); 1078Invariant.Assert(Element == ((TextPointer)textPointer).Parent); 1090Debug.Assert(textPointer is TextPointer); 1091TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 1139StructuralCache.CurrentFormatContext.DependentMax = (TextPointer) textPointer;
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (10)
327TextPointer elementStart = FindElementPosition(child, isLimitedToTextView); 335TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 777internal TextPointer DependentMax 951private TextPointer FindElementPosition(IInputElement e, bool isLimitedToTextView) 959TextPointer elementPosition = null; 974if (!(_structuralCache.TextContainer.Start is TextPointer) || 975!(_structuralCache.TextContainer.End is TextPointer)) 981TextPointer searchPosition = new TextPointer(_structuralCache.TextContainer.Start as TextPointer); 1145private TextPointer _DependentMax;
src\Framework\MS\Internal\PtsHost\Line.cs (2)
587TextPointer position; 611position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, cp, LogicalDirection.Forward) as TextPointer;
src\Framework\MS\Internal\PtsHost\ListParagraph.cs (7)
78Invariant.Assert(textPointer is TextPointer); 87TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 115if (((TextPointer)textPointer).IsFrozen) 126if (Element == ((TextPointer)textPointer).Parent) 130if (((TextPointer)textPointer).IsFrozen) 140if (((TextPointer)textPointer).IsFrozen) 151StructuralCache.CurrentFormatContext.DependentMax = (TextPointer)textPointer;
src\Framework\MS\Internal\PtsHost\StructuralCache.cs (1)
780internal TextPointer DependentMax { set { _owner._currentPage.DependentMax = value; } }
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (1)
1228if(((TextPointer)position).CompareTo(row.ContentEnd) == 0)
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (9)
782int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)position); 951Debug.Assert(position is TextPointer); 952int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 1011Debug.Assert(position is TextPointer); 1012int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 1064Invariant.Assert(position is TextPointer); 1065int cp = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition(position as TextPointer); 1280int dcpStart = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)start) - Paragraph.ParagraphStartCharacterPosition; 1281int dcpEnd = Paragraph.StructuralCache.TextContainer.Start.GetOffsetToPosition((TextPointer)end) - Paragraph.ParagraphStartCharacterPosition;
src\Framework\MS\Internal\PtsHost\TextParagraph.cs (2)
897TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 927TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
src\Framework\MS\Internal\Text\ComplexLine.cs (1)
262TextPointer position;
src\Framework\System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
135TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward); 187private Rect CalculateVisibleRect(ITextView textView, TextElement textElement, TextPointer startPointer, TextPointer endPointer)
src\Framework\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); 634TextPointer keyStart = new TextPointer(navigator, 0); 635TextPointer keyEnd = new TextPointer(navigator, text.Length); 726TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, TextContainer.End); 728((TextPointer)TextContainer.End).InsertTextElement(run);
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (3)
2019TextPointer contentPosition = viewer.ContentPosition as TextPointer; 2048TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (5)
909internal TextPointer ContentPosition 913TextPointer contentPosition = null; 917contentPosition = textView.GetTextPositionFromPoint(new Point(), true) as TextPointer; 1955TextPointer contentPosition = ContentPosition; 1981TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
src\Framework\System\Windows\Controls\Primitives\TextBoxBase.cs (4)
1560internal TextPointer GetTextPositionFromPointInternal(Point point, bool snapToText) 1562TextPointer position; 1574position = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, snapToText); 1605internal bool GetRectangleFromTextPosition(TextPointer position, out Rect rect)
src\Framework\System\Windows\Controls\RichTextBox.cs (8)
213public TextPointer GetPositionFromPoint(Point point, bool snapToText) 220return (TextPointer)GetTextPositionFromPointInternal(point, snapToText); 234public SpellingError GetSpellingError(TextPointer position) 253public TextRange GetSpellingErrorRange(TextPointer position) 279public TextPointer GetNextSpellingErrorPosition(TextPointer position, LogicalDirection direction) 283return (TextPointer)this.TextEditor.GetNextSpellingErrorPosition(position, direction); 578public TextPointer CaretPosition
src\Framework\System\Windows\Controls\SinglePageViewer.cs (5)
1032TextPointer textPointer = contentPosition as TextPointer; 1547TextPointer contentPosition = ContentPosition as TextPointer; 1573TextPointer contentPosition = textContainer.CreatePointerAtOffset(viewerState.ContentPosition, viewerState.ContentPositionDirection);
src\Framework\System\Windows\Controls\TextBlock.cs (23)
179TextPointer endPosition = textContainer.End; 212TextPointer endPosition = textContainer.End; 414public TextPointer GetPositionFromPoint(Point point, bool snapToText) 416TextPointer position; 428position = (TextPointer)_complexContent.TextView.GetTextPositionFromPoint(point, snapToText); 432position = snapToText ? new TextPointer((TextPointer)_complexContent.TextContainer.Start) : null; 469public TextPointer ContentStart 475return (TextPointer)_complexContent.TextContainer.Start; 486public TextPointer ContentEnd 492return (TextPointer)_complexContent.TextContainer.End; 1852TextPointer start = FindElementPosition((IInputElement)child); 1858TextPointer end = null; 2929if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2937Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent); 2939((TextPointer)position).InsertTextElement(implicitRun); 3632private TextPointer FindElementPosition(IInputElement e) 3640TextPointer position; 3654position = new TextPointer((TextPointer)_complexContent.TextContainer.Start); 3655while (position.CompareTo((TextPointer)_complexContent.TextContainer.End) < 0) 4106((TextContainer)text._complexContent.TextContainer).DeleteContentInternal((TextPointer)text._complexContent.TextContainer.Start, (TextPointer)text._complexContent.TextContainer.End);
src\Framework\System\Windows\Controls\TextBox.cs (34)
179TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward); 191TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 207this.TextContainer.DeleteContentInternal((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 226TextPointer textPointer = GetTextPositionFromPointInternal(point, snapToText); 259TextPointer textPointer = GetStartPositionOfLine(lineIndex); 286TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 318TextPointer textPointerStart = GetStartPositionOfLine(lineIndex); 319TextPointer textPointerEnd = GetEndPositionOfLine(lineIndex); 396TextPointer textPointer = GetStartPositionOfLine(lineIndex); 413TextPointer startOfLine; 414TextPointer endOfLine; 469TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 511TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 848TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 895TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward); 907TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward); 1069return new RangeContentEnumerator((TextPointer)this.TextContainer.Start, (TextPointer)this.TextContainer.End); 1342internal TextPointer StartPosition 1346return (TextPointer)this.TextContainer.Start; 1353internal TextPointer EndPosition 1357return (TextPointer)this.TextContainer.End; 1401private bool GetRectangleFromTextPositionInternal(TextPointer position, bool relativeToTextBox, out Rect rect) 1422private TextPointer GetStartPositionOfLine(int lineIndex) 1436TextPointer textPointer; 1440textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1441textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).Start.CreatePointer(textPointer.LogicalDirection); 1451private TextPointer GetEndPositionOfLine(int lineIndex) 1465TextPointer textPointer; 1469textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetTextPositionFromPoint(point, /* snap to text */ true); 1470textPointer = (TextPointer)TextEditor.GetTextView(this.RenderScope).GetLineRange(textPointer).End.CreatePointer(textPointer.LogicalDirection); 1653TextContainer.DeleteContentInternal((TextPointer)TextContainer.Start, (TextPointer)TextContainer.End);
src\Framework\System\Windows\Documents\AnchoredBlock.cs (1)
47protected AnchoredBlock(Block block, TextPointer insertionPosition)
src\Framework\System\Windows\Documents\BlockUIContainer.cs (1)
86TextPointer contentStart = this.ContentStart;
src\Framework\System\Windows\Documents\Bold.cs (3)
69public Bold(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 86public Bold(TextPointer start, TextPointer end) : base(start, end)
src\Framework\System\Windows\Documents\ColumnResizeUndoUnit.cs (2)
24internal ColumnResizeUndoUnit(TextPointer textPointerTable, int columnIndex, double[] columnWidths, double resizeAmount) : base("ColumnResize") 46TextPointer textPointerTable;
src\Framework\System\Windows\Documents\Figure.cs (1)
57public Figure(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
src\Framework\System\Windows\Documents\FixedTextPointer.cs (5)
69/// <see cref="TextPointer.CompareTo"/> 86/// <see cref="TextPointer.CompareTo"/> 94/// <see cref="TextPointer.GetOffsetToPosition"/> 104/// <see cref="TextPointer.GetPointerContext"/> 113/// <see cref="TextPointer.GetTextRunLength"/>
src\Framework\System\Windows\Documents\Floater.cs (1)
64public Floater(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
src\Framework\System\Windows\Documents\FlowDocument.cs (6)
179public TextPointer ContentStart 194public TextPointer ContentEnd 892TextPointer flowContentPosition; 937flowContentPosition = textPointer as TextPointer; 969TextPointer childStart = new TextPointer(_structuralCache.TextContainer.Start); 971TextPointer childEnd = new TextPointer(childStart);
src\Framework\System\Windows\Documents\FrameworkRichTextComposition.cs (8)
51public TextPointer ResultStart 55return _ResultStart == null ? null : (TextPointer)_ResultStart.GetFrozenPointer(LogicalDirection.Backward); 62public TextPointer ResultEnd 66return _ResultEnd == null ? null : (TextPointer)_ResultEnd.GetFrozenPointer(LogicalDirection.Forward); 73public TextPointer CompositionStart 77return _CompositionStart == null ? null : (TextPointer)_CompositionStart.GetFrozenPointer(LogicalDirection.Backward); 84public TextPointer CompositionEnd 88return _CompositionEnd == null ? null : (TextPointer)_CompositionEnd.GetFrozenPointer(LogicalDirection.Forward);
src\Framework\System\Windows\Documents\Hyperlink.cs (5)
87public Hyperlink(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 104public Hyperlink(TextPointer start, TextPointer end) : base(start, end) 108TextPointer navigator = this.ContentStart.CreatePointer(); 109TextPointer stop = this.ContentEnd;
src\Framework\System\Windows\Documents\InlineUIContainer.cs (2)
65public InlineUIContainer(UIElement childUIElement, TextPointer insertionPosition) 117TextPointer contentStart = this.ContentStart;
src\Framework\System\Windows\Documents\Italic.cs (3)
69public Italic(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 86public Italic(TextPointer start, TextPointer end) : base(start, end)
src\Framework\System\Windows\Documents\LineBreak.cs (1)
38public LineBreak(TextPointer insertionPosition)
src\Framework\System\Windows\Documents\List.cs (1)
200TextPointer textNav = new TextPointer(this.ContentStart);
src\Framework\System\Windows\Documents\NullTextNavigator.cs (2)
48/// <see cref="TextPointer.CompareTo"/> 64/// <see cref="TextPointer.GetOffsetToPosition"/>
src\Framework\System\Windows\Documents\RangeContentEnumerator.cs (5)
41internal RangeContentEnumerator(TextPointer start, TextPointer end) 375private readonly TextPointer _start; 376private readonly TextPointer _end; 382private TextPointer _navigator;
src\Framework\System\Windows\Documents\Run.cs (2)
57public Run(string text, TextPointer insertionPosition) 257TextPointer contentStart = run.ContentStart;
src\Framework\System\Windows\Documents\Span.cs (5)
56public Span(Inline childInline, TextPointer insertionPosition) 97public Span(TextPointer start, TextPointer end) 228private TextPointer SplitElement(TextPointer position)
src\Framework\System\Windows\Documents\Speller.cs (3)
924if (start is TextPointer) 926debugMessage += "Xml = " + new TextRange((TextPointer)start.TextContainer.Start, (TextPointer)start.TextContainer.End).Xml;
src\Framework\System\Windows\Documents\TextContainer.cs (56)
220internal void SetValue(TextPointer position, DependencyProperty property, object value) 267internal void SetValues(TextPointer position, LocalValueEnumerator values) 457internal TextPointer CreatePointerAtOffset(int offset, LogicalDirection direction) 480internal TextPointer CreatePointerAtCharOffset(int charOffset, LogicalDirection direction) 534context = TextPointer.GetPointerContextForward(node, edge); 539context = TextPointer.GetPointerContextBackward(node, edge); 559offset = TextPointer.GetSymbolOffset(this, node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 579textNode = TextPointer.GetAdjacentTextNodeSibling(node, node.GetEdgeFromOffsetNoBias(nodeOffset), direction); 583return textNode == null ? 0 : TextPointer.GetTextInRun(this, textNode.GetSymbolOffset(this.Generation), textNode, nodeOffset, direction, textBuffer, startIndex, count); 598adjacentElement = TextPointer.GetAdjacentElement(node, node.GetEdgeFromOffset(nodeOffset, direction), direction); 616scopingNode = TextPointer.GetScopingNode(node, node.GetEdgeFromOffsetNoBias(nodeOffset)); 668moved = TextPointer.GetNextNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 673moved = TextPointer.GetPreviousNodeAndEdge(node, edge, this.PlainTextOnly, out node, out edge); 774internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange) 781internal void AddChange(TextPointer startPosition, int symbolCount, int charCount, PrecursorTextChangeType textChange, DependencyProperty property, bool affectsRenderOnly) 792internal void AddChange(TextPointer startPosition, TextPointer endPosition, 837internal void InsertTextInternal(TextPointer position, object text) 841TextPointer originalPosition; 952internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 957TextPointer startEdgePosition; 958TextPointer endEdgePosition; 1187internal void InsertEmbeddedObjectInternal(TextPointer position, DependencyObject embeddedObject) 1192TextPointer insertPosition; 1234internal void DeleteContentInternal(TextPointer startPosition, TextPointer endPosition) 1240TextPointer deletePosition; 1602internal bool IsAtCaretUnitBoundary(TextPointer position) 1620TextPointer positionForwardGravity = position.GetPositionAtOffset(0, LogicalDirection.Forward); 1644internal TextPointer Start 1648TextPointer startPosition; 1675internal TextPointer End 1679TextPointer endPosition; 2248private int InsertElementToSiblingTree(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode) 2282private int InsertElementToSiblingTreeComplex(TextPointer startPosition, TextPointer endPosition, TextTreeTextElementNode elementNode, 2312private int DeleteContentFromSiblingTree(SplayTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, bool newFirstIMEVisibleNode, out int charCount) 2436private int CutTopLevelLogicalNodes(TextTreeNode containingNode, TextPointer startPosition, TextPointer endPosition, out int charCount) 2446TextPointer newTreeStart; 2638private int CutContent(TextPointer startPosition, TextPointer endPosition, out int charCount, out SplayTreeNode leftSubTree, out SplayTreeNode middleSubTree, out SplayTreeNode rightSubTree) 2787TextPointer startPosition; 2788TextPointer endPosition; 3270private void ValidateSetValue(TextPointer position) 3375private void FireChangeEvent(TextPointer startPosition, TextPointer endPosition, int symbolCount, 3434private TextTreeTextElementNode GetNextIMEVisibleNode(TextPointer startPosition, TextPointer endPosition) 3452TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3464TextPointer startEdgePosition = new TextPointer(this, node, ElementEdge.BeforeStart); 3528internal ExtractChangeEventArgs(TextContainer textTree, TextPointer startPosition, TextTreeTextElementNode node, 3598private readonly TextPointer _startPosition;
src\Framework\System\windows\Documents\TextEditorCharacters.cs (7)
140if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection.Start is TextPointer)) 150TextPointer startResetFormatPosition = (TextPointer)This.Selection.Start; 151TextPointer endResetFormatPosition = (TextPointer)This.Selection.End; 165startResetFormatPosition = (TextPointer)autoWordRange.Start; 166endResetFormatPosition = (TextPointer)autoWordRange.End;
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (2)
92TextPointer start = GetContentPosition(This.Selection.Start) as TextPointer;
src\Framework\System\windows\Documents\TextEditorCopyPaste.cs (8)
1070TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.Start); 1071TextRangeEditLists.MergeListsAroundNormalizedPosition((TextPointer)This.Selection.End); 1074TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.Start); 1075TextRangeEdit.MergeFlowDirection((TextPointer)This.Selection.End); 1130if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 1136TextPointer start = TextRangeEditTables.EnsureInsertionPosition((TextPointer)This.Selection.Start); 1140TextPointer end = start.GetPositionAtOffset(0, LogicalDirection.Forward);
src\Framework\System\windows\Documents\TextEditorLists.cs (1)
351TextPointer position = thisSelection.Start;
src\Framework\System\windows\Documents\TextEditorSpelling.cs (5)
145if (dontUseRange && textStart is TextPointer) 149((TextPointer)textStart).DeleteTextInRun(textStart.GetOffsetToPosition(textEnd)); 340if (selection.Start is TextPointer) 342isSelectionIgnoringErrors = ((TextPointer)selection.Start).ParentBlock != ((TextPointer)selection.End).ParentBlock;
src\Framework\System\windows\Documents\TextEditorTyping.cs (22)
582if (position is TextPointer && !IsAtListItemStart(deletePosition) && 583HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 661if (position is TextPointer && 662HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) 755private static bool HandleDeleteWhenStructuralBoundaryIsCrossed(TextEditor This, TextPointer position, TextPointer deletePosition) 812if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position)) 814Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer; 902private static bool IsBlockUIContainerBoundaryCrossed(TextPointer position1, TextPointer position2) 1092if (This.AcceptsRichContent && This.Selection.Start is TextPointer) 1136TextPointer newEnd = ((TextSelection)This.Selection).End; 1189Invariant.Assert(This.Selection.Start is TextPointer); 1190TextPointer position = (TextPointer)This.Selection.Start; 1220TextPointer newEnd = TextRangeEditTables.EnsureInsertionPosition(position); 1442TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1470TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1927TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false);
src\Framework\System\Windows\Documents\TextEffectResolver.cs (8)
49TextPointer startPosition, 50TextPointer endPosition, 58TextPointer effectStart = new TextPointer(startPosition); 76TextPointer continuousTextEnd = new TextPointer(effectStart); 82continuousTextEnd = (TextPointer)TextPointerBase.Min(continuousTextEnd, endPosition); 112private static void MoveToFirstCharacterSymbol(TextPointer navigator) 120TextPointer navigator, // navigator to move 121TextPointer stopHint // don't move further if we already pass beyond this point
src\Framework\System\Windows\Documents\TextElement.cs (17)
100internal void Reposition(TextPointer start, TextPointer end) 244internal void RepositionWithContent(TextPointer textPosition) 308TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 311TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 325public TextPointer ElementStart 330TextPointer elementStart; 358public TextPointer ContentStart 363TextPointer contentStart; 391public TextPointer ContentEnd 396TextPointer contentEnd; 418internal bool Contains(TextPointer position) 432public TextPointer ElementEnd 437TextPointer elementEnd; 1043TextPointer beforeStart; 1587TextPointer position; 1615TextPointer start;
src\Framework\System\Windows\Documents\TextElementCollection.cs (4)
498TextPointer position; 606TextPointer position = (nextElement == null) ? this.ContentEnd : nextElement.ElementStart; 992private TextPointer ContentStart 1003private TextPointer ContentEnd
src\Framework\System\Windows\Documents\TextElementEnumerator.cs (5)
40internal TextElementEnumerator(TextPointer start, TextPointer end) 264private readonly TextPointer _start; 265private readonly TextPointer _end; 271private TextPointer _navigator;
src\Framework\System\Windows\Documents\TextPointer.cs (57)
43/// a <see cref="TextPointer.GetOffsetToPosition"/> method).</para> 47/// <see cref="TextPointer.LogicalDirection"/> property.</para> 53/// get from a TextPointer using method <see cref="TextPointer.GetPointerContext"/>.</para> 69/// using traversal methods like <see cref="TextPointer.GetNextContextPosition"/>, 70/// <see cref="TextPointer.GetNextInsertionPosition"/>, <see cref="TextPointer.GetPositionAtOffset(int)"/>, 262internal TextPointer(TextPointer textPointer) 273internal TextPointer(TextPointer position, int offset) 284internal TextPointer(TextPointer position, LogicalDirection direction) 290internal TextPointer(TextPointer position, int offset, LogicalDirection direction) 324internal TextPointer CreatePointer() 330internal TextPointer CreatePointer(LogicalDirection gravity) 443public bool IsInSameDocument(TextPointer textPosition) 468/// text container as this TextPointer (you can use <see cref="TextPointer.IsInSameDocument"/> 471public int CompareTo(TextPointer position) 691public int GetOffsetToPosition(TextPointer position) 884public TextPointer GetPositionAtOffset(int offset) 911/// <para>See examples in <seealso cref="TextPointer.GetPositionAtOffset(int)"/> method with one parameter.</para> 913public TextPointer GetPositionAtOffset(int offset, LogicalDirection direction) 915TextPointer position = new TextPointer(this, direction); 1001public TextPointer GetNextContextPosition(LogicalDirection direction) 1003return (TextPointer)((ITextPointer)this).GetNextContextPosition(direction); 1074public TextPointer GetInsertionPosition(LogicalDirection direction) 1076return (TextPointer)((ITextPointer)this).GetInsertionPosition(direction); 1080internal TextPointer GetInsertionPosition() 1101/// "insertion position" in the <see cref="TextPointer.GetInsertionPosition(LogicalDirection)"/> 1141public TextPointer GetNextInsertionPosition(LogicalDirection direction) 1143return (TextPointer)((ITextPointer)this).GetNextInsertionPosition(direction); 1183public TextPointer GetLineStartPosition(int count) 1187TextPointer lineStartPosition = GetLineStartPosition(count, out actualCount); 1223public TextPointer GetLineStartPosition(int count, out int actualCount) 1227TextPointer position = new TextPointer(this); 1296TextPointer insertPosition; 1360TextPointer deleteToPosition = new TextPointer(this, count); 1432public TextPointer InsertParagraphBreak() 1454TextPointer position; 1477public TextPointer InsertLineBreak() 1482TextPointer position; 1628TextPointer position = new TextPointer(this); 1639if (position.CompareTo((TextPointer)lineRange.Start) <= 0) 1698/// <para>The <see cref="TextPointer.Parent"/> property for this 1703public TextPointer DocumentStart 1715/// <para>The <see cref="TextPointer.Parent"/> property for this 1720public TextPointer DocumentEnd 1871internal void MoveToPosition(TextPointer textPosition) 2359internal TextPointer GetFrozenPointer(LogicalDirection logicalDirection) 2365return (TextPointer)TextPointerBase.GetFrozenPointer(this, logicalDirection); 2375return CompareTo((TextPointer)position); 2405return GetOffsetToPosition((TextPointer)position); 2453TextPointer textPointer; 2459textPointer = (TextPointer)position; 2640MoveToPosition((TextPointer)position); 2819TextRangeEditTables.DeleteContent(this, (TextPointer)limit); 3569TextPointer position = this; 3606internal static DependencyObject GetCommonAncestor(TextPointer position1, TextPointer position2) 3919private void InitializeOffset(TextPointer position, int distance, LogicalDirection direction)
src\Framework\System\Windows\Documents\TextPointerBase.cs (3)
759internal static ListItem GetListItem(TextPointer pointer) 775internal static ListItem GetImmediateListItem(TextPointer position) 794internal static bool IsInEmptyListItem(TextPointer position)
src\Framework\System\Windows\Documents\TextRange.cs (25)
62public TextRange(TextPointer position1, TextPointer position2) : 376return _textSegments[0].Start is TextPointer; 642public bool Contains(TextPointer textPointer) 673public void Select(TextPointer position1, TextPointer position2) 688internal void SelectWord(TextPointer textPointer) 1262public TextPointer Start 1266return (TextPointer)((ITextRange)this).Start; 1276public TextPointer End 1280return (TextPointer)((ITextRange)this).End; 1315return ((TextPointer)this.Start).ContainingFrameworkElement; 1584TextPointer startPosition = TextRangeEditTables.EnsureInsertionPosition(this.Start); 1609TextPointer insertionPosition = TextRangeEdit.SplitFormattingElements(this.Start, /*keepEmptyFormatting:*/false); 1641TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1645TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1650TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1667TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction); 1684TextRangeEdit.CharacterResetFormatting((TextPointer)this.Start, (TextPointer)this.End); 1704return TextRangeEditTables.InsertTable((TextPointer)this.End, rowCount, columnCount);
src\Framework\System\Windows\Documents\TextRangeBase.cs (38)
272if (thisRange.Start is TextPointer && 273(cell = TextRangeEditTables.GetTableCellFromPosition((TextPointer)thisRange.Start)) != null) 455if (pointer is TextPointer) // Implement only for concrete TextCotainer returning null otherwise - for optimization 457DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 732else if (typeof(List).IsAssignableFrom(elementType) && navigator is TextPointer) 838if (navigator is TextPointer) // can do somethinng useful only in concrete TextContainer - not in an abstract one 840List list = (List)((TextPointer)navigator).Parent; 1312if (thisRange.Start is TextPointer && 1313((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1314((TextPointer)thisRange.Start).Parent is Run && 1341TextContainer textContainer = ((TextPointer)thisRange.Start).TextContainer; 1342textContainer.DeleteContentInternal((TextPointer)thisRange.Start, (TextPointer)thisRange.End); 1349if (thisRange.Start is TextPointer) 1351TextRangeEdit.MergeFlowDirection((TextPointer)thisRange.Start); 1373bool implicitParagraphInserted = insertPosition is TextPointer && 1381if (insertPosition is TextPointer && explicitInsertPosition == null) 1383TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition((TextPointer)insertPosition); 1392if ((newStart is TextPointer) && ((TextPointer)newStart).Paragraph != null) 1395TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward); 1773if (start is TextPointer) 1775TextPointer adjustedStart = (TextPointer)start; 1776TextPointer adjustedEnd = (TextPointer)end; 1852internal static void NormalizeAnchoredBlockBoundaries(ref TextPointer start, ref TextPointer end) 1955Invariant.Assert(thisRange._TextSegments[0].Start is TextPointer); 2021if (position1 is TextPointer) 2024/*anchorPosition:*/(TextPointer)position1, 2025/*movingPosition:*/(TextPointer)position2, 2068if (position1 is TextPointer) 2081/*anchorPosition:*/(TextPointer)finalStart, 2082/*movingPosition:*/(TextPointer)finalEnd,
src\Framework\System\Windows\Documents\TextRangeEdit.cs (76)
33internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 53internal static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting) 58internal static TextPointer SplitFormattingElement(TextPointer splitPosition, bool keepEmptyFormatting) 166private static bool ExtractEmptyFormattingElements(TextPointer position) 230internal static void SetInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 258internal static bool MergeFormattingInlines(TextPointer position) 325private static void RemoveUnnecessarySpans(TextPointer position) 411internal static void CharacterResetFormatting(TextPointer start, TextPointer end) 439TextPointer mergePosition = parent.ElementStart; 526internal static TextPointer SplitElement(TextPointer position) 594internal static TextPointer InsertParagraphBreak(TextPointer position, bool moveIntoSecondParagraph) 637TextPointer breakPosition = position; 682internal static TextPointer InsertLineBreak(TextPointer position) 721internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value) 744internal static void SetParagraphProperty(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 752end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(start, end); 788private static void SetParagraphPropertyWorker(TextPointer start, TextPointer end, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 809TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward; 811TextPointer contentEnd = block.ContentEnd; 971TextPointer start = firstChild.ElementStart.GetFrozenPointer(LogicalDirection.Backward); 972TextPointer end = lastChild.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 1029private static Block GetNextBlock(TextPointer pointer, TextPointer limit) 1269internal static void MergeFlowDirection(TextPointer position) 1301TextPointer previousPosition = position.CreatePointer(); 1310TextPointer nextPosition = position.CreatePointer(); 1347internal static bool CanApplyStructuralInlineProperty(TextPointer start, TextPointer end) 1349return ValidateApplyStructuralInlineProperty(start, end, TextPointer.GetCommonAncestor(start, end), null); 1419if (!(start is TextPointer)) 1426TextPointer startPosition = (TextPointer)start; 1427TextPointer endPosition = (TextPointer)end; 1514private static void MergeEmptyParagraphsAndBlockUIContainers(TextPointer startPosition, TextPointer endPosition) 1564private static void DeleteEquiScopedContent(TextPointer start, TextPointer end) 1608TextPointer previousPosition = new TextPointer(start); 1612TextPointer nextPosition = new TextPointer(start); 1691private static bool DeleteContentBetweenPositions(TextPointer one, TextPointer two) 1719private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1750private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1873private static void SetNonStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value, PropertyValueAction propertyValueAction) 1897TextPointer nextRunPosition = run.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 1948private static void SetStructuralInlineProperty(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 1950DependencyObject commonAncestor = TextPointer.GetCommonAncestor(start, end); 2055TextPointer end = SplitFormattingElements(child.ElementEnd, /*keepEmptyFormatting*/false, limit); 2081private static Run GetNextRun(TextPointer pointer, TextPointer limit) 2111private static void ClearPropertyValueFromSpansAndRuns(TextPointer start, TextPointer end, DependencyProperty formattingProperty) 2136private static void ApplyStructuralInlinePropertyAcrossRun(TextPointer start, TextPointer end, Run run, DependencyProperty formattingProperty, object value) 2161private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value) 2218private static void ApplyStructuralInlinePropertyAcrossParagraphs(TextPointer start, TextPointer end, DependencyProperty formattingProperty, object value) 2258private static bool ValidateApplyStructuralInlineProperty(TextPointer start, TextPointer end, DependencyObject commonAncestor, DependencyProperty property)
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (25)
99TextPointer positionAfterSecondParagraph = secondParagraphOrBlockUIContainer.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 138TextPointer inlineMergingPosition = secondParagraphOrBlockUIContainer.ElementStart; 173internal static bool MergeListsAroundNormalizedPosition(TextPointer mergePosition) 176TextPointer navigator = mergePosition.CreatePointer(); 211internal static bool MergeLists(TextPointer mergePosition) 249TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 274TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.Start); 280TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 342ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 400ListItem lastListItem = TextPointerBase.GetImmediateListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 454ListItem lastListItem = TextPointerBase.GetListItem((TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End)); 513TextPointer outerListItemEnd = outerListItem.ContentEnd; 535TextPointer mergePosition = lastListItem.ContentEnd; 549TextPointer start = unindentedList.ElementStart; 550TextPointer end = unindentedList.ElementEnd; 591TextPointer end = (TextPointer)TextRangeEdit.GetAdjustedRangeEnd(range.Start, range.End); 634TextPointer position = firstParagraphOrBlockUIContainer.ElementEnd; 635TextPointer startOfSecondParagraph = secondParagraphOrBlockUIContainer.ElementStart; 675internal static bool SplitListsForFlowDirectionChange(TextPointer start, TextPointer end, object newFlowDirectionValue) 762private static TextPointer GetPositionAfterList(List list) 766TextPointer adjustedEnd = list.ElementEnd.GetInsertionPosition(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (58)
51if (!(range.Start is TextPointer)) 59if (table != GetTableFromPosition((TextPointer)range.TextSegments[0].Start)) 64TableCell firstCell = GetTableCellFromPosition((TextPointer)range.TextSegments[0].Start); 71TextPointer lastCellPointer = (TextPointer)range.TextSegments[0].End.GetNextInsertionPosition(LogicalDirection.Backward); 113internal static Table GetTableFromPosition(TextPointer position) 125private static TableRow GetTableRowFromPosition(TextPointer position) 137internal static TableCell GetTableCellFromPosition(TextPointer position) 185if (!(anchorPosition is TextPointer) || !(movingPosition is TextPointer)) 200TextPointer)anchorPosition, (TextPointer)movingPosition, 231TextPointer anchorPosition, TextPointer movingPosition, 286TextPointer anchorPosition, TextPointer movingPosition, 377TextPointer anchorPosition, TextPointer movingPosition, 433internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 437TextPointer movingPosition = selection.MovingPosition; 443if (TextRangeEditTables.IsTableCellRange(selection.AnchorPosition, (TextPointer)movingPosition, 563internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 581Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 592internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction) 595Invariant.Assert(((ITextSelection)selection).Start is TextPointer); 633internal static Table InsertTable(TextPointer insertionPosition, int rowCount, int columnCount) 712internal static TextPointer EnsureInsertionPosition(TextPointer position) 778internal static TextPointer GetAdjustedRowEndPosition(Table currentTable, TextPointer rowEndPosition) 780TextPointer position; 783TextPointer nextInsertionPosition = rowEndPosition; 811private static TextPointer CreateInsertionPositionInIncompleteContent(TextPointer position) 876TextPointer insertionPosition; 891private static TextPointer CreateImplicitRun(TextPointer position) 893TextPointer insertionPosition; 918private static TextPointer CreateImplicitParagraph(TextPointer position) 920TextPointer insertionPosition; 939internal static void DeleteContent(TextPointer start, TextPointer end) 945TextPointer whatWasEnd = end; 1079TableCell cell = GetTableCellFromPosition((TextPointer)textSegment.Start); 1080TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1086TextPointer cellEnd = cell.ElementEnd; 1125TextPointer currentRowPosition = rowCount > 0 ? textRange.End : textRange.Start; 1963private static TextSegment NewNormalizedTextSegment(TextPointer startPosition, TextPointer endPosition) 1993TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward); 1997TextPointer end = endCell.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward); 2046TextPointer anchorPosition, TextPointer movingPosition, 2132TextPointer anchorPosition, TextPointer movingPosition, 2171TextPointer position,
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (19)
604if (elementTypeStandardized == typeof(Table) && textReader is TextPointer) 607WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 709WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 963TextPointer textPointer = context as TextPointer; 1291TextPointer insertionPosition = TextRangeEditTables.EnsureInsertionPosition(range.End); 1324private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1326TextPointer fragmentStart; 1327TextPointer fragmentEnd; 1434private static bool SplitParagraphForPasting(ref TextPointer insertionPosition) 1442TextPointer positionBeforeParagraph = insertionPosition; 1482private static void MergeParagraphsAtPosition(TextPointer position, bool mergingOnFragmentStart) 1484TextPointer navigator = position; 1537private static void ValidateMergingPositions(Type itemType, TextPointer start, TextPointer end) 1581private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1624private static void ApplyContextualProperty(Type targetType, TextPointer start, TextPointer end, DependencyProperty property, object value)
src\Framework\System\Windows\Documents\TextSchema.cs (4)
154internal static bool IsValidChild(TextPointer position, Type childType) 159internal static bool ValidateChild(TextPointer position, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 891TextPointer start = element.ElementStart; 892TextPointer end = element.ElementEnd;
src\Framework\System\windows\Documents\TextSelection.cs (17)
604else if (movingPosition is TextPointer && TextPointerBase.IsAtRowEnd(movingPosition)) 610else if (movingPosition is TextPointer && TextRangeEditTables.MovingPositionCrossesCellBoundary(this)) 1047if (!TextRangeEditTables.IsTableCellRange((TextPointer)_anchorPosition, (TextPointer)((ITextSelection)this).MovingPosition, /*includeCellAtMovingPosition:*/false, out anchorCell, out movingCell)) 1161internal TextPointer AnchorPosition 1167return (TextPointer)((ITextSelection)this).AnchorPosition; 1174internal TextPointer MovingPosition 1180return (TextPointer)((ITextSelection)this).MovingPosition; 1187internal void SetCaretToPosition(TextPointer caretPosition, LogicalDirection direction, bool allowStopAtLineEnd, bool allowStopNearSpace) 1390TextPointer cellStart = table.RowGroups[0].Rows[0].Cells[0].ContentStart; 1422if (thisSelection.Start is TextPointer) 1450if (((ITextSelection)this).Start is TextPointer) 1452TextPointer start = this.Start; 1527if (((ITextSelection)this).Start is TextPointer) 1543if (!(((ITextSelection)this).Start is TextPointer)) 2404Block paragraphOrBlockUIContainer = (caretPosition is TextPointer) ? ((TextPointer)caretPosition).ParagraphOrBlockUIContainer : null;
src\Framework\System\Windows\Documents\TextStore.cs (9)
332Invariant.Assert(navigator is TextPointer); 333TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 1138TextElement startElement = (TextElement)((TextPointer)start).Parent; 1139TextElement endElement = (TextElement)((TextPointer)end).Parent; 3307TextPointer start = startOut as TextPointer; 3316TextPointer end = (TextPointer)endOut; 3340TextPointer previousPosition = start.GetNextInsertionPosition(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (9)
39internal TextTreeDeleteContentUndoUnit(TextContainer tree, TextPointer start, TextPointer end) : base(tree, start.GetSymbolOffset()) 76TextPointer navigator; 329internal abstract void Do(TextPointer navigator); 353internal override void Do(TextPointer navigator) 382internal override void Do(TextPointer navigator) 441internal override void Do(TextPointer navigator) 493internal override void Do(TextPointer navigator) 499TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
src\Framework\System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
59TextPointer start; 60TextPointer end;
src\Framework\System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (2)
52TextPointer start; 53TextPointer end;
src\Framework\System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
53TextPointer start; 54TextPointer end;
src\Framework\System\Windows\Documents\TextTreeNode.cs (1)
471internal void InsertAtPosition(TextPointer position)
src\Framework\System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
53TextPointer position;
src\Framework\System\Windows\Documents\TextTreeUndo.cs (2)
78internal static TextTreeDeleteContentUndoUnit CreateDeleteContentUndoUnit(TextContainer tree, TextPointer start, TextPointer end)
src\Framework\System\Windows\Documents\Underline.cs (3)
68public Underline(Inline childInline, TextPointer insertionPosition) : base(childInline, insertionPosition) 85public Underline(TextPointer start, TextPointer end) : base(start, end)
src\Framework\System\Windows\Documents\ValidationHelper.cs (1)
107internal static void ValidateChild(TextPointer position, object child, string paramName)