515 references to TextPointerContext
PresentationFramework (515)
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (5)
991TextPointerContext nextContext = cursor.GetPointerContext(LogicalDirection.Forward); 992if (nextContext == TextPointerContext.ElementStart) 1016else if (nextContext == TextPointerContext.ElementEnd) 1030else if (nextContext == TextPointerContext.Text || nextContext == TextPointerContext.EmbeddedElement)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (7)
795TextPointerContext currentContext = pointer.GetPointerContext(direction); 796if ((currentContext == TextPointerContext.ElementEnd || currentContext == TextPointerContext.ElementStart) && 829if (currentContext == TextPointerContext.ElementEnd && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementStart) 836if (currentContext == TextPointerContext.ElementStart && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementEnd)
MS\Internal\Documents\HostedElements.cs (4)
107if (_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || 108_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement) 182case TextPointerContext.ElementStart: 186case TextPointerContext.EmbeddedElement:
MS\Internal\Documents\TextBoxLine.cs (5)
76case TextPointerContext.Text: 80case TextPointerContext.None: 84case TextPointerContext.ElementStart: 85case TextPointerContext.ElementEnd: 86case TextPointerContext.EmbeddedElement:
MS\Internal\Documents\TextContainerHelper.cs (2)
321if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 342else if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement)
MS\Internal\PtsHost\ContainerParagraph.cs (5)
1029case TextPointerContext.Text: 1044case TextPointerContext.ElementEnd: 1055case TextPointerContext.ElementStart: 1089case TextPointerContext.EmbeddedElement: 1095case TextPointerContext.None:
MS\Internal\PtsHost\FlowDocumentPage.cs (1)
957case TextPointerContext.EmbeddedElement:
MS\Internal\PtsHost\Line.cs (11)
154case TextPointerContext.Text: 158case TextPointerContext.ElementStart: 162case TextPointerContext.ElementEnd: 166case TextPointerContext.EmbeddedElement: 170case TextPointerContext.None: 202while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 579TextPointerContext type = TextPointerContext.None; 611if (type == TextPointerContext.Text || type == TextPointerContext.ElementEnd) 615else if (type == TextPointerContext.ElementStart)
MS\Internal\PtsHost\LineBase.cs (4)
86Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 135Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 250Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 304Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
MS\Internal\PtsHost\ListParagraph.cs (3)
77TextPointerContext runType = textPointer.GetPointerContext(LogicalDirection.Forward); 78if (runType == TextPointerContext.ElementStart) 113else if (runType == TextPointerContext.ElementEnd)
MS\Internal\PtsHost\OptimalTextSource.cs (6)
101case TextPointerContext.Text: 105case TextPointerContext.ElementStart: 109case TextPointerContext.ElementEnd: 113case TextPointerContext.EmbeddedElement: 117case TextPointerContext.None: 150while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text &&
MS\Internal\PtsHost\TextParaClient.cs (8)
643RectFromDcpSimpleLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 648RectFromDcpCompositeLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 1633TextPointerContext context, 1697if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 1721TextPointerContext context, 1791if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement))
MS\Internal\PtsHost\TextParagraph.cs (3)
881while(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 911if(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1213if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
MS\Internal\Text\ComplexLine.cs (15)
44case TextPointerContext.Text: 48case TextPointerContext.ElementStart: 52case TextPointerContext.ElementEnd: 56case TextPointerContext.EmbeddedElement: 60case TextPointerContext.None: 92while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 255TextPointerContext type = TextPointerContext.None; 300if (type == TextPointerContext.Text || type == TextPointerContext.ElementEnd) 304else if (type == TextPointerContext.ElementStart) 334Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 381Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 472Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 522Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
System\Windows\Controls\AccessText.cs (4)
577TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 580case TextPointerContext.Text: 623TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 626case TextPointerContext.Text:
System\Windows\Controls\PasswordTextContainer.cs (1)
233TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Controls\PasswordTextNavigator.cs (4)
134TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 136TextPointerContext symbolType; 141symbolType = TextPointerContext.None; 145symbolType = TextPointerContext.Text;
System\Windows\Controls\TextAdaptor.cs (3)
615TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 616if (context == TextPointerContext.ElementStart) 626else if (context == TextPointerContext.EmbeddedElement)
System\Windows\Controls\TextBlock.cs (1)
3661case TextPointerContext.EmbeddedElement:
System\Windows\Controls\TextRangeAdaptor.cs (23)
553TextPointerContext forwardContext = _start.GetPointerContext(LogicalDirection.Forward); 556TextPointerContext backwardContext = _start.GetPointerContext(LogicalDirection.Backward); 558if (backwardContext == TextPointerContext.None) 560if (forwardContext == TextPointerContext.Text && backwardContext != TextPointerContext.Text) 570TextPointerContext backwardContext = _end.GetPointerContext(LogicalDirection.Backward); 573TextPointerContext forwardContext = _end.GetPointerContext(LogicalDirection.Forward); 575if (forwardContext == TextPointerContext.None) 577if (forwardContext == TextPointerContext.Text && backwardContext != TextPointerContext.Text) 754while (position.GetPointerContext(direction) == TextPointerContext.Text) 767TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 769if (context != TextPointerContext.ElementStart && context != TextPointerContext.ElementEnd) 925if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 939if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 1030while (position.GetPointerContext(direction) == TextPointerContext.Text) 1043while (position.GetPointerContext(direction) != TextPointerContext.Text) 1053while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 1061if (position.GetPointerContext(direction) != TextPointerContext.None) 1247private bool IsElementBoundary(TextPointerContext symbolType) 1249return ((symbolType == TextPointerContext.ElementStart) || (symbolType == TextPointerContext.ElementEnd));
System\Windows\Documents\CompositionAdorner.cs (4)
485while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 490Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 624while ((startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) && 625(startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text))
System\Windows\Documents\DocumentSequenceTextContainer.cs (3)
124TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction) 690if (highlightRangeStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 992if (textPosition.GetPointerContext(direction) == TextPointerContext.None)
System\Windows\Documents\DocumentSequenceTextPointer.cs (16)
82TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 633public static TextPointerContext GetPointerContext(DocumentSequenceTextPointer thisTp, LogicalDirection direction) 868TextPointerContext context = thisTp.ChildPointer.GetPointerContext(direction); 870if (context != TextPointerContext.None) 880while (context == TextPointerContext.None && !block.IsTail) 892while (context == TextPointerContext.None && !block.IsHead) 916private static TextPointerContext xGapAwareGetSymbolType(DocumentSequenceTextPointer thisTp, LogicalDirection direction) 967if (tp1.ChildPointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None || 968tp2.ChildPointer.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.None) 977if (block.ChildContainer.Start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1036TextPointerContext tst = childTn.GetPointerContext(scanDir); 1039case TextPointerContext.ElementStart: 1044case TextPointerContext.ElementEnd: 1049case TextPointerContext.EmbeddedElement: 1054case TextPointerContext.Text: 1067case TextPointerContext.None:
System\Windows\Documents\FixedElement.cs (4)
263TextPointerContext tpc = pos.GetPointerContext(LogicalDirection.Forward); 264if (tpc == TextPointerContext.Text) 268else if (tpc == TextPointerContext.EmbeddedElement) 272else if (tpc == TextPointerContext.ElementStart)
System\Windows\Documents\FixedTextContainer.cs (1)
108TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Documents\FixedTextPointer.cs (10)
95TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 108if (_flowPosition.GetPointerContext(direction) != TextPointerContext.Text) 134if (_flowPosition.GetPointerContext(direction) != TextPointerContext.Text) 148TextPointerContext tpc = _flowPosition.GetPointerContext(direction); 149if (!(tpc == TextPointerContext.EmbeddedElement || tpc == TextPointerContext.ElementStart || tpc == TextPointerContext.ElementEnd)) 164TextPointerContext tt = _flowPosition.GetPointerContext(direction); 166if (tt == TextPointerContext.ElementStart || tt == TextPointerContext.ElementEnd)
System\Windows\Documents\FixedTextView.cs (11)
178if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1082TextPointerContext symbolType = ((ITextPointer)ftp).GetPointerContext(textdir); 1084if (ftp.FlowPosition.IsBoundary || symbolType == TextPointerContext.None) 1089if (symbolType == TextPointerContext.ElementStart || symbolType == TextPointerContext.ElementEnd) 1094case TextPointerContext.ElementStart: 1097case TextPointerContext.ElementEnd: 1107if (symbolType != TextPointerContext.Text && symbolType != TextPointerContext.EmbeddedElement) 1127Debug.Assert(symbolType == TextPointerContext.Text || symbolType == TextPointerContext.EmbeddedElement);
System\Windows\Documents\FlowPosition.cs (15)
172internal TextPointerContext GetPointerContext(LogicalDirection dir) 182Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 199Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 282TextPointerContext tst; 285(tst = flowScan.GetPointerContext(LogicalDirection.Backward))!= TextPointerContext.None) 287if (tst == TextPointerContext.ElementStart) 296else if (tst == TextPointerContext.ElementEnd) 613private TextPointerContext _vGetSymbolType(LogicalDirection dir) 645return TextPointerContext.None; 758private TextPointerContext _FlowNodeTypeToTextSymbol(FlowNodeType t) 763return TextPointerContext.ElementStart; 766return TextPointerContext.ElementEnd; 769return TextPointerContext.Text; 773return TextPointerContext.EmbeddedElement; 776return TextPointerContext.None;
System\Windows\Documents\Highlights.cs (5)
182case TextPointerContext.None: 186case TextPointerContext.Text: 198case TextPointerContext.EmbeddedElement: 199case TextPointerContext.ElementStart: 200case TextPointerContext.ElementEnd:
System\Windows\Documents\ImmComposition.cs (14)
1413case TextPointerContext.Text: 1422case TextPointerContext.EmbeddedElement: 1426case TextPointerContext.ElementStart: 1427case TextPointerContext.ElementEnd: 1437case TextPointerContext.None: 1465case TextPointerContext.Text: 1473case TextPointerContext.EmbeddedElement: 1477case TextPointerContext.ElementStart: 1478case TextPointerContext.ElementEnd: 1487case TextPointerContext.None: 1564case TextPointerContext.Text: 1567case TextPointerContext.None: 1580case TextPointerContext.Text: 1583case TextPointerContext.None:
System\Windows\Documents\ITextContainer.cs (1)
48TextPointerContext GetPointerContext(StaticTextPointer pointer, LogicalDirection direction);
System\Windows\Documents\ITextPointer.cs (1)
52TextPointerContext GetPointerContext(LogicalDirection direction);
System\Windows\Documents\List.cs (1)
194if (textNav.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
System\Windows\Documents\NullTextContainer.cs (1)
101TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Documents\NullTextNavigator.cs (2)
71TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 74return TextPointerContext.None;
System\Windows\Documents\Paragraph.cs (3)
253TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 254if (symbolType == TextPointerContext.Text || 255symbolType == TextPointerContext.EmbeddedElement ||
System\Windows\Documents\RangeContentEnumerator.cs (8)
102case TextPointerContext.Text: 114while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 121case TextPointerContext.EmbeddedElement: 128case TextPointerContext.ElementStart: 178case TextPointerContext.Text: 185while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text && _navigator.CompareTo(_end) < 0); 189case TextPointerContext.EmbeddedElement: 193case TextPointerContext.ElementStart:
System\Windows\Documents\Span.cs (2)
223if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 227else if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd)
System\Windows\Documents\Speller.cs (9)
1101if (position.GetPointerContext(direction) == TextPointerContext.None) 1380searchPosition.GetPointerContext(direction) != TextPointerContext.None); 1687case TextPointerContext.Text: 1714case TextPointerContext.ElementStart: 1715case TextPointerContext.ElementEnd: 1731case TextPointerContext.EmbeddedElement: 1798TextPointerContext context; 1805if (context == TextPointerContext.ElementStart && 1810else if (context == TextPointerContext.ElementEnd &&
System\Windows\Documents\StaticTextPointer.cs (1)
52internal TextPointerContext GetPointerContext(LogicalDirection direction)
System\Windows\Documents\TextContainer.cs (3)
500TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction) 504TextPointerContext context; 509context = TextPointerContext.Text;
System\windows\Documents\TextEditorMouse.cs (1)
722if (!(mouseMovePosition.GetPointerContext(mouseMovePosition.LogicalDirection) == TextPointerContext.EmbeddedElement))
System\windows\Documents\TextEditorSpelling.cs (9)
186textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 192textEnd.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 197if (textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text || 202Invariant.Assert(textEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 265case TextPointerContext.Text: 272case TextPointerContext.ElementStart: 273case TextPointerContext.ElementEnd: 284case TextPointerContext.EmbeddedElement: 285case TextPointerContext.None:
System\windows\Documents\TextEditorTyping.cs (10)
652position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 682else if (backspacePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 810position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 811position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 816while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 824if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 843if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 849position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 857while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 864if (!(navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextEffectResolver.cs (2)
101while (navigator.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text 111while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text
System\Windows\Documents\TextElementEnumerator.cs (1)
135Invariant.Assert(_navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart,
System\Windows\Documents\TextFindEngine.cs (10)
661case TextPointerContext.Text: 698case TextPointerContext.None: 699case TextPointerContext.ElementStart: 700case TextPointerContext.ElementEnd: 730case TextPointerContext.EmbeddedElement: 890TextPointerContext context; 899if (context == TextPointerContext.ElementStart && 904else if (context == TextPointerContext.ElementEnd && 914if (context == TextPointerContext.ElementEnd && 919else if (context == TextPointerContext.ElementStart &&
System\Windows\Documents\TextPointer.cs (25)
41/// <para>Class <see cref="TextPointerContext"/> is an enum specifying what kind of 494/// <para>Returns <see cref="TextPointerContext.None"/> if this TextPointer 499/// <para>Returns <see cref="TextPointerContext.ElementStart"/> if the TextPointer 501/// <para>Returns <see cref="TextPointerContext.ElementEnd"/> if the TextPointer 503/// <para>Returns <see cref="TextPointerContext.Text"/> if the TextPointer 506/// <para>Returns <see cref="TextPointerContext.EmbeddedElement"/> is the TextPointer 539public TextPointerContext GetPointerContext(LogicalDirection direction) 1610TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1613while ((backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.ElementEnd) && 2383TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 3427internal static TextPointerContext GetPointerContextForward(TextTreeNode node, ElementEdge edge) 3431TextPointerContext symbolType; 3454symbolType = (node.ParentNode != null) ? TextPointerContext.ElementEnd : TextPointerContext.None; 3467symbolType = (node.GetContainingNode() is TextTreeRootNode) ? TextPointerContext.None : TextPointerContext.ElementEnd; 3473symbolType = TextPointerContext.Text; 3481internal static TextPointerContext GetPointerContextBackward(TextTreeNode node, ElementEdge edge) 3483TextPointerContext symbolType; 3499symbolType = (node.GetContainingNode() is TextTreeRootNode) ? TextPointerContext.None : TextPointerContext.ElementStart; 3506symbolType = (node.ParentNode != null) ? TextPointerContext.ElementStart : TextPointerContext.None; 3527symbolType = TextPointerContext.Text;
System\Windows\Documents\TextPointerBase.cs (59)
186TextPointerContext forwardContext = forwardPosition.GetPointerContext(LogicalDirection.Forward); 187TextPointerContext backwardContext = backwardPosition.GetPointerContext(LogicalDirection.Backward); 189backwardContext == TextPointerContext.ElementStart && 190forwardContext == TextPointerContext.ElementEnd 193backwardContext == TextPointerContext.ElementStart && TextSchema.IsNonFormattingInline(forwardType) && 197forwardContext == TextPointerContext.ElementEnd && TextSchema.IsNonFormattingInline(backwardType) && 201backwardContext == TextPointerContext.ElementEnd && forwardContext == TextPointerContext.ElementStart && 205backwardContext == TextPointerContext.ElementEnd && 207(forwardContext != TextPointerContext.ElementEnd || !IsAtNonMergeableInlineEnd(forwardPosition)) 209forwardContext == TextPointerContext.ElementStart && 211(backwardContext != TextPointerContext.ElementStart || !IsAtNonMergeableInlineStart(backwardPosition)) 228TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 229TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 231if (backwardContext == TextPointerContext.ElementStart && forwardContext == TextPointerContext.ElementEnd) 237else if (backwardContext == TextPointerContext.None && forwardContext == TextPointerContext.None) 252TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 253TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 255return (forwardContext == TextPointerContext.ElementStart && 256(backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.None) && 270position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 276position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd; 375while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 421if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 422position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 473if (navigator.GetPointerContext(insideWordDirection) != TextPointerContext.Text) 478if (navigator.GetPointerContext(insideWordDirection) == TextPointerContext.Text) 591TextPointerContext context = position.GetPointerContext(direction); 592if (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 601else if (context == TextPointerContext.EmbeddedElement) 712thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 713thisPosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 723return thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None && 724thisPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 739while (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 777paragraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 996if (thisNavigator.GetPointerContext(direction) != TextPointerContext.None) 1020TextPointerContext context = thisNavigator.GetPointerContext(direction); 1021if (context == TextPointerContext.ElementStart || context == TextPointerContext.None) 1143TextPointerContext directEnterScope; 1144TextPointerContext oppositeEnterScope; 1150directEnterScope = TextPointerContext.ElementStart; 1151oppositeEnterScope = TextPointerContext.ElementEnd; 1157directEnterScope = TextPointerContext.ElementEnd; 1158oppositeEnterScope = TextPointerContext.ElementStart; 1329TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1330TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1332if (backwardContext == TextPointerContext.Text && forwardContext == TextPointerContext.Text) 1436while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text); 1456while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 1489TextPointerContext context = (direction == LogicalDirection.Forward) ? TextPointerContext.ElementEnd : TextPointerContext.ElementStart;
System\Windows\Documents\TextRangeBase.cs (30)
343TextPointerContext nextContext = navigator.GetPointerContext(direction); 347if (nextContext == TextPointerContext.None // 350(nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Forward || // 351nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Backward) && // 355(nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Forward || // 356nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Backward) && // 411if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 678TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 681case TextPointerContext.Text: 684case TextPointerContext.ElementEnd: 707case TextPointerContext.EmbeddedElement : 711case TextPointerContext.ElementStart : 762bool theParagraphIsTheFirstInCollection = navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 765TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 767if (theParagraphIsTheFirstInCollection && symbolType == TextPointerContext.ElementEnd && 774if (symbolType == TextPointerContext.ElementStart) 1251while (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1311if (thisRange.Start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 1312thisRange.End.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 1358(insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.None || 1359insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) && 1360(insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None || 1361insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 1617TextPointerContext context = start.GetPointerContext(LogicalDirection.Forward); 1618while (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 1623if (context == TextPointerContext.EmbeddedElement) 1627while (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 1632if (context == TextPointerContext.EmbeddedElement && start.GetOffsetToPosition(end) == 1)
System\Windows\Documents\TextRangeEdit.cs (43)
66if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 72else if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 263while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 268while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 278position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 279position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 330inline.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 331inline.ElementEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 417if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 532if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 539else if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 555Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd, "position must be after ElementEnd"); 556Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "position must be before ElementStart"); 656while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1031if (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1248if (rangeStart.CompareTo(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1267TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1268TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1270if (!(backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.ElementEnd) && 1271!(forwardContext == TextPointerContext.ElementStart || forwardContext == TextPointerContext.ElementEnd)) 1278while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1283while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 1298while (previousPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 1307while (nextPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 1439while (startPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1440startPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 1580TextPointerContext enterScopeSymbol; 1581TextPointerContext leaveScopeSymbol; 1588enterScopeSymbol = TextPointerContext.ElementStart; 1589leaveScopeSymbol = TextPointerContext.ElementEnd; 1597enterScopeSymbol = TextPointerContext.ElementEnd; 1598leaveScopeSymbol = TextPointerContext.ElementStart; 1617TextPointerContext pointerContext = nextPosition.GetPointerContext(direction); 1619if (pointerContext == TextPointerContext.Text || pointerContext == TextPointerContext.EmbeddedElement) 1662Invariant.Assert(pointerContext == TextPointerContext.None, "Unknown pointer context"); 2083if (pointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 2118if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2187start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2188end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 2234if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeEditLists.cs (11)
76while (secondParagraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 144ListItem followingListItem = positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart 152Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 153Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd); 174while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 186while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 209if (mergePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementEnd || 210mergePosition.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementStart) 605while (end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 634while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 645while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
System\Windows\Documents\TextRangeEditTables.cs (5)
746bool insertBefore = position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 809while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 813while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1083cellEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 2090movingPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeSerialization.cs (32)
76range.End.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 205while (rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 213TextPointerContext runType = textReader.GetPointerContext(LogicalDirection.Forward); 217case TextPointerContext.ElementStart: 260case TextPointerContext.ElementEnd: 302case TextPointerContext.Text: 316case TextPointerContext.EmbeddedElement: 1414while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1419while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1457if (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1475if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1512TextPointerContext forwardFromStart = start.GetPointerContext(LogicalDirection.Forward); 1513TextPointerContext backwardFromEnd = end.GetPointerContext(LogicalDirection.Backward); 1514Invariant.Assert(forwardFromStart == TextPointerContext.ElementStart, "Expecting first opening tag of pasted fragment"); 1515Invariant.Assert(backwardFromEnd == TextPointerContext.ElementEnd, "Expecting last closing tag of pasted fragment"); 1522TextPointerContext backwardFromStart = start.GetPointerContext(LogicalDirection.Backward); 1523TextPointerContext forwardFromEnd = end.GetPointerContext(LogicalDirection.Forward); 1524Invariant.Assert(backwardFromStart == TextPointerContext.ElementStart || backwardFromStart == TextPointerContext.ElementEnd || backwardFromStart == TextPointerContext.None, "Bad context preceding a pasted fragment"); 1525Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1527Invariant.Assert(forwardFromEnd == TextPointerContext.ElementStart || forwardFromEnd == TextPointerContext.ElementEnd || forwardFromEnd == TextPointerContext.None, "Bad context following a pasted fragment"); 1528Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1550((Section)fragment).HasTrailingParagraphBreakOnPaste = range.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None; 1610TextPointerContext passedContext = start.GetPointerContext(LogicalDirection.Backward); 1611if (passedContext == TextPointerContext.ElementStart) 1656Invariant.Assert(passedContext != TextPointerContext.None, "TextPointerContext.None is not expected"); 1847Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1874Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1923while (hyperlinkStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextSchema.cs (2)
893TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 894if (forwardContext == TextPointerContext.ElementStart)
System\windows\Documents\TextSelection.cs (9)
481if (caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 482caretPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 500if (caretPosition.GetPointerContext(direction) == TextPointerContext.Text && 513(caretPosition.GetPointerContext(oppositeDirection) != TextPointerContext.Text || 1756return (This.Start.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 1757This.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text && 1951if (cursorPosition.GetPointerContext(cursorPosition.LogicalDirection) == TextPointerContext.EmbeddedElement) 2179caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) || // 2196caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && //
System\Windows\Documents\TextStore.cs (22)
415TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Forward); 419case TextPointerContext.Text: 423case TextPointerContext.EmbeddedElement: 427case TextPointerContext.ElementStart: 443case TextPointerContext.ElementEnd: 448case TextPointerContext.None: 1491if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 2452Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 2511Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement); 2553Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 2905while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 3180TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Backward); 3183case TextPointerContext.ElementStart: 3187case TextPointerContext.ElementEnd: 3188case TextPointerContext.EmbeddedElement: 3191case TextPointerContext.Text: 3195Invariant.Assert(context != TextPointerContext.None); 3420if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 3460TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 3462if (forwardContext == TextPointerContext.ElementStart) 3471else if (forwardContext != TextPointerContext.ElementEnd)
System\Windows\Documents\TextTreeFixupNode.cs (2)
107internal override TextPointerContext GetPointerContext(LogicalDirection direction) 110return TextPointerContext.None;
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (1)
56Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\TextTreeNode.cs (1)
367internal abstract TextPointerContext GetPointerContext(LogicalDirection direction);
System\Windows\Documents\TextTreeObjectNode.cs (2)
72internal override TextPointerContext GetPointerContext(LogicalDirection direction) 74return TextPointerContext.EmbeddedElement;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
52Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\TextTreeRootNode.cs (2)
84internal override TextPointerContext GetPointerContext(LogicalDirection direction) 87return TextPointerContext.None;
System\Windows\Documents\TextTreeTextElementNode.cs (3)
78internal override TextPointerContext GetPointerContext(LogicalDirection direction) 80return (direction == LogicalDirection.Forward) ? TextPointerContext.ElementStart : TextPointerContext.ElementEnd;
System\Windows\Documents\TextTreeTextNode.cs (2)
97internal override TextPointerContext GetPointerContext(LogicalDirection direction) 99return TextPointerContext.Text;