515 references to TextPointerContext
PresentationFramework (515)
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (5)
998TextPointerContext nextContext = cursor.GetPointerContext(LogicalDirection.Forward); 999if (nextContext == TextPointerContext.ElementStart) 1023else if (nextContext == TextPointerContext.ElementEnd) 1037else if (nextContext == TextPointerContext.Text || nextContext == TextPointerContext.EmbeddedElement)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (7)
801TextPointerContext currentContext = pointer.GetPointerContext(direction); 802if ((currentContext == TextPointerContext.ElementEnd || currentContext == TextPointerContext.ElementStart) && 835if (currentContext == TextPointerContext.ElementEnd && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementStart) 842if (currentContext == TextPointerContext.ElementStart && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementEnd)
MS\Internal\Documents\HostedElements.cs (4)
111if (_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || 112_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement) 186case TextPointerContext.ElementStart: 190case TextPointerContext.EmbeddedElement:
MS\Internal\Documents\TextBoxLine.cs (5)
83case TextPointerContext.Text: 87case TextPointerContext.None: 91case TextPointerContext.ElementStart: 92case TextPointerContext.ElementEnd: 93case TextPointerContext.EmbeddedElement:
MS\Internal\Documents\TextContainerHelper.cs (2)
324if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 345else if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement)
MS\Internal\PtsHost\ContainerParagraph.cs (5)
1034case TextPointerContext.Text: 1049case TextPointerContext.ElementEnd: 1060case TextPointerContext.ElementStart: 1094case TextPointerContext.EmbeddedElement: 1100case TextPointerContext.None:
MS\Internal\PtsHost\FlowDocumentPage.cs (1)
965case TextPointerContext.EmbeddedElement:
MS\Internal\PtsHost\Line.cs (11)
160case TextPointerContext.Text: 164case TextPointerContext.ElementStart: 168case TextPointerContext.ElementEnd: 172case TextPointerContext.EmbeddedElement: 176case TextPointerContext.None: 208while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 585TextPointerContext type = TextPointerContext.None; 617if (type == TextPointerContext.Text || type == TextPointerContext.ElementEnd) 621else if (type == TextPointerContext.ElementStart)
MS\Internal\PtsHost\LineBase.cs (4)
92Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 141Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 256Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 310Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
MS\Internal\PtsHost\ListParagraph.cs (3)
80TextPointerContext runType = textPointer.GetPointerContext(LogicalDirection.Forward); 81if (runType == TextPointerContext.ElementStart) 116else if (runType == TextPointerContext.ElementEnd)
MS\Internal\PtsHost\OptimalTextSource.cs (6)
108case TextPointerContext.Text: 112case TextPointerContext.ElementStart: 116case TextPointerContext.ElementEnd: 120case TextPointerContext.EmbeddedElement: 124case TextPointerContext.None: 157while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text &&
MS\Internal\PtsHost\TextParaClient.cs (8)
649RectFromDcpSimpleLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 654RectFromDcpCompositeLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 1639TextPointerContext context, 1703if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 1727TextPointerContext context, 1797if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement))
MS\Internal\PtsHost\TextParagraph.cs (3)
888while(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 918if(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1220if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
MS\Internal\Text\ComplexLine.cs (15)
49case TextPointerContext.Text: 53case TextPointerContext.ElementStart: 57case TextPointerContext.ElementEnd: 61case TextPointerContext.EmbeddedElement: 65case TextPointerContext.None: 97while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 260TextPointerContext type = TextPointerContext.None; 305if (type == TextPointerContext.Text || type == TextPointerContext.ElementEnd) 309else if (type == TextPointerContext.ElementStart) 339Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 386Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 477Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 527Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
System\Windows\Controls\AccessText.cs (4)
579TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 582case TextPointerContext.Text: 625TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 628case TextPointerContext.Text:
System\Windows\Controls\PasswordTextContainer.cs (1)
236TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Controls\PasswordTextNavigator.cs (4)
138TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 140TextPointerContext symbolType; 145symbolType = TextPointerContext.None; 149symbolType = TextPointerContext.Text;
System\Windows\Controls\TextAdaptor.cs (3)
618TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 619if (context == TextPointerContext.ElementStart) 629else if (context == TextPointerContext.EmbeddedElement)
System\Windows\Controls\TextBlock.cs (1)
3671case TextPointerContext.EmbeddedElement:
System\Windows\Controls\TextRangeAdaptor.cs (23)
555TextPointerContext forwardContext = _start.GetPointerContext(LogicalDirection.Forward); 558TextPointerContext backwardContext = _start.GetPointerContext(LogicalDirection.Backward); 560if (backwardContext == TextPointerContext.None) 562if (forwardContext == TextPointerContext.Text && backwardContext != TextPointerContext.Text) 572TextPointerContext backwardContext = _end.GetPointerContext(LogicalDirection.Backward); 575TextPointerContext forwardContext = _end.GetPointerContext(LogicalDirection.Forward); 577if (forwardContext == TextPointerContext.None) 579if (forwardContext == TextPointerContext.Text && backwardContext != TextPointerContext.Text) 756while (position.GetPointerContext(direction) == TextPointerContext.Text) 769TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 771if (context != TextPointerContext.ElementStart && context != TextPointerContext.ElementEnd) 927if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 941if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 1032while (position.GetPointerContext(direction) == TextPointerContext.Text) 1045while (position.GetPointerContext(direction) != TextPointerContext.Text) 1055while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 1063if (position.GetPointerContext(direction) != TextPointerContext.None) 1249private bool IsElementBoundary(TextPointerContext symbolType) 1251return ((symbolType == TextPointerContext.ElementStart) || (symbolType == TextPointerContext.ElementEnd));
System\Windows\Documents\CompositionAdorner.cs (4)
488while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 493Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 627while ((startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) && 628(startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text))
System\Windows\Documents\DocumentSequenceTextContainer.cs (3)
132TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction) 698if (highlightRangeStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 1000if (textPosition.GetPointerContext(direction) == TextPointerContext.None)
System\Windows\Documents\DocumentSequenceTextPointer.cs (16)
88TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 639public static TextPointerContext GetPointerContext(DocumentSequenceTextPointer thisTp, LogicalDirection direction) 874TextPointerContext context = thisTp.ChildPointer.GetPointerContext(direction); 876if (context != TextPointerContext.None) 886while (context == TextPointerContext.None && !block.IsTail) 898while (context == TextPointerContext.None && !block.IsHead) 922private static TextPointerContext xGapAwareGetSymbolType(DocumentSequenceTextPointer thisTp, LogicalDirection direction) 973if (tp1.ChildPointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None || 974tp2.ChildPointer.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.None) 983if (block.ChildContainer.Start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1042TextPointerContext tst = childTn.GetPointerContext(scanDir); 1045case TextPointerContext.ElementStart: 1050case TextPointerContext.ElementEnd: 1055case TextPointerContext.EmbeddedElement: 1060case TextPointerContext.Text: 1073case TextPointerContext.None:
System\Windows\Documents\FixedElement.cs (4)
271TextPointerContext tpc = pos.GetPointerContext(LogicalDirection.Forward); 272if (tpc == TextPointerContext.Text) 276else if (tpc == TextPointerContext.EmbeddedElement) 280else if (tpc == TextPointerContext.ElementStart)
System\Windows\Documents\FixedTextContainer.cs (1)
117TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Documents\FixedTextPointer.cs (10)
100TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 113if (_flowPosition.GetPointerContext(direction) != TextPointerContext.Text) 139if (_flowPosition.GetPointerContext(direction) != TextPointerContext.Text) 153TextPointerContext tpc = _flowPosition.GetPointerContext(direction); 154if (!(tpc == TextPointerContext.EmbeddedElement || tpc == TextPointerContext.ElementStart || tpc == TextPointerContext.ElementEnd)) 169TextPointerContext tt = _flowPosition.GetPointerContext(direction); 171if (tt == TextPointerContext.ElementStart || tt == TextPointerContext.ElementEnd)
System\Windows\Documents\FixedTextView.cs (11)
186if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1090TextPointerContext symbolType = ((ITextPointer)ftp).GetPointerContext(textdir); 1092if (ftp.FlowPosition.IsBoundary || symbolType == TextPointerContext.None) 1097if (symbolType == TextPointerContext.ElementStart || symbolType == TextPointerContext.ElementEnd) 1102case TextPointerContext.ElementStart: 1105case TextPointerContext.ElementEnd: 1115if (symbolType != TextPointerContext.Text && symbolType != TextPointerContext.EmbeddedElement) 1135Debug.Assert(symbolType == TextPointerContext.Text || symbolType == TextPointerContext.EmbeddedElement);
System\Windows\Documents\FlowPosition.cs (15)
176internal TextPointerContext GetPointerContext(LogicalDirection dir) 186Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 203Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 286TextPointerContext tst; 289(tst = flowScan.GetPointerContext(LogicalDirection.Backward))!= TextPointerContext.None) 291if (tst == TextPointerContext.ElementStart) 300else if (tst == TextPointerContext.ElementEnd) 617private TextPointerContext _vGetSymbolType(LogicalDirection dir) 649return TextPointerContext.None; 762private TextPointerContext _FlowNodeTypeToTextSymbol(FlowNodeType t) 767return TextPointerContext.ElementStart; 770return TextPointerContext.ElementEnd; 773return TextPointerContext.Text; 777return TextPointerContext.EmbeddedElement; 780return TextPointerContext.None;
System\Windows\Documents\Highlights.cs (5)
183case TextPointerContext.None: 187case TextPointerContext.Text: 199case TextPointerContext.EmbeddedElement: 200case TextPointerContext.ElementStart: 201case TextPointerContext.ElementEnd:
System\Windows\Documents\ImmComposition.cs (14)
1421case TextPointerContext.Text: 1430case TextPointerContext.EmbeddedElement: 1434case TextPointerContext.ElementStart: 1435case TextPointerContext.ElementEnd: 1445case TextPointerContext.None: 1473case TextPointerContext.Text: 1481case TextPointerContext.EmbeddedElement: 1485case TextPointerContext.ElementStart: 1486case TextPointerContext.ElementEnd: 1495case TextPointerContext.None: 1572case TextPointerContext.Text: 1575case TextPointerContext.None: 1588case TextPointerContext.Text: 1591case TextPointerContext.None:
System\Windows\Documents\ITextContainer.cs (1)
49TextPointerContext GetPointerContext(StaticTextPointer pointer, LogicalDirection direction);
System\Windows\Documents\ITextPointer.cs (1)
54TextPointerContext GetPointerContext(LogicalDirection direction);
System\Windows\Documents\List.cs (1)
194if (textNav.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
System\Windows\Documents\NullTextContainer.cs (1)
105TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction)
System\Windows\Documents\NullTextNavigator.cs (2)
74TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 77return 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)
106case TextPointerContext.Text: 118while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 125case TextPointerContext.EmbeddedElement: 132case TextPointerContext.ElementStart: 182case TextPointerContext.Text: 189while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text && _navigator.CompareTo(_end) < 0); 193case TextPointerContext.EmbeddedElement: 197case TextPointerContext.ElementStart:
System\Windows\Documents\Span.cs (2)
224if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 228else if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd)
System\Windows\Documents\Speller.cs (9)
1120if (position.GetPointerContext(direction) == TextPointerContext.None) 1399searchPosition.GetPointerContext(direction) != TextPointerContext.None); 1716case TextPointerContext.Text: 1743case TextPointerContext.ElementStart: 1744case TextPointerContext.ElementEnd: 1760case TextPointerContext.EmbeddedElement: 1827TextPointerContext context; 1834if (context == TextPointerContext.ElementStart && 1839else if (context == TextPointerContext.ElementEnd &&
System\Windows\Documents\StaticTextPointer.cs (1)
56internal TextPointerContext GetPointerContext(LogicalDirection direction)
System\Windows\Documents\TextContainer.cs (3)
505TextPointerContext ITextContainer.GetPointerContext(StaticTextPointer pointer, LogicalDirection direction) 509TextPointerContext context; 514context = TextPointerContext.Text;
System\windows\Documents\TextEditorMouse.cs (1)
736if (!(mouseMovePosition.GetPointerContext(mouseMovePosition.LogicalDirection) == TextPointerContext.EmbeddedElement))
System\windows\Documents\TextEditorSpelling.cs (9)
187textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 193textEnd.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 198if (textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text || 203Invariant.Assert(textEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 266case TextPointerContext.Text: 273case TextPointerContext.ElementStart: 274case TextPointerContext.ElementEnd: 285case TextPointerContext.EmbeddedElement: 286case TextPointerContext.None:
System\windows\Documents\TextEditorTyping.cs (10)
661position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 691else if (backspacePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 819position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 820position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 825while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 833if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 852if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 858position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 866while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 873if (!(navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextEffectResolver.cs (2)
105while (navigator.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text 115while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text
System\Windows\Documents\TextElementEnumerator.cs (1)
141Invariant.Assert(_navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart,
System\Windows\Documents\TextFindEngine.cs (10)
669case TextPointerContext.Text: 706case TextPointerContext.None: 707case TextPointerContext.ElementStart: 708case TextPointerContext.ElementEnd: 738case TextPointerContext.EmbeddedElement: 898TextPointerContext context; 907if (context == TextPointerContext.ElementStart && 912else if (context == TextPointerContext.ElementEnd && 922if (context == TextPointerContext.ElementEnd && 927else if (context == TextPointerContext.ElementStart &&
System\Windows\Documents\TextPointer.cs (25)
46/// <para>Class <see cref="TextPointerContext"/> is an enum specifying what kind of 499/// <para>Returns <see cref="TextPointerContext.None"/> if this TextPointer 504/// <para>Returns <see cref="TextPointerContext.ElementStart"/> if the TextPointer 506/// <para>Returns <see cref="TextPointerContext.ElementEnd"/> if the TextPointer 508/// <para>Returns <see cref="TextPointerContext.Text"/> if the TextPointer 511/// <para>Returns <see cref="TextPointerContext.EmbeddedElement"/> is the TextPointer 544public TextPointerContext GetPointerContext(LogicalDirection direction) 1615TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1618while ((backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.ElementEnd) && 2388TextPointerContext ITextPointer.GetPointerContext(LogicalDirection direction) 3432internal static TextPointerContext GetPointerContextForward(TextTreeNode node, ElementEdge edge) 3436TextPointerContext symbolType; 3459symbolType = (node.ParentNode != null) ? TextPointerContext.ElementEnd : TextPointerContext.None; 3472symbolType = (node.GetContainingNode() is TextTreeRootNode) ? TextPointerContext.None : TextPointerContext.ElementEnd; 3478symbolType = TextPointerContext.Text; 3486internal static TextPointerContext GetPointerContextBackward(TextTreeNode node, ElementEdge edge) 3488TextPointerContext symbolType; 3504symbolType = (node.GetContainingNode() is TextTreeRootNode) ? TextPointerContext.None : TextPointerContext.ElementStart; 3511symbolType = (node.ParentNode != null) ? TextPointerContext.ElementStart : TextPointerContext.None; 3532symbolType = TextPointerContext.Text;
System\Windows\Documents\TextPointerBase.cs (59)
188TextPointerContext forwardContext = forwardPosition.GetPointerContext(LogicalDirection.Forward); 189TextPointerContext backwardContext = backwardPosition.GetPointerContext(LogicalDirection.Backward); 191backwardContext == TextPointerContext.ElementStart && 192forwardContext == TextPointerContext.ElementEnd 195backwardContext == TextPointerContext.ElementStart && TextSchema.IsNonFormattingInline(forwardType) && 199forwardContext == TextPointerContext.ElementEnd && TextSchema.IsNonFormattingInline(backwardType) && 203backwardContext == TextPointerContext.ElementEnd && forwardContext == TextPointerContext.ElementStart && 207backwardContext == TextPointerContext.ElementEnd && 209(forwardContext != TextPointerContext.ElementEnd || !IsAtNonMergeableInlineEnd(forwardPosition)) 211forwardContext == TextPointerContext.ElementStart && 213(backwardContext != TextPointerContext.ElementStart || !IsAtNonMergeableInlineStart(backwardPosition)) 230TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 231TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 233if (backwardContext == TextPointerContext.ElementStart && forwardContext == TextPointerContext.ElementEnd) 239else if (backwardContext == TextPointerContext.None && forwardContext == TextPointerContext.None) 254TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 255TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 257return (forwardContext == TextPointerContext.ElementStart && 258(backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.None) && 272position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 278position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd; 377while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 423if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 424position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 475if (navigator.GetPointerContext(insideWordDirection) != TextPointerContext.Text) 480if (navigator.GetPointerContext(insideWordDirection) == TextPointerContext.Text) 593TextPointerContext context = position.GetPointerContext(direction); 594if (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 603else if (context == TextPointerContext.EmbeddedElement) 717thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 718thisPosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 728return thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None && 729thisPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 744while (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 782paragraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1001if (thisNavigator.GetPointerContext(direction) != TextPointerContext.None) 1025TextPointerContext context = thisNavigator.GetPointerContext(direction); 1026if (context == TextPointerContext.ElementStart || context == TextPointerContext.None) 1148TextPointerContext directEnterScope; 1149TextPointerContext oppositeEnterScope; 1155directEnterScope = TextPointerContext.ElementStart; 1156oppositeEnterScope = TextPointerContext.ElementEnd; 1162directEnterScope = TextPointerContext.ElementEnd; 1163oppositeEnterScope = TextPointerContext.ElementStart; 1334TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1335TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1337if (backwardContext == TextPointerContext.Text && forwardContext == TextPointerContext.Text) 1441while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text); 1461while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 1494TextPointerContext context = (direction == LogicalDirection.Forward) ? TextPointerContext.ElementEnd : TextPointerContext.ElementStart;
System\Windows\Documents\TextRangeBase.cs (30)
346TextPointerContext nextContext = navigator.GetPointerContext(direction); 350if (nextContext == TextPointerContext.None // 353(nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Forward || // 354nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Backward) && // 358(nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Forward || // 359nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Backward) && // 414if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 681TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 684case TextPointerContext.Text: 687case TextPointerContext.ElementEnd: 710case TextPointerContext.EmbeddedElement : 714case TextPointerContext.ElementStart : 765bool theParagraphIsTheFirstInCollection = navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 768TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 770if (theParagraphIsTheFirstInCollection && symbolType == TextPointerContext.ElementEnd && 777if (symbolType == TextPointerContext.ElementStart) 1254while (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1314if (thisRange.Start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 1315thisRange.End.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 1361(insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.None || 1362insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) && 1363(insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None || 1364insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 1620TextPointerContext context = start.GetPointerContext(LogicalDirection.Forward); 1621while (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 1626if (context == TextPointerContext.EmbeddedElement) 1630while (context == TextPointerContext.ElementStart || context == TextPointerContext.ElementEnd) 1635if (context == TextPointerContext.EmbeddedElement && start.GetOffsetToPosition(end) == 1)
System\Windows\Documents\TextRangeEdit.cs (43)
68if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 74else if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 265while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 270while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 280position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 281position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 332inline.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 333inline.ElementEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 419if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 534if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 541else if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 557Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd, "position must be after ElementEnd"); 558Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "position must be before ElementStart"); 658while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1033if (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1250if (rangeStart.CompareTo(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1269TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1270TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1272if (!(backwardContext == TextPointerContext.ElementStart || backwardContext == TextPointerContext.ElementEnd) && 1273!(forwardContext == TextPointerContext.ElementStart || forwardContext == TextPointerContext.ElementEnd)) 1280while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1285while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 1300while (previousPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 1309while (nextPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 1441while (startPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1442startPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 1582TextPointerContext enterScopeSymbol; 1583TextPointerContext leaveScopeSymbol; 1590enterScopeSymbol = TextPointerContext.ElementStart; 1591leaveScopeSymbol = TextPointerContext.ElementEnd; 1599enterScopeSymbol = TextPointerContext.ElementEnd; 1600leaveScopeSymbol = TextPointerContext.ElementStart; 1619TextPointerContext pointerContext = nextPosition.GetPointerContext(direction); 1621if (pointerContext == TextPointerContext.Text || pointerContext == TextPointerContext.EmbeddedElement) 1664Invariant.Assert(pointerContext == TextPointerContext.None, "Unknown pointer context"); 2085if (pointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 2120if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2189start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2190end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 2236if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeEditLists.cs (11)
78while (secondParagraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 146ListItem followingListItem = positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart 154Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 155Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd); 176while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 188while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 211if (mergePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementEnd || 212mergePosition.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementStart) 607while (end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 636while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 647while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
System\Windows\Documents\TextRangeEditTables.cs (5)
748bool insertBefore = position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 811while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 815while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1085cellEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 2092movingPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeSerialization.cs (32)
82range.End.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 211while (rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 219TextPointerContext runType = textReader.GetPointerContext(LogicalDirection.Forward); 223case TextPointerContext.ElementStart: 266case TextPointerContext.ElementEnd: 308case TextPointerContext.Text: 322case TextPointerContext.EmbeddedElement: 1420while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1425while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1463if (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1481if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1518TextPointerContext forwardFromStart = start.GetPointerContext(LogicalDirection.Forward); 1519TextPointerContext backwardFromEnd = end.GetPointerContext(LogicalDirection.Backward); 1520Invariant.Assert(forwardFromStart == TextPointerContext.ElementStart, "Expecting first opening tag of pasted fragment"); 1521Invariant.Assert(backwardFromEnd == TextPointerContext.ElementEnd, "Expecting last closing tag of pasted fragment"); 1528TextPointerContext backwardFromStart = start.GetPointerContext(LogicalDirection.Backward); 1529TextPointerContext forwardFromEnd = end.GetPointerContext(LogicalDirection.Forward); 1530Invariant.Assert(backwardFromStart == TextPointerContext.ElementStart || backwardFromStart == TextPointerContext.ElementEnd || backwardFromStart == TextPointerContext.None, "Bad context preceding a pasted fragment"); 1531Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1533Invariant.Assert(forwardFromEnd == TextPointerContext.ElementStart || forwardFromEnd == TextPointerContext.ElementEnd || forwardFromEnd == TextPointerContext.None, "Bad context following a pasted fragment"); 1534Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1556((Section)fragment).HasTrailingParagraphBreakOnPaste = range.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None; 1616TextPointerContext passedContext = start.GetPointerContext(LogicalDirection.Backward); 1617if (passedContext == TextPointerContext.ElementStart) 1662Invariant.Assert(passedContext != TextPointerContext.None, "TextPointerContext.None is not expected"); 1853Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1880Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1929while (hyperlinkStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextSchema.cs (2)
894TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 895if (forwardContext == TextPointerContext.ElementStart)
System\windows\Documents\TextSelection.cs (9)
484if (caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 485caretPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 503if (caretPosition.GetPointerContext(direction) == TextPointerContext.Text && 516(caretPosition.GetPointerContext(oppositeDirection) != TextPointerContext.Text || 1759return (This.Start.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 1760This.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text && 1954if (cursorPosition.GetPointerContext(cursorPosition.LogicalDirection) == TextPointerContext.EmbeddedElement) 2182caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) || // 2199caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && //
System\Windows\Documents\TextStore.cs (22)
426TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Forward); 430case TextPointerContext.Text: 434case TextPointerContext.EmbeddedElement: 438case TextPointerContext.ElementStart: 454case TextPointerContext.ElementEnd: 459case TextPointerContext.None: 1502if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 2472Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 2531Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement); 2573Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 2925while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 3200TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Backward); 3203case TextPointerContext.ElementStart: 3207case TextPointerContext.ElementEnd: 3208case TextPointerContext.EmbeddedElement: 3211case TextPointerContext.Text: 3215Invariant.Assert(context != TextPointerContext.None); 3440if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 3480TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 3482if (forwardContext == TextPointerContext.ElementStart) 3491else if (forwardContext != TextPointerContext.ElementEnd)
System\Windows\Documents\TextTreeFixupNode.cs (2)
108internal override TextPointerContext GetPointerContext(LogicalDirection direction) 111return TextPointerContext.None;
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (1)
57Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\TextTreeNode.cs (1)
368internal abstract TextPointerContext GetPointerContext(LogicalDirection direction);
System\Windows\Documents\TextTreeObjectNode.cs (2)
73internal override TextPointerContext GetPointerContext(LogicalDirection direction) 75return TextPointerContext.EmbeddedElement;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
53Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\TextTreeRootNode.cs (2)
86internal override TextPointerContext GetPointerContext(LogicalDirection direction) 89return 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;