MS\Internal\PtsHost\TextParaClient.cs (24)
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);
1097LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
1690if (orientation == LogicalDirection.Forward)
1787if (orientation == LogicalDirection.Forward)
2040ITextPointer position = Paragraph.StructuralCache.TextContainer.CreatePointerAtOffset(Paragraph.ParagraphStartCharacterPosition + dcp, LogicalDirection.Forward);
2429else if (position.LogicalDirection == LogicalDirection.Forward)
2553else if (position.LogicalDirection == LogicalDirection.Forward)
2629else if (dcp >= lineDesc.dcpLim - 1 && direction == LogicalDirection.Forward)
2658if (direction == LogicalDirection.Forward)
2668if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpLim) && direction == LogicalDirection.Forward)
2678logicalDirection = LogicalDirection.Forward;
2687logicalDirection = LogicalDirection.Forward;
2696logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
2788else if (dcp >= element.dcpLim - 1 && direction == LogicalDirection.Forward)
2821if (direction == LogicalDirection.Forward)
2831if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpLim) && direction == LogicalDirection.Forward)
2842logicalDirection = LogicalDirection.Forward;
2851logicalDirection = LogicalDirection.Forward;
2861logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
2944logicalDirection = LogicalDirection.Forward;
2953logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
3070logicalDirection = LogicalDirection.Forward;
3079logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
MS\Internal\Text\ComplexLine.cs (13)
47switch (position.GetPointerContext(LogicalDirection.Forward))
288position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward);
295type = position.GetPointerContext(LogicalDirection.Forward);
311element = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
339Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters.");
358endOfRunPosition = _owner.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward);
373int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length);
386Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge.");
390TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
477Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge.");
481TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
527Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
530DependencyObject element = position.GetAdjacentElement(LogicalDirection.Forward) as DependencyObject;
System\Windows\Controls\TextBox.cs (18)
166TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward);
170newStart = newStart.GetInsertionPosition(LogicalDirection.Forward);
178TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward);
181newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward);
269TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward);
450textPointer = textPointer.GetNextInsertionPosition(LogicalDirection.Forward);
459textPointer = textPointer.GetPositionAtOffset(0, LogicalDirection.Forward);
484TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward);
485SpellingError spellingError = this.TextEditor.GetSpellingErrorAtPosition(position, LogicalDirection.Forward);
489position = this.TextContainer.CreatePointerAtOffset(charIndex + 1, LogicalDirection.Forward);
816TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward);
819newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward);
860TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward);
864newStart = newStart.GetInsertionPosition(LogicalDirection.Forward);
872TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward);
875newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward);
1482if (TextPointerBase.IsNextToPlainLineBreak(textPointer, LogicalDirection.Forward))
1484textPointer.MoveToNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Controls\TextRangeAdaptor.cs (43)
534TextPointerBase.MoveToNextInsertionPosition(_end, LogicalDirection.Forward);
545MoveToNextWordBoundary(_end, LogicalDirection.Forward);
555TextPointerContext forwardContext = _start.GetPointerContext(LogicalDirection.Forward);
575TextPointerContext forwardContext = _end.GetPointerContext(LogicalDirection.Forward);
583_end.MoveToNextContextPosition(LogicalDirection.Forward);
589_start.SetLogicalDirection(LogicalDirection.Forward);
590_end.SetLogicalDirection(LogicalDirection.Forward);
765if (moved && direction == LogicalDirection.Forward)
769TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward);
774position.MoveToNextContextPosition(LogicalDirection.Forward);
793if (direction == LogicalDirection.Forward)
811nextLineStart = GetInsertionPosition(nextLineStart, LogicalDirection.Forward);
816position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
843position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
856if (direction == LogicalDirection.Forward)
863if (nextParagraphStart.MoveToNextInsertionPosition(LogicalDirection.Forward))
873position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
894position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward);
923if (direction == LogicalDirection.Forward)
927if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd)
933Invariant.Assert(position.MoveToNextContextPosition(LogicalDirection.Forward));
935MoveToInsertionPosition(position, LogicalDirection.Forward);
956if (direction == LogicalDirection.Forward)
966if (position.CompareTo(GetInsertionPosition(position.TextContainer.Start, LogicalDirection.Forward)) != 0)
996LogicalDirection direction = (count > 0) ? LogicalDirection.Forward : LogicalDirection.Backward;
1077position.SetLogicalDirection(LogicalDirection.Forward);
1099MoveToInsertionPosition(position, LogicalDirection.Forward);
1114position.MoveToPosition(direction == LogicalDirection.Forward ? paragraphRange.End : paragraphRange.Start);
1153MoveToInsertionPosition(position, LogicalDirection.Forward);
1165if (direction == LogicalDirection.Forward)
1198return (direction == LogicalDirection.Forward) ? moved : -moved;
1213while (IsElementBoundary(start.GetPointerContext(LogicalDirection.Forward)))
1215if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) >= 0)
1237if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) > 0)
1448return TextPointerBase.IsAtWordBoundary(position, LogicalDirection.Forward);
1482position.SetLogicalDirection(LogicalDirection.Forward);
1640_end.MoveToNextInsertionPosition(LogicalDirection.Forward);
1693attrStart = position.CreatePointer(LogicalDirection.Forward);
1706ITextPointer position = _start.CreatePointer(LogicalDirection.Forward);
1717attrStart = position.CreatePointer(LogicalDirection.Forward);
1728if (!position.MoveToNextContextPosition(LogicalDirection.Forward))
1911_end.MoveToNextInsertionPosition(LogicalDirection.Forward);
1949if (MoveToUnitBoundary(position, start, count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward, unit))
System\Windows\Documents\DocumentSequenceTextContainer.cs (12)
129return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward));
677if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward))
679highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
687selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection));
691highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
698if (highlightRangeStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)
705TextPointerBase.GetTextWithLimit(highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), LogicalDirection.Forward, sb, 0, 256, highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward));
1005ITextPointer dynamicTextPointer = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward);
1029DocumentSequenceTextPointer parentChangePosition = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward) as DocumentSequenceTextPointer;
1042childTp = direction == LogicalDirection.Forward ?
System\Windows\Documents\FixedDocument.cs (11)
509fixedTextPointer = new FixedTextPointer(true, LogicalDirection.Forward, flowPosition);
1080if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward))
1082highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
1093selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection));
1111highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
1114while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue);
1123LogicalDirection.Forward, typeof(HighlightComponent)) as AnnotationHighlightLayer.HighlightSegment;
1127highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward);
1137this.FixedContainer.GetMultiHighlights((FixedTextPointer)highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward),
1138(FixedTextPointer)highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward),
1443return new FixedTextPointer(true, LogicalDirection.Forward, flowPosition);
System\Windows\Documents\FixedFindEngine.cs (6)
154start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber)));
158start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber)));
169start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber));
173start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber));
306new FixedTextPointer(false, LogicalDirection.Forward,pageStartFlowPosition));
312firstSearchPageStart = new FixedTextPointer(false, LogicalDirection.Forward, endAsFTP.FixedTextContainer.FixedTextBuilder.GetPageStartFlowPosition(pageNumber));
System\Windows\Documents\Speller.cs (21)
195ExpandToWordBreakAndContext(error.End, LogicalDirection.Forward, language, out ITextPointer contentEnd, out ITextPointer contextEnd);
240if (_statusTable.GetError(pointer, LogicalDirection.Forward, out errorStart, out errorEnd))
250pointer = _statusTable.GetNextErrorTransition(pointer, LogicalDirection.Forward);
670end = GetNextLanguageTransition(start, LogicalDirection.Forward, language, end);
712wordBreakRight = SearchForWordBreaks(caretPosition, LogicalDirection.Forward, language, 1, false /* stopOnError */);
798ExpandToWordBreakAndContext(end, LogicalDirection.Forward, language, out contentEnd, out contextEnd);
1125inwardDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward;
1337closestErrorPosition = nextErrorTransition.CreateDynamicTextPointer(LogicalDirection.Forward);
1351direction == LogicalDirection.Forward && closestErrorPosition.CompareTo(searchPosition) < 0)
1362direction == LogicalDirection.Forward && closestLanguageTransition.CompareTo(searchPosition) < 0)
1395while ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) < 0) ||
1405if ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) > 0) ||
1473if (direction == LogicalDirection.Forward)
1689switch (position.GetPointerContext(LogicalDirection.Forward))
1692runCount = position.GetTextRunLength(LogicalDirection.Forward);
1696position.GetTextInRun(LogicalDirection.Forward, _text, _textLength, runCount);
1732position.MoveToNextContextPosition(LogicalDirection.Forward);
1740position.MoveToNextContextPosition(LogicalDirection.Forward);
1807context = pointer.GetPointerContext(LogicalDirection.Forward);
1810TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
System\windows\Documents\TextEditorSelection.cs (43)
128ITextPointer lineStart = position.CreatePointer(LogicalDirection.Forward);
203LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
219LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
236LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
252LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
328ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward);
479if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward))
818ITextPointer caretPosition = lineRange.Start.GetFrozenPointer(LogicalDirection.Forward);
821This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Forward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true);
867LogicalDirection orientation = TextPointerBase.IsNextToPlainLineBreak(lineRange.End, LogicalDirection.Backward) ? LogicalDirection.Forward : LogicalDirection.Backward;
901This.Selection.SetCaretToPosition(This.TextContainer.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
961LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
977LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
993LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward;
1009LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward;
1027if (This.Selection.ExtendToNextTableRow(LogicalDirection.Forward))
1085ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward);
1137if (TextPointerBase.IsNextToAnyBreak(newMovingPosition, LogicalDirection.Forward) ||
1138newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null)
1147newMovingPosition = newMovingPosition.GetInsertionPosition(LogicalDirection.Forward);
1148newMovingPosition = newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward);
1175if (newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null)
1336if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward))
1618ExtendSelectionAndBringIntoView(lineRange.Start.CreatePointer(LogicalDirection.Forward), This);
1670if (TextPointerBase.IsNextToPlainLineBreak(destination, LogicalDirection.Forward) ||
1671TextPointerBase.IsNextToRichLineBreak(destination, LogicalDirection.Forward))
1680destination = destination.GetNextInsertionPosition(LogicalDirection.Forward);
1684else if (TextPointerBase.IsNextToParagraphBreak(destination, LogicalDirection.Forward) &&
1689ITextPointer newDestination = destination.GetNextInsertionPosition(LogicalDirection.Forward);
2072ITextPointer movingEnd = (direction == LogicalDirection.Forward ? textEditor.Selection.End : textEditor.Selection.Start);
2082LogicalDirection contentDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward;
2130if (direction == LogicalDirection.Forward)
2133if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.End, LogicalDirection.Forward))
2143TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Forward);
2153if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.Start, LogicalDirection.Forward))
2156textEditor.Selection.SetCaretToPosition(textEditor.Selection.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
2165textEditor.Selection.SetCaretToPosition(wordBoundary, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
2209wordBoundary.SetLogicalDirection(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward);
2331movingPosition = movingPosition.GetFrozenPointer(LogicalDirection.Forward);
2348return This.Selection.IsEmpty ? This.Selection.Start : This.Selection.Start.GetFrozenPointer(LogicalDirection.Forward);
2414This.Selection.SetCaretToPosition(position, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
System\Windows\Documents\TextElement.cs (4)
306TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward);
329elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward);
395contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward);
1009beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward);
System\Windows\Documents\TextPointerBase.cs (49)
85else if (direction == LogicalDirection.Forward && limit.CompareTo(thisPointer) <= 0)
102if (direction == LogicalDirection.Forward)
184Type forwardType = forwardPosition.GetElementType(LogicalDirection.Forward);
188TextPointerContext forwardContext = forwardPosition.GetPointerContext(LogicalDirection.Forward);
231TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward);
254TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward);
259typeof(Table).IsAssignableFrom(position.GetElementType(LogicalDirection.Forward)));
278position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd;
323BorderingElementCategory category = GetBorderingElementCategory(navigator, LogicalDirection.Forward);
330navigator.MoveToNextContextPosition(LogicalDirection.Forward);
332while (GetBorderingElementCategory(navigator, LogicalDirection.Forward) == BorderingElementCategory.MergeableScopingInline);
338elementType = navigator.GetElementType(LogicalDirection.Forward);
342navigator.MoveToNextContextPosition(LogicalDirection.Forward);
359elementType = navigator.GetElementType(LogicalDirection.Forward);
362navigator.MoveToNextInsertionPosition(LogicalDirection.Forward);
375navigator.MoveToNextContextPosition(LogicalDirection.Forward);
377while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart);
394return IsAtNonMergeableInlineEdge(position, LogicalDirection.Forward);
424position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd)
512return GetWordRange(thisPosition, LogicalDirection.Forward);
547if (moved && IsAtWordBoundary(thisPosition, /*insideWordDirection:*/LogicalDirection.Forward))
554MoveToNextWordBoundary(navigator, direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward);
568wordEnd = RestrictWithinBlock(thisPosition, wordEnd, LogicalDirection.Forward);
574wordEnd = wordEnd.GetFrozenPointer(LogicalDirection.Forward);
589Invariant.Assert(!(direction == LogicalDirection.Forward) || position.CompareTo(limit) <= 0, "for forward direcion position must be <= than linit");
612return limit.GetInsertionPosition(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward);
633(direction == LogicalDirection.Forward && IsCharUnicodeNewLine(textBuffer[0]))
699bool isAtLineWrappingPosition = position.LogicalDirection == LogicalDirection.Forward
714thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd &&
725return thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None &&
965int increment = direction == LogicalDirection.Forward ? +1 : -1;
982if ((direction == LogicalDirection.Forward && initialPosition.CompareTo(thisNavigator) < 0) ||
1026while (TextSchema.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward))
1037if (direction == LogicalDirection.Forward)
1088if (IsAtWordBoundary(thisNavigator, /*insideWordDirection:*/LogicalDirection.Forward))
1148if (direction == LogicalDirection.Forward)
1158oppositeDirection = LogicalDirection.Forward;
1258if (direction == LogicalDirection.Forward && IsAtNonMergeableInlineEnd(thisNavigator))
1260symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward);
1275symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward);
1286int increment = (direction == LogicalDirection.Forward) ? +1 : -1;
1331TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward);
1368position.GetTextInRun(LogicalDirection.Forward, neighborhood, 1, 1) == 1)
1430navigator.GetTextInRun(LogicalDirection.Forward, preceedingText, SelectionWordBreaker.MinContextLength - preceedingCount, runLength);
1445runLength = Math.Min(navigator.GetTextRunLength(LogicalDirection.Forward), SelectionWordBreaker.MinContextLength - followingCount);
1447navigator.GetTextInRun(LogicalDirection.Forward, followingText, followingCount, runLength);
1456navigator.MoveToInsertionPosition(LogicalDirection.Forward);
1458while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text);
1491TextPointerContext context = (direction == LogicalDirection.Forward) ? TextPointerContext.ElementEnd : TextPointerContext.ElementStart;
System\Windows\Documents\TextRangeBase.cs (41)
77textPointer = textPointer.GetFormatNormalizedPosition(LogicalDirection.Forward);
210!TextPointerBase.IsAtWordBoundary(thisRange.Start, LogicalDirection.Forward) && //
286!TextPointerBase.IsNextToAnyBreak(thisRange.End, LogicalDirection.Forward))
292nextPosition.MoveToNextInsertionPosition(LogicalDirection.Forward);
337SkipParagraphContent(end, LogicalDirection.Forward);
353(nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Forward || //
358(nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Forward || //
414if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text)
416moved = position.MoveToNextContextPosition(LogicalDirection.Forward);
420moved = position.MoveToInsertionPosition(LogicalDirection.Forward);
425moved = position.MoveToNextInsertionPosition(LogicalDirection.Forward);
496moved = position.MoveToNextContextPosition(LogicalDirection.Forward);
681TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward);
697navigator.MoveToNextContextPosition(LogicalDirection.Forward);
707navigator.MoveToNextContextPosition(LogicalDirection.Forward);
712navigator.MoveToNextContextPosition(LogicalDirection.Forward);
715elementType = navigator.GetElementType(LogicalDirection.Forward);
735navigator.MoveToNextContextPosition(LogicalDirection.Forward);
751int runLength = navigator.GetTextRunLength(LogicalDirection.Forward);
753runLength = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, charArray, 0, runLength, endPosition);
755navigator.MoveToNextContextPosition(LogicalDirection.Forward);
766navigator.MoveToNextContextPosition(LogicalDirection.Forward);
768TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward);
775navigator.MoveToNextContextPosition(LogicalDirection.Forward);
776symbolType = navigator.GetPointerContext(LogicalDirection.Forward);
799List list = (List)navigator.GetAdjacentElement(LogicalDirection.Forward);
820navigator.MoveToNextContextPosition(LogicalDirection.Forward);
830ListItem listItem = (ListItem)navigator.GetAdjacentElement(LogicalDirection.Forward);
862object element = navigator.GetAdjacentElement(LogicalDirection.Forward);
1315thisRange.End.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text)
1363(insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None ||
1364insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd);
1376ITextPointer newEnd = insertPosition.CreatePointer(LogicalDirection.Forward);
1381TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward);
1419newEnd = newEnd.GetNextInsertionPosition(LogicalDirection.Forward);
1620TextPointerContext context = start.GetPointerContext(LogicalDirection.Forward);
1623start.MoveToNextContextPosition(LogicalDirection.Forward);
1624context = start.GetPointerContext(LogicalDirection.Forward);
1637return start.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
1718start = GetNormalizedPosition(thisRange, start, LogicalDirection.Forward);
1961!TextPointerBase.IsAtInsertionPosition(start, LogicalDirection.Forward) ||
System\Windows\Documents\TextStore.cs (46)
418navigator = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward);
419limit = (endIndex >= 0) ? CreatePointerAtCharOffset(endIndex, LogicalDirection.Forward) : null;
426TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Forward);
440TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward);
449navigator.MoveToNextContextPosition(LogicalDirection.Forward);
455navigator.MoveToNextContextPosition(LogicalDirection.Forward);
502start = start.GetNextInsertionPosition(LogicalDirection.Forward);
698endNavigator.SetLogicalDirection(LogicalDirection.Forward);
876position = CreatePointerAtCharOffset(index, LogicalDirection.Forward);
993ITextPointer positionPrev = position.CreatePointer(LogicalDirection.Forward);
1061startPointer = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward);
1062startPointer.MoveToInsertionPosition(LogicalDirection.Forward);
1072Rect rectStart = startPointer.GetCharacterRect(LogicalDirection.Forward);
1102lineRect = navigator.GetCharacterRect(LogicalDirection.Forward);
1103moved = navigator.MoveToNextInsertionPosition(LogicalDirection.Forward);
1497navigator.MoveToInsertionPosition(LogicalDirection.Forward);
1502if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text)
1508navigator.GetTextInRun(LogicalDirection.Forward, nextChars, 0, nextChars.Length);
1514TextSelection.ExtendToNextInsertionPosition(LogicalDirection.Forward);
2397_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward);
2416_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward);
2463Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text);
2470runCount = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, text, charsCopied, Math.Min(cchReq, text.Length - charsCopied), limit);
2479runCount = navigator.GetTextRunLength(LogicalDirection.Forward);
2480navigator.MoveToNextContextPosition(LogicalDirection.Forward);
2522Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement);
2532navigator.MoveToNextContextPosition(LogicalDirection.Forward);
2564Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd);
2582char ch = (navigator.GetAdjacentElement(LogicalDirection.Forward) is TableCell) ? UnsafeNativeMethods.TS_CHAR_REGION : '\n';
2914end = CreatePointerAtCharOffset(startIndex + length, LogicalDirection.Forward);
2916while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)
2918start.MoveToNextContextPosition(LogicalDirection.Forward);
3041positionNext.MoveToNextInsertionPosition(LogicalDirection.Forward);
3184Rect lineBounds = start.GetCharacterRect(LogicalDirection.Forward);
3188ITextPointer navigator = start.CreatePointer(LogicalDirection.Forward);
3189while (navigator.MoveToNextContextPosition(LogicalDirection.Forward) == true && navigator.CompareTo(end) < 0)
3437start = start.GetNextInsertionPosition(LogicalDirection.Forward);
3445start = start.GetNextInsertionPosition(LogicalDirection.Forward);
3465start = CreatePointerAtCharOffset(startCharOffset, LogicalDirection.Forward);
3471TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward);
3475TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
3487start.MoveToNextContextPosition(LogicalDirection.Forward);
3647ITextPointer end = this.TextContainer.CreatePointerAtOffset(record.EndOffsetBefore, LogicalDirection.Forward);
3965ITextPointer anchor = this.TextContainer.CreatePointerAtOffset(appSelectionAnchorOffset, LogicalDirection.Forward);
3966ITextPointer moving = this.TextContainer.CreatePointerAtOffset(appSelectionMovingOffset, LogicalDirection.Forward);