MS\Internal\PtsHost\TextParaClient.cs (24)
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);
1091LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
1684if (orientation == LogicalDirection.Forward)
1781if (orientation == LogicalDirection.Forward)
2034ITextPointer position = Paragraph.StructuralCache.TextContainer.CreatePointerAtOffset(Paragraph.ParagraphStartCharacterPosition + dcp, LogicalDirection.Forward);
2423else if (position.LogicalDirection == LogicalDirection.Forward)
2547else if (position.LogicalDirection == LogicalDirection.Forward)
2623else if (dcp >= lineDesc.dcpLim - 1 && direction == LogicalDirection.Forward)
2652if (direction == LogicalDirection.Forward)
2662if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpLim) && direction == LogicalDirection.Forward)
2672logicalDirection = LogicalDirection.Forward;
2681logicalDirection = LogicalDirection.Forward;
2690logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
2782else if (dcp >= element.dcpLim - 1 && direction == LogicalDirection.Forward)
2815if (direction == LogicalDirection.Forward)
2825if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpLim) && direction == LogicalDirection.Forward)
2836logicalDirection = LogicalDirection.Forward;
2845logicalDirection = LogicalDirection.Forward;
2855logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
2938logicalDirection = LogicalDirection.Forward;
2947logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
3064logicalDirection = LogicalDirection.Forward;
3073logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
MS\Internal\Text\ComplexLine.cs (13)
42switch (position.GetPointerContext(LogicalDirection.Forward))
283position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward);
290type = position.GetPointerContext(LogicalDirection.Forward);
306element = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
334Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters.");
353endOfRunPosition = _owner.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward);
368int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length);
381Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge.");
385TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
472Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge.");
476TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
522Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
525DependencyObject element = position.GetAdjacentElement(LogicalDirection.Forward) as DependencyObject;
System\Windows\Controls\TextBox.cs (18)
161TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward);
165newStart = newStart.GetInsertionPosition(LogicalDirection.Forward);
173TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward);
176newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward);
264TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward);
445textPointer = textPointer.GetNextInsertionPosition(LogicalDirection.Forward);
454textPointer = textPointer.GetPositionAtOffset(0, LogicalDirection.Forward);
479TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward);
480SpellingError spellingError = this.TextEditor.GetSpellingErrorAtPosition(position, LogicalDirection.Forward);
484position = this.TextContainer.CreatePointerAtOffset(charIndex + 1, LogicalDirection.Forward);
811TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward);
814newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward);
855TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward);
859newStart = newStart.GetInsertionPosition(LogicalDirection.Forward);
867TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward);
870newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward);
1477if (TextPointerBase.IsNextToPlainLineBreak(textPointer, LogicalDirection.Forward))
1479textPointer.MoveToNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Controls\TextRangeAdaptor.cs (43)
532TextPointerBase.MoveToNextInsertionPosition(_end, LogicalDirection.Forward);
543MoveToNextWordBoundary(_end, LogicalDirection.Forward);
553TextPointerContext forwardContext = _start.GetPointerContext(LogicalDirection.Forward);
573TextPointerContext forwardContext = _end.GetPointerContext(LogicalDirection.Forward);
581_end.MoveToNextContextPosition(LogicalDirection.Forward);
587_start.SetLogicalDirection(LogicalDirection.Forward);
588_end.SetLogicalDirection(LogicalDirection.Forward);
763if (moved && direction == LogicalDirection.Forward)
767TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward);
772position.MoveToNextContextPosition(LogicalDirection.Forward);
791if (direction == LogicalDirection.Forward)
809nextLineStart = GetInsertionPosition(nextLineStart, LogicalDirection.Forward);
814position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
841position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
854if (direction == LogicalDirection.Forward)
861if (nextParagraphStart.MoveToNextInsertionPosition(LogicalDirection.Forward))
871position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
892position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
921if (direction == LogicalDirection.Forward)
925if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd)
931Invariant.Assert(position.MoveToNextContextPosition(LogicalDirection.Forward));
933MoveToInsertionPosition(position, LogicalDirection.Forward);
954if (direction == LogicalDirection.Forward)
964if (position.CompareTo(GetInsertionPosition(position.TextContainer.Start, LogicalDirection.Forward)) != 0)
994LogicalDirection direction = (count > 0) ? LogicalDirection.Forward : LogicalDirection.Backward;
1075position.SetLogicalDirection(LogicalDirection.Forward);
1097MoveToInsertionPosition(position, LogicalDirection.Forward);
1112position.MoveToPosition(direction == LogicalDirection.Forward ? paragraphRange.End : paragraphRange.Start);
1151MoveToInsertionPosition(position, LogicalDirection.Forward);
1163if (direction == LogicalDirection.Forward)
1196return (direction == LogicalDirection.Forward) ? moved : -moved;
1211while (IsElementBoundary(start.GetPointerContext(LogicalDirection.Forward)))
1213if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) >= 0)
1235if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) > 0)
1446return TextPointerBase.IsAtWordBoundary(position, LogicalDirection.Forward);
1480position.SetLogicalDirection(LogicalDirection.Forward);
1638_end.MoveToNextInsertionPosition(LogicalDirection.Forward);
1691attrStart = position.CreatePointer(LogicalDirection.Forward);
1704ITextPointer position = _start.CreatePointer(LogicalDirection.Forward);
1715attrStart = position.CreatePointer(LogicalDirection.Forward);
1726if (!position.MoveToNextContextPosition(LogicalDirection.Forward))
1909_end.MoveToNextInsertionPosition(LogicalDirection.Forward);
1947if (MoveToUnitBoundary(position, start, count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward, unit))
System\Windows\Documents\DocumentSequenceTextContainer.cs (12)
113return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward));
660if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward))
662highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
670selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection));
674highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
681if (highlightRangeStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)
688TextPointerBase.GetTextWithLimit(highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), LogicalDirection.Forward, sb, 0, 256, highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward));
988ITextPointer dynamicTextPointer = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward);
1012DocumentSequenceTextPointer parentChangePosition = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward) as DocumentSequenceTextPointer;
1025childTp = direction == LogicalDirection.Forward ?
System\Windows\Documents\FixedDocument.cs (11)
498fixedTextPointer = new FixedTextPointer(true, LogicalDirection.Forward, flowPosition);
1071if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward))
1073highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
1084selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection));
1102highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
1105while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue);
1114LogicalDirection.Forward, typeof(HighlightComponent)) as AnnotationHighlightLayer.HighlightSegment;
1118highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
1128this.FixedContainer.GetMultiHighlights((FixedTextPointer)highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward),
1129(FixedTextPointer)highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward),
1434return new FixedTextPointer(true, LogicalDirection.Forward, flowPosition);
System\Windows\Documents\FixedFindEngine.cs (6)
152start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber)));
156start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber)));
167start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber));
171start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber));
304new FixedTextPointer(false, LogicalDirection.Forward,pageStartFlowPosition));
310firstSearchPageStart = new FixedTextPointer(false, LogicalDirection.Forward, endAsFTP.FixedTextContainer.FixedTextBuilder.GetPageStartFlowPosition(pageNumber));
System\Windows\Documents\Speller.cs (21)
191ExpandToWordBreakAndContext(error.End, LogicalDirection.Forward, language, out ITextPointer contentEnd, out ITextPointer contextEnd);
236if (_statusTable.GetError(pointer, LogicalDirection.Forward, out errorStart, out errorEnd))
246pointer = _statusTable.GetNextErrorTransition(pointer, LogicalDirection.Forward);
666end = GetNextLanguageTransition(start, LogicalDirection.Forward, language, end);
708wordBreakRight = SearchForWordBreaks(caretPosition, LogicalDirection.Forward, language, 1, false /* stopOnError */);
794ExpandToWordBreakAndContext(end, LogicalDirection.Forward, language, out contentEnd, out contextEnd);
1121inwardDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward;
1333closestErrorPosition = nextErrorTransition.CreateDynamicTextPointer(LogicalDirection.Forward);
1347direction == LogicalDirection.Forward && closestErrorPosition.CompareTo(searchPosition) < 0)
1358direction == LogicalDirection.Forward && closestLanguageTransition.CompareTo(searchPosition) < 0)
1391while ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) < 0) ||
1401if ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) > 0) ||
1469if (direction == LogicalDirection.Forward)
1685switch (position.GetPointerContext(LogicalDirection.Forward))
1688runCount = position.GetTextRunLength(LogicalDirection.Forward);
1692position.GetTextInRun(LogicalDirection.Forward, _text, _textLength, runCount);
1728position.MoveToNextContextPosition(LogicalDirection.Forward);
1736position.MoveToNextContextPosition(LogicalDirection.Forward);
1803context = pointer.GetPointerContext(LogicalDirection.Forward);
1806TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
System\windows\Documents\TextEditorSelection.cs (43)
113ITextPointer lineStart = position.CreatePointer(LogicalDirection.Forward);
188LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
204LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
221LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
237LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
313ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward);
464if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward))
803ITextPointer caretPosition = lineRange.Start.GetFrozenPointer(LogicalDirection.Forward);
806This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Forward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true);
852LogicalDirection orientation = TextPointerBase.IsNextToPlainLineBreak(lineRange.End, LogicalDirection.Backward) ? LogicalDirection.Forward : LogicalDirection.Backward;
886This.Selection.SetCaretToPosition(This.TextContainer.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
946LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
962LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
978LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
994LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
1012if (This.Selection.ExtendToNextTableRow(LogicalDirection.Forward))
1070ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward);
1122if (TextPointerBase.IsNextToAnyBreak(newMovingPosition, LogicalDirection.Forward) ||
1123newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null)
1132newMovingPosition = newMovingPosition.GetInsertionPosition(LogicalDirection.Forward);
1133newMovingPosition = newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward);
1160if (newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null)
1321if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward))
1603ExtendSelectionAndBringIntoView(lineRange.Start.CreatePointer(LogicalDirection.Forward), This);
1655if (TextPointerBase.IsNextToPlainLineBreak(destination, LogicalDirection.Forward) ||
1656TextPointerBase.IsNextToRichLineBreak(destination, LogicalDirection.Forward))
1665destination = destination.GetNextInsertionPosition(LogicalDirection.Forward);
1669else if (TextPointerBase.IsNextToParagraphBreak(destination, LogicalDirection.Forward) &&
1674ITextPointer newDestination = destination.GetNextInsertionPosition(LogicalDirection.Forward);
2057ITextPointer movingEnd = (direction == LogicalDirection.Forward ? textEditor.Selection.End : textEditor.Selection.Start);
2067LogicalDirection contentDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward;
2115if (direction == LogicalDirection.Forward)
2118if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.End, LogicalDirection.Forward))
2128TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Forward);
2138if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.Start, LogicalDirection.Forward))
2141textEditor.Selection.SetCaretToPosition(textEditor.Selection.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
2150textEditor.Selection.SetCaretToPosition(wordBoundary, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
2194wordBoundary.SetLogicalDirection(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward);
2316movingPosition = movingPosition.GetFrozenPointer(LogicalDirection.Forward);
2333return This.Selection.IsEmpty ? This.Selection.Start : This.Selection.Start.GetFrozenPointer(LogicalDirection.Forward);
2399This.Selection.SetCaretToPosition(position, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
System\Windows\Documents\TextElement.cs (4)
291TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward);
314elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward);
380contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward);
994beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward);
System\Windows\Documents\TextPointerBase.cs (49)
83else if (direction == LogicalDirection.Forward && limit.CompareTo(thisPointer) <= 0)
100if (direction == LogicalDirection.Forward)
182Type forwardType = forwardPosition.GetElementType(LogicalDirection.Forward);
186TextPointerContext forwardContext = forwardPosition.GetPointerContext(LogicalDirection.Forward);
229TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward);
252TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward);
257typeof(Table).IsAssignableFrom(position.GetElementType(LogicalDirection.Forward)));
276position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd;
321BorderingElementCategory category = GetBorderingElementCategory(navigator, LogicalDirection.Forward);
328navigator.MoveToNextContextPosition(LogicalDirection.Forward);
330while (GetBorderingElementCategory(navigator, LogicalDirection.Forward) == BorderingElementCategory.MergeableScopingInline);
336elementType = navigator.GetElementType(LogicalDirection.Forward);
340navigator.MoveToNextContextPosition(LogicalDirection.Forward);
357elementType = navigator.GetElementType(LogicalDirection.Forward);
360navigator.MoveToNextInsertionPosition(LogicalDirection.Forward);
373navigator.MoveToNextContextPosition(LogicalDirection.Forward);
375while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart);
392return IsAtNonMergeableInlineEdge(position, LogicalDirection.Forward);
422position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd)
510return GetWordRange(thisPosition, LogicalDirection.Forward);
545if (moved && IsAtWordBoundary(thisPosition, /*insideWordDirection:*/LogicalDirection.Forward))
552MoveToNextWordBoundary(navigator, direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward);
566wordEnd = RestrictWithinBlock(thisPosition, wordEnd, LogicalDirection.Forward);
572wordEnd = wordEnd.GetFrozenPointer(LogicalDirection.Forward);
587Invariant.Assert(!(direction == LogicalDirection.Forward) || position.CompareTo(limit) <= 0, "for forward direcion position must be <= than linit");
610return limit.GetInsertionPosition(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward);
631(direction == LogicalDirection.Forward && IsCharUnicodeNewLine(textBuffer[0]))
697bool isAtLineWrappingPosition = position.LogicalDirection == LogicalDirection.Forward
712thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd &&
723return thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None &&
963int increment = direction == LogicalDirection.Forward ? +1 : -1;
980if ((direction == LogicalDirection.Forward && initialPosition.CompareTo(thisNavigator) < 0) ||
1024while (TextSchema.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward))
1035if (direction == LogicalDirection.Forward)
1086if (IsAtWordBoundary(thisNavigator, /*insideWordDirection:*/LogicalDirection.Forward))
1146if (direction == LogicalDirection.Forward)
1156oppositeDirection = LogicalDirection.Forward;
1256if (direction == LogicalDirection.Forward && IsAtNonMergeableInlineEnd(thisNavigator))
1258symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward);
1273symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward);
1284int increment = (direction == LogicalDirection.Forward) ? +1 : -1;
1329TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward);
1366position.GetTextInRun(LogicalDirection.Forward, neighborhood, 1, 1) == 1)
1428navigator.GetTextInRun(LogicalDirection.Forward, preceedingText, SelectionWordBreaker.MinContextLength - preceedingCount, runLength);
1443runLength = Math.Min(navigator.GetTextRunLength(LogicalDirection.Forward), SelectionWordBreaker.MinContextLength - followingCount);
1445navigator.GetTextInRun(LogicalDirection.Forward, followingText, followingCount, runLength);
1454navigator.MoveToInsertionPosition(LogicalDirection.Forward);
1456while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text);
1489TextPointerContext context = (direction == LogicalDirection.Forward) ? TextPointerContext.ElementEnd : TextPointerContext.ElementStart;
System\Windows\Documents\TextRangeBase.cs (41)
74textPointer = textPointer.GetFormatNormalizedPosition(LogicalDirection.Forward);
207!TextPointerBase.IsAtWordBoundary(thisRange.Start, LogicalDirection.Forward) && //
283!TextPointerBase.IsNextToAnyBreak(thisRange.End, LogicalDirection.Forward))
289nextPosition.MoveToNextInsertionPosition(LogicalDirection.Forward);
334SkipParagraphContent(end, LogicalDirection.Forward);
350(nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Forward || //
355(nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Forward || //
411if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text)
413moved = position.MoveToNextContextPosition(LogicalDirection.Forward);
417moved = position.MoveToInsertionPosition(LogicalDirection.Forward);
422moved = position.MoveToNextInsertionPosition(LogicalDirection.Forward);
493moved = position.MoveToNextContextPosition(LogicalDirection.Forward);
678TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward);
694navigator.MoveToNextContextPosition(LogicalDirection.Forward);
704navigator.MoveToNextContextPosition(LogicalDirection.Forward);
709navigator.MoveToNextContextPosition(LogicalDirection.Forward);
712elementType = navigator.GetElementType(LogicalDirection.Forward);
732navigator.MoveToNextContextPosition(LogicalDirection.Forward);
748int runLength = navigator.GetTextRunLength(LogicalDirection.Forward);
750runLength = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, charArray, 0, runLength, endPosition);
752navigator.MoveToNextContextPosition(LogicalDirection.Forward);
763navigator.MoveToNextContextPosition(LogicalDirection.Forward);
765TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward);
772navigator.MoveToNextContextPosition(LogicalDirection.Forward);
773symbolType = navigator.GetPointerContext(LogicalDirection.Forward);
796List list = (List)navigator.GetAdjacentElement(LogicalDirection.Forward);
817navigator.MoveToNextContextPosition(LogicalDirection.Forward);
827ListItem listItem = (ListItem)navigator.GetAdjacentElement(LogicalDirection.Forward);
859object element = navigator.GetAdjacentElement(LogicalDirection.Forward);
1312thisRange.End.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text)
1360(insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None ||
1361insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd);
1373ITextPointer newEnd = insertPosition.CreatePointer(LogicalDirection.Forward);
1378TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward);
1416newEnd = newEnd.GetNextInsertionPosition(LogicalDirection.Forward);
1617TextPointerContext context = start.GetPointerContext(LogicalDirection.Forward);
1620start.MoveToNextContextPosition(LogicalDirection.Forward);
1621context = start.GetPointerContext(LogicalDirection.Forward);
1634return start.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
1715start = GetNormalizedPosition(thisRange, start, LogicalDirection.Forward);
1957!TextPointerBase.IsAtInsertionPosition(start, LogicalDirection.Forward) ||
System\Windows\Documents\TextStore.cs (46)
407navigator = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward);
408limit = (endIndex >= 0) ? CreatePointerAtCharOffset(endIndex, LogicalDirection.Forward) : null;
415TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Forward);
429TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward);
438navigator.MoveToNextContextPosition(LogicalDirection.Forward);
444navigator.MoveToNextContextPosition(LogicalDirection.Forward);
491start = start.GetNextInsertionPosition(LogicalDirection.Forward);
687endNavigator.SetLogicalDirection(LogicalDirection.Forward);
865position = CreatePointerAtCharOffset(index, LogicalDirection.Forward);
982ITextPointer positionPrev = position.CreatePointer(LogicalDirection.Forward);
1050startPointer = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward);
1051startPointer.MoveToInsertionPosition(LogicalDirection.Forward);
1061Rect rectStart = startPointer.GetCharacterRect(LogicalDirection.Forward);
1091lineRect = navigator.GetCharacterRect(LogicalDirection.Forward);
1092moved = navigator.MoveToNextInsertionPosition(LogicalDirection.Forward);
1486navigator.MoveToInsertionPosition(LogicalDirection.Forward);
1491if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text)
1497navigator.GetTextInRun(LogicalDirection.Forward, nextChars, 0, nextChars.Length);
1503TextSelection.ExtendToNextInsertionPosition(LogicalDirection.Forward);
2386_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward);
2405_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward);
2452Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text);
2459runCount = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, text, charsCopied, Math.Min(cchReq, text.Length - charsCopied), limit);
2468runCount = navigator.GetTextRunLength(LogicalDirection.Forward);
2469navigator.MoveToNextContextPosition(LogicalDirection.Forward);
2511Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement);
2521navigator.MoveToNextContextPosition(LogicalDirection.Forward);
2553Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd);
2571char ch = (navigator.GetAdjacentElement(LogicalDirection.Forward) is TableCell) ? UnsafeNativeMethods.TS_CHAR_REGION : '\n';
2905end = CreatePointerAtCharOffset(startIndex + length, LogicalDirection.Forward);
2907while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)
2909start.MoveToNextContextPosition(LogicalDirection.Forward);
3032positionNext.MoveToNextInsertionPosition(LogicalDirection.Forward);
3175Rect lineBounds = start.GetCharacterRect(LogicalDirection.Forward);
3179ITextPointer navigator = start.CreatePointer(LogicalDirection.Forward);
3180while (navigator.MoveToNextContextPosition(LogicalDirection.Forward) == true && navigator.CompareTo(end) < 0)
3428start = start.GetNextInsertionPosition(LogicalDirection.Forward);
3436start = start.GetNextInsertionPosition(LogicalDirection.Forward);
3456start = CreatePointerAtCharOffset(startCharOffset, LogicalDirection.Forward);
3462TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward);
3466TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
3478start.MoveToNextContextPosition(LogicalDirection.Forward);
3638ITextPointer end = this.TextContainer.CreatePointerAtOffset(record.EndOffsetBefore, LogicalDirection.Forward);
3956ITextPointer anchor = this.TextContainer.CreatePointerAtOffset(appSelectionAnchorOffset, LogicalDirection.Forward);
3957ITextPointer moving = this.TextContainer.CreatePointerAtOffset(appSelectionMovingOffset, LogicalDirection.Forward);