515 references to TextPointerContext
PresentationFramework (515)
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (5)
987TextPointerContext nextContext = cursor.GetPointerContext(LogicalDirection.Forward); 988if (nextContext == TextPointerContext.ElementStart) 1012else if (nextContext == TextPointerContext.ElementEnd) 1026else if (nextContext == TextPointerContext.Text || nextContext == TextPointerContext.EmbeddedElement)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (7)
798TextPointerContext currentContext = pointer.GetPointerContext(direction); 799if ((currentContext == TextPointerContext.ElementEnd || currentContext == TextPointerContext.ElementStart) && 832if (currentContext == TextPointerContext.ElementEnd && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementStart) 839if (currentContext == TextPointerContext.ElementStart && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementEnd)
MS\Internal\Documents\HostedElements.cs (4)
100if (_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || 101_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement) 174case TextPointerContext.ElementStart: 178case TextPointerContext.EmbeddedElement:
MS\Internal\Documents\TextBoxLine.cs (5)
75case TextPointerContext.Text: 79case TextPointerContext.None: 83case TextPointerContext.ElementStart: 84case TextPointerContext.ElementEnd: 85case TextPointerContext.EmbeddedElement:
MS\Internal\Documents\TextContainerHelper.cs (2)
320if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 341else if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement)
MS\Internal\PtsHost\ContainerParagraph.cs (5)
1010case TextPointerContext.Text: 1025case TextPointerContext.ElementEnd: 1036case TextPointerContext.ElementStart: 1070case TextPointerContext.EmbeddedElement: 1076case TextPointerContext.None:
MS\Internal\PtsHost\FlowDocumentPage.cs (1)
950case TextPointerContext.EmbeddedElement:
MS\Internal\PtsHost\Line.cs (11)
142case TextPointerContext.Text: 146case TextPointerContext.ElementStart: 150case TextPointerContext.ElementEnd: 154case TextPointerContext.EmbeddedElement: 158case TextPointerContext.None: 190while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 566TextPointerContext type = TextPointerContext.None; 598if (type == TextPointerContext.Text || type == TextPointerContext.ElementEnd) 602else if (type == TextPointerContext.ElementStart)
MS\Internal\PtsHost\LineBase.cs (4)
81Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 130Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 245Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 299Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
MS\Internal\PtsHost\ListParagraph.cs (3)
67TextPointerContext runType = textPointer.GetPointerContext(LogicalDirection.Forward); 68if (runType == TextPointerContext.ElementStart) 103else if (runType == TextPointerContext.ElementEnd)
MS\Internal\PtsHost\OptimalTextSource.cs (6)
92case TextPointerContext.Text: 96case TextPointerContext.ElementStart: 100case TextPointerContext.ElementEnd: 104case TextPointerContext.EmbeddedElement: 108case TextPointerContext.None: 141while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text &&
MS\Internal\PtsHost\TextParaClient.cs (8)
642RectFromDcpSimpleLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 647RectFromDcpCompositeLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 1632TextPointerContext context, 1696if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 1720TextPointerContext context, 1790if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement))
MS\Internal\PtsHost\TextParagraph.cs (3)
864while(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 894if(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1190if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
MS\Internal\Text\ComplexLine.cs (15)
43case TextPointerContext.Text: 47case TextPointerContext.ElementStart: 51case TextPointerContext.ElementEnd: 55case TextPointerContext.EmbeddedElement: 59case TextPointerContext.None: 91while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 254TextPointerContext type = TextPointerContext.None; 299if (type == TextPointerContext.Text || type == TextPointerContext.ElementEnd) 303else if (type == TextPointerContext.ElementStart) 333Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 380Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 471Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 521Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
System\Windows\Controls\AccessText.cs (4)
578TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 581case TextPointerContext.Text: 626TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 629case TextPointerContext.Text:
System\Windows\Controls\PasswordTextContainer.cs (1)
232TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Controls\PasswordTextNavigator.cs (4)
133TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 135TextPointerContext symbolType; 140symbolType = TextPointerContext.None; 144symbolType = TextPointerContext.Text;
System\Windows\Controls\TextAdaptor.cs (3)
608TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 609if (context == TextPointerContext.ElementStart) 619else if (context == TextPointerContext.EmbeddedElement)
System\Windows\Controls\TextBlock.cs (1)
3651case TextPointerContext.EmbeddedElement:
System\Windows\Controls\TextRangeAdaptor.cs (23)
552TextPointerContext forwardContext = _start.GetPointerContext(LogicalDirection.Forward); 555TextPointerContext backwardContext = _start.GetPointerContext(LogicalDirection.Backward); 557if (backwardContext == TextPointerContext.None) 559if (forwardContext == TextPointerContext.Text && backwardContext != TextPointerContext.Text) 569TextPointerContext backwardContext = _end.GetPointerContext(LogicalDirection.Backward); 572TextPointerContext forwardContext = _end.GetPointerContext(LogicalDirection.Forward); 574if (forwardContext == TextPointerContext.None) 576if (forwardContext == TextPointerContext.Text && backwardContext != TextPointerContext.Text) 753while (position.GetPointerContext(direction) == TextPointerContext.Text) 766TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 768if (context != TextPointerContext.ElementStart && context != TextPointerContext.ElementEnd) 924if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 938if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 1029while (position.GetPointerContext(direction) == TextPointerContext.Text) 1042while (position.GetPointerContext(direction) != TextPointerContext.Text) 1052while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 1060if (position.GetPointerContext(direction) != TextPointerContext.None) 1246private bool IsElementBoundary(TextPointerContext symbolType) 1248return ((symbolType == TextPointerContext.ElementStart) || (symbolType == TextPointerContext.ElementEnd));
System\Windows\Documents\CompositionAdorner.cs (4)
483while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 488Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 622while ((startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) && 623(startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text))
System\Windows\Documents\DocumentSequenceTextContainer.cs (3)
115TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction) 680if (highlightRangeStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 982if (textPosition.GetPointerContext(direction) == TextPointerContext.None)
System\Windows\Documents\DocumentSequenceTextPointer.cs (16)
79TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 629public static TextPointerContext GetPointerContext(DocumentSequenceTextPointer thisTp, LogicalDirection direction) 864TextPointerContext context = thisTp.ChildPointer.GetPointerContext(direction); 866if (context != TextPointerContext.None) 876while (context == TextPointerContext.None && !block.IsTail) 888while (context == TextPointerContext.None && !block.IsHead) 912private static TextPointerContext xGapAwareGetSymbolType(DocumentSequenceTextPointer thisTp, LogicalDirection direction) 963if (tp1.ChildPointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None || 964tp2.ChildPointer.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.None) 973if (block.ChildContainer.Start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1032TextPointerContext tst = childTn.GetPointerContext(scanDir); 1035case TextPointerContext.ElementStart: 1040case TextPointerContext.ElementEnd: 1045case TextPointerContext.EmbeddedElement: 1050case TextPointerContext.Text: 1063case TextPointerContext.None:
System\Windows\Documents\FixedElement.cs (4)
266TextPointerContext tpc = pos.GetPointerContext(LogicalDirection.Forward); 267if (tpc == TextPointerContext.Text) 271else if (tpc == TextPointerContext.EmbeddedElement) 275else if (tpc == TextPointerContext.ElementStart)
System\Windows\Documents\FixedTextContainer.cs (1)
100TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Documents\FixedTextPointer.cs (10)
92TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 105if (_flowPosition.GetPointerContext(direction) != TextPointerContext.Text) 131if (_flowPosition.GetPointerContext(direction) != TextPointerContext.Text) 145TextPointerContext tpc = _flowPosition.GetPointerContext(direction); 146if (!(tpc == TextPointerContext.EmbeddedElement || tpc == TextPointerContext.ElementStart || tpc == TextPointerContext.ElementEnd)) 161TextPointerContext tt = _flowPosition.GetPointerContext(direction); 163if (tt == TextPointerContext.ElementStart || tt == TextPointerContext.ElementEnd)
System\Windows\Documents\FixedTextView.cs (11)
175if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1073TextPointerContext symbolType = ((ITextPointer)ftp).GetPointerContext(textdir); 1075if (ftp.FlowPosition.IsBoundary || symbolType == TextPointerContext.None) 1080if (symbolType == TextPointerContext.ElementStart || symbolType == TextPointerContext.ElementEnd) 1085case TextPointerContext.ElementStart: 1088case TextPointerContext.ElementEnd: 1098if (symbolType != TextPointerContext.Text && symbolType != TextPointerContext.EmbeddedElement) 1118Debug.Assert(symbolType == TextPointerContext.Text || symbolType == TextPointerContext.EmbeddedElement);
System\Windows\Documents\FlowPosition.cs (15)
171internal TextPointerContext GetPointerContext(LogicalDirection dir) 181Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 198Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 281TextPointerContext tst; 284(tst = flowScan.GetPointerContext(LogicalDirection.Backward))!= TextPointerContext.None) 286if (tst == TextPointerContext.ElementStart) 295else if (tst == TextPointerContext.ElementEnd) 612private TextPointerContext _vGetSymbolType(LogicalDirection dir) 644return TextPointerContext.None; 757private TextPointerContext _FlowNodeTypeToTextSymbol(FlowNodeType t) 762return TextPointerContext.ElementStart; 765return TextPointerContext.ElementEnd; 768return TextPointerContext.Text; 772return TextPointerContext.EmbeddedElement; 775return TextPointerContext.None;
System\Windows\Documents\Highlights.cs (5)
181case TextPointerContext.None: 185case TextPointerContext.Text: 197case TextPointerContext.EmbeddedElement: 198case TextPointerContext.ElementStart: 199case TextPointerContext.ElementEnd:
System\Windows\Documents\ImmComposition.cs (14)
1399case TextPointerContext.Text: 1408case TextPointerContext.EmbeddedElement: 1412case TextPointerContext.ElementStart: 1413case TextPointerContext.ElementEnd: 1423case TextPointerContext.None: 1451case TextPointerContext.Text: 1459case TextPointerContext.EmbeddedElement: 1463case TextPointerContext.ElementStart: 1464case TextPointerContext.ElementEnd: 1473case TextPointerContext.None: 1550case TextPointerContext.Text: 1553case TextPointerContext.None: 1566case TextPointerContext.Text: 1569case TextPointerContext.None:
System\Windows\Documents\ITextContainer.cs (1)
47TextPointerContext GetPointerContext(StaticTextPointer pointer, LogicalDirection direction);
System\Windows\Documents\ITextPointer.cs (1)
51TextPointerContext GetPointerContext(LogicalDirection direction);
System\Windows\Documents\List.cs (1)
193if (textNav.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
System\Windows\Documents\NullTextContainer.cs (1)
100TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Documents\NullTextNavigator.cs (2)
68TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 71return TextPointerContext.None;
System\Windows\Documents\Paragraph.cs (3)
252TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 253if (symbolType == TextPointerContext.Text || 254symbolType == TextPointerContext.EmbeddedElement ||
System\Windows\Documents\RangeContentEnumerator.cs (8)
95case TextPointerContext.Text: 107while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 114case TextPointerContext.EmbeddedElement: 121case TextPointerContext.ElementStart: 171case TextPointerContext.Text: 178while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text && _navigator.CompareTo(_end) < 0); 182case TextPointerContext.EmbeddedElement: 186case TextPointerContext.ElementStart:
System\Windows\Documents\Span.cs (2)
213if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 217else if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd)
System\Windows\Documents\Speller.cs (9)
1097if (position.GetPointerContext(direction) == TextPointerContext.None) 1376searchPosition.GetPointerContext(direction) != TextPointerContext.None); 1683case TextPointerContext.Text: 1710case TextPointerContext.ElementStart: 1711case TextPointerContext.ElementEnd: 1727case TextPointerContext.EmbeddedElement: 1794TextPointerContext context; 1801if (context == TextPointerContext.ElementStart && 1806else if (context == TextPointerContext.ElementEnd &&
System\Windows\Documents\StaticTextPointer.cs (1)
51internal TextPointerContext GetPointerContext(LogicalDirection direction)
System\Windows\Documents\TextContainer.cs (3)
499TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction) 503TextPointerContext context; 508context = TextPointerContext.Text;
System\windows\Documents\TextEditorMouse.cs (1)
718if (!(mouseMovePosition.GetPointerContext(mouseMovePosition.LogicalDirection) == TextPointerContext.EmbeddedElement))
System\windows\Documents\TextEditorSpelling.cs (9)
185textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 191textEnd.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 196if (textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text || 201Invariant.Assert(textEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 264case TextPointerContext.Text: 271case TextPointerContext.ElementStart: 272case TextPointerContext.ElementEnd: 283case TextPointerContext.EmbeddedElement: 284case TextPointerContext.None:
System\windows\Documents\TextEditorTyping.cs (10)
642position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 672else if (backspacePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 800position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 801position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 806while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 814if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 833if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 839position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 847while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 854if (!(navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextEffectResolver.cs (2)
100while (navigator.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text 110while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text
System\Windows\Documents\TextElementEnumerator.cs (1)
130Invariant.Assert(_navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart,
System\Windows\Documents\TextFindEngine.cs (10)
659case TextPointerContext.Text: 696case TextPointerContext.None: 697case TextPointerContext.ElementStart: 698case TextPointerContext.ElementEnd: 728case TextPointerContext.EmbeddedElement: 888TextPointerContext context; 897if (context == TextPointerContext.ElementStart && 902else if (context == TextPointerContext.ElementEnd && 912if (context == TextPointerContext.ElementEnd && 917else if (context == TextPointerContext.ElementStart &&
System\Windows\Documents\TextPointer.cs (25)
40/// <para>Class <see cref="TextPointerContext"/> is an enum specifying what kind of 493/// <para>Returns <see cref="TextPointerContext.None"/> if this TextPointer 498/// <para>Returns <see cref="TextPointerContext.ElementStart"/> if the TextPointer 500/// <para>Returns <see cref="TextPointerContext.ElementEnd"/> if the TextPointer 502/// <para>Returns <see cref="TextPointerContext.Text"/> if the TextPointer 505/// <para>Returns <see cref="TextPointerContext.EmbeddedElement"/> is the TextPointer 538public TextPointerContext GetPointerContext(LogicalDirection direction) 1609TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1612while ((backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.ElementEnd) && 2382TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 3426internal static TextPointerContext GetPointerContextForward(TextTreeNode node, ElementEdge edge) 3430TextPointerContext symbolType; 3453symbolType = (node.ParentNode != null) ? TextPointerContext.ElementEnd : TextPointerContext.None; 3466symbolType = (node.GetContainingNode() is TextTreeRootNode) ? TextPointerContext.None : TextPointerContext.ElementEnd; 3472symbolType = TextPointerContext.Text; 3480internal static TextPointerContext GetPointerContextBackward(TextTreeNode node, ElementEdge edge) 3482TextPointerContext symbolType; 3498symbolType = (node.GetContainingNode() is TextTreeRootNode) ? TextPointerContext.None : TextPointerContext.ElementStart; 3505symbolType = (node.ParentNode != null) ? TextPointerContext.ElementStart : TextPointerContext.None; 3526symbolType = TextPointerContext.Text;
System\Windows\Documents\TextPointerBase.cs (59)
185TextPointerContext forwardContext = forwardPosition.GetPointerContext(LogicalDirection.Forward); 186TextPointerContext backwardContext = backwardPosition.GetPointerContext(LogicalDirection.Backward); 188backwardContext == TextPointerContext.ElementStart && 189forwardContext == TextPointerContext.ElementEnd 192backwardContext == TextPointerContext.ElementStart && TextSchema.IsNonFormattingInline(forwardType) && 196forwardContext == TextPointerContext.ElementEnd && TextSchema.IsNonFormattingInline(backwardType) && 200backwardContext == TextPointerContext.ElementEnd && forwardContext == TextPointerContext.ElementStart && 204backwardContext == TextPointerContext.ElementEnd && 206(forwardContext != TextPointerContext.ElementEnd || !IsAtNonMergeableInlineEnd(forwardPosition)) 208forwardContext == TextPointerContext.ElementStart && 210(backwardContext != TextPointerContext.ElementStart || !IsAtNonMergeableInlineStart(backwardPosition)) 227TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 228TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 230if (backwardContext == TextPointerContext.ElementStart && forwardContext == TextPointerContext.ElementEnd) 236else if (backwardContext == TextPointerContext.None && forwardContext == TextPointerContext.None) 251TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 252TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 254return (forwardContext == TextPointerContext.ElementStart && 255(backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.None) && 269position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 275position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd; 374while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 420if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 421position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 472if (navigator.GetPointerContext(insideWordDirection) != TextPointerContext.Text) 477if (navigator.GetPointerContext(insideWordDirection) == TextPointerContext.Text) 590TextPointerContext context = position.GetPointerContext(direction); 591if (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 600else if (context == TextPointerContext.EmbeddedElement) 711thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 712thisPosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 722return thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None && 723thisPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 738while (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 776paragraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 995if (thisNavigator.GetPointerContext(direction) != TextPointerContext.None) 1019TextPointerContext context = thisNavigator.GetPointerContext(direction); 1020if (context == TextPointerContext.ElementStart || context == TextPointerContext.None) 1142TextPointerContext directEnterScope; 1143TextPointerContext oppositeEnterScope; 1149directEnterScope = TextPointerContext.ElementStart; 1150oppositeEnterScope = TextPointerContext.ElementEnd; 1156directEnterScope = TextPointerContext.ElementEnd; 1157oppositeEnterScope = TextPointerContext.ElementStart; 1328TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1329TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1331if (backwardContext == TextPointerContext.Text && forwardContext == TextPointerContext.Text) 1435while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text); 1455while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 1488TextPointerContext context = (direction == LogicalDirection.Forward) ? TextPointerContext.ElementEnd : TextPointerContext.ElementStart;
System\Windows\Documents\TextRangeBase.cs (30)
342TextPointerContext nextContext = navigator.GetPointerContext(direction); 346if (nextContext == TextPointerContext.None // 349(nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Forward || // 350nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Backward) && // 354(nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Forward || // 355nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Backward) && // 410if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 677TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 680case TextPointerContext.Text: 683case TextPointerContext.ElementEnd: 706case TextPointerContext.EmbeddedElement : 710case TextPointerContext.ElementStart : 761bool theParagraphIsTheFirstInCollection = navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 764TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 766if (theParagraphIsTheFirstInCollection && symbolType == TextPointerContext.ElementEnd && 773if (symbolType == TextPointerContext.ElementStart) 1250while (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1310if (thisRange.Start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 1311thisRange.End.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 1357(insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.None || 1358insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) && 1359(insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None || 1360insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 1616TextPointerContext context = start.GetPointerContext(LogicalDirection.Forward); 1617while (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 1622if (context == TextPointerContext.EmbeddedElement) 1626while (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 1631if (context == TextPointerContext.EmbeddedElement && start.GetOffsetToPosition(end) == 1)
System\Windows\Documents\TextRangeEdit.cs (43)
65if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 71else if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 262while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 267while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 277position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 278position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 329inline.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 330inline.ElementEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 416if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 531if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 538else if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 554Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd, "position must be after ElementEnd"); 555Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "position must be before ElementStart"); 655while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1030if (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1247if (rangeStart.CompareTo(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1266TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1267TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1269if (!(backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.ElementEnd) && 1270!(forwardContext == TextPointerContext.ElementStart || forwardContext == TextPointerContext.ElementEnd)) 1277while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1282while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 1297while (previousPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 1306while (nextPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 1438while (startPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1439startPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 1579TextPointerContext enterScopeSymbol; 1580TextPointerContext leaveScopeSymbol; 1587enterScopeSymbol = TextPointerContext.ElementStart; 1588leaveScopeSymbol = TextPointerContext.ElementEnd; 1596enterScopeSymbol = TextPointerContext.ElementEnd; 1597leaveScopeSymbol = TextPointerContext.ElementStart; 1616TextPointerContext pointerContext = nextPosition.GetPointerContext(direction); 1618if (pointerContext == TextPointerContext.Text || pointerContext == TextPointerContext.EmbeddedElement) 1661Invariant.Assert(pointerContext == TextPointerContext.None, "Unknown pointer context"); 2082if (pointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 2117if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2186start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2187end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 2233if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeEditLists.cs (11)
75while (secondParagraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 143ListItem followingListItem = positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart 151Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 152Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd); 173while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 185while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 208if (mergePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementEnd || 209mergePosition.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementStart) 606while (end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 635while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 646while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
System\Windows\Documents\TextRangeEditTables.cs (5)
749bool insertBefore = position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 812while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 816while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1086cellEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 2093movingPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeSerialization.cs (32)
75range.End.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 204while (rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 212TextPointerContext runType = textReader.GetPointerContext(LogicalDirection.Forward); 216case TextPointerContext.ElementStart: 259case TextPointerContext.ElementEnd: 301case TextPointerContext.Text: 315case TextPointerContext.EmbeddedElement: 1413while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1418while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1456if (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1474if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1511TextPointerContext forwardFromStart = start.GetPointerContext(LogicalDirection.Forward); 1512TextPointerContext backwardFromEnd = end.GetPointerContext(LogicalDirection.Backward); 1513Invariant.Assert(forwardFromStart == TextPointerContext.ElementStart, "Expecting first opening tag of pasted fragment"); 1514Invariant.Assert(backwardFromEnd == TextPointerContext.ElementEnd, "Expecting last closing tag of pasted fragment"); 1521TextPointerContext backwardFromStart = start.GetPointerContext(LogicalDirection.Backward); 1522TextPointerContext forwardFromEnd = end.GetPointerContext(LogicalDirection.Forward); 1523Invariant.Assert(backwardFromStart == TextPointerContext.ElementStart || backwardFromStart == TextPointerContext.ElementEnd || backwardFromStart == TextPointerContext.None, "Bad context preceding a pasted fragment"); 1524Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1526Invariant.Assert(forwardFromEnd == TextPointerContext.ElementStart || forwardFromEnd == TextPointerContext.ElementEnd || forwardFromEnd == TextPointerContext.None, "Bad context following a pasted fragment"); 1527Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1549((Section)fragment).HasTrailingParagraphBreakOnPaste = range.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None; 1609TextPointerContext passedContext = start.GetPointerContext(LogicalDirection.Backward); 1610if (passedContext == TextPointerContext.ElementStart) 1655Invariant.Assert(passedContext != TextPointerContext.None, "TextPointerContext.None is not expected"); 1846Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1873Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1922while (hyperlinkStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextSchema.cs (2)
887TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 888if (forwardContext == TextPointerContext.ElementStart)
System\windows\Documents\TextSelection.cs (9)
468if (caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 469caretPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 487if (caretPosition.GetPointerContext(direction) == TextPointerContext.Text && 500(caretPosition.GetPointerContext(oppositeDirection) != TextPointerContext.Text || 1740return (This.Start.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 1741This.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text && 1935if (cursorPosition.GetPointerContext(cursorPosition.LogicalDirection) == TextPointerContext.EmbeddedElement) 2163caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) || // 2180caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && //
System\Windows\Documents\TextStore.cs (22)
414TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Forward); 418case TextPointerContext.Text: 422case TextPointerContext.EmbeddedElement: 426case TextPointerContext.ElementStart: 442case TextPointerContext.ElementEnd: 447case TextPointerContext.None: 1487if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 2445Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 2504Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement); 2546Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 2900while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 3175TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Backward); 3178case TextPointerContext.ElementStart: 3182case TextPointerContext.ElementEnd: 3183case TextPointerContext.EmbeddedElement: 3186case TextPointerContext.Text: 3190Invariant.Assert(context != TextPointerContext.None); 3412if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 3452TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 3454if (forwardContext == TextPointerContext.ElementStart) 3463else if (forwardContext != TextPointerContext.ElementEnd)
System\Windows\Documents\TextTreeFixupNode.cs (2)
106internal override TextPointerContext GetPointerContext(LogicalDirection direction) 109return TextPointerContext.None;
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (1)
55Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\TextTreeNode.cs (1)
366internal abstract TextPointerContext GetPointerContext(LogicalDirection direction);
System\Windows\Documents\TextTreeObjectNode.cs (2)
71internal override TextPointerContext GetPointerContext(LogicalDirection direction) 73return TextPointerContext.EmbeddedElement;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
51Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\TextTreeRootNode.cs (2)
83internal override TextPointerContext GetPointerContext(LogicalDirection direction) 86return TextPointerContext.None;
System\Windows\Documents\TextTreeTextElementNode.cs (3)
79internal override TextPointerContext GetPointerContext(LogicalDirection direction) 81return (direction == LogicalDirection.Forward) ? TextPointerContext.ElementStart : TextPointerContext.ElementEnd;
System\Windows\Documents\TextTreeTextNode.cs (2)
98internal override TextPointerContext GetPointerContext(LogicalDirection direction) 100return TextPointerContext.Text;