5 implementations of LogicalDirection
PresentationFramework (5)
System\Windows\Controls\PasswordTextNavigator.cs (1)
649LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
379LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\FixedTextPointer.cs (1)
589LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\NullTextNavigator.cs (1)
454LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\TextPointer.cs (1)
3673LogicalDirection ITextPointer.LogicalDirection
160 references to LogicalDirection
PresentationFramework (160)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (3)
793LogicalDirection direction = pointer.LogicalDirection; 829if (currentContext == TextPointerContext.ElementEnd && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementStart) 836if (currentContext == TextPointerContext.ElementStart && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementEnd)
MS\Internal\Annotations\TextAnchor.cs (7)
216(theirSegment.Start.LogicalDirection == LogicalDirection.Forward)) 222(theirSegment.End.LogicalDirection == LogicalDirection.Backward)) 657if (!TextPointerBase.IsAtInsertionPosition(start, start.LogicalDirection)) 659start = start.GetInsertionPosition(start.LogicalDirection); 665if (!TextPointerBase.IsAtInsertionPosition(start, start.LogicalDirection)) 669if (!TextPointerBase.IsAtInsertionPosition(end, start.LogicalDirection)) 678if (start.LogicalDirection == LogicalDirection.Backward)
MS\Internal\Documents\IFlowDocumentViewer.cs (2)
223textSelection.SetCaretToPosition(newTextSelection.AnchorPosition, newTextSelection.MovingPosition.LogicalDirection, true, true); 562textSelection.SetCaretToPosition(newTextSelection.AnchorPosition, newTextSelection.MovingPosition.LogicalDirection, true, true);
MS\Internal\Documents\TextBoxView.cs (7)
631if (offset > 0 && position.LogicalDirection == LogicalDirection.Backward) 655if (position.LogicalDirection == LogicalDirection.Forward || position.Offset == 0) 662if (position.LogicalDirection == LogicalDirection.Backward && position.Offset > 0) 779nextLinePosition = position.GetFrozenPointer(position.LogicalDirection); 822if (position.LogicalDirection == LogicalDirection.Forward) 827else if (position.LogicalDirection == LogicalDirection.Backward) 1696return GetLineIndexFromOffset(position.Offset, position.LogicalDirection);
MS\Internal\Documents\TextContainerHelper.cs (4)
121if (cpPos == _cpFirst && position.LogicalDirection == LogicalDirection.Backward || 122cpPos == _cpLast && position.LogicalDirection == LogicalDirection.Forward) 138if (cpPos == _ranges[i * 2] && position.LogicalDirection == LogicalDirection.Backward || 139cpPos == _ranges[i * 2 + 1] && position.LogicalDirection == LogicalDirection.Forward)
MS\Internal\Documents\TextDocumentView.cs (8)
480if (position.LogicalDirection == LogicalDirection.Forward) 490if (segment.Start.LogicalDirection == LogicalDirection.Backward) 499if (position.LogicalDirection == LogicalDirection.Backward) 509if (segment.End.LogicalDirection == LogicalDirection.Forward) 522if (position.TextContainer.Start.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Backward) 526else if (position.TextContainer.End.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Forward) 3481if (textPointer.LogicalDirection == LogicalDirection.Forward && textPointer.CompareTo(textElement.ElementStart) == 0) 3486if (textPointer.LogicalDirection == LogicalDirection.Backward && textPointer.CompareTo(textElement.ElementEnd) == 0)
MS\Internal\Documents\TextParagraphView.cs (5)
112ValidationHelper.VerifyDirection(startPosition.LogicalDirection, "startPosition.LogicalDirection"); 397if (position.LogicalDirection == LogicalDirection.Forward && (lineIndex != lines.Count - 1)) 404if (position.LogicalDirection == LogicalDirection.Backward && lineIndex != 0) 416( position.LogicalDirection == LogicalDirection.Backward || 417(position.LogicalDirection == LogicalDirection.Forward && (lineIndex == lines.Count - 1)))));
MS\Internal\PtsHost\TextParaClient.cs (9)
679if (position.LogicalDirection == LogicalDirection.Backward && dcp > 0) 701RectFromDcpSimpleLines(dcp, originalDcp, position.LogicalDirection, position.GetPointerContext(position.LogicalDirection), ref textDetails.u.full, ref rect, ref vrBaseline); 706RectFromDcpCompositeLines(dcp, originalDcp, position.LogicalDirection, position.GetPointerContext(position.LogicalDirection), ref textDetails.u.full, ref rect, ref vrBaseline); 2398if (position.LogicalDirection == LogicalDirection.Backward) 2423else if (position.LogicalDirection == LogicalDirection.Forward) 2501if (position.LogicalDirection == LogicalDirection.Backward) 2547else if (position.LogicalDirection == LogicalDirection.Forward)
System\Windows\Annotations\AnnotationHelper.cs (4)
516selection.SetCaretToPosition(selection.MovingPosition, selection.MovingPosition.LogicalDirection, true, true); 858(selection.Start.LogicalDirection == LogicalDirection.Forward)) || 860(selection.End.LogicalDirection == LogicalDirection.Backward))) 951selection.SetCaretToPosition(selection.MovingPosition, selection.MovingPosition.LogicalDirection, true, true);
System\Windows\Controls\TextBlock.cs (5)
2178if (orientedPosition.LogicalDirection == LogicalDirection.Backward && characterIndex > 0) 2236if (orientedPosition.LogicalDirection == LogicalDirection.Forward || originalCharacterIndex == 0) 2246if (orientedPosition.LogicalDirection == LogicalDirection.Backward && originalCharacterIndex > 0) 2390if (position.LogicalDirection == LogicalDirection.Backward) 2404else if (position.LogicalDirection == LogicalDirection.Forward)
System\Windows\Controls\TextRangeAdaptor.cs (6)
1491MoveToInsertionPosition(_start, _start.LogicalDirection); 1492MoveToInsertionPosition(_end, _end.LogicalDirection); 1898if ((position.CompareTo(_start)==0 && position.LogicalDirection != _start.LogicalDirection) || 1960(position.CompareTo(positionRef) == 0 && position.LogicalDirection != positionRef.LogicalDirection))
System\Windows\Documents\DocumentSequenceTextPointer.cs (9)
361if (!isAtCaretUnitBoundary && ((ITextPointer)this).LogicalDirection == LogicalDirection.Backward) 377/// <see cref="ITextPointer.LogicalDirection"/> 383return _childTp.LogicalDirection; 478LogicalDirection gravity = this.ChildPointer.LogicalDirection; 760return CreatePointer(thisTp, 0, thisTp.ChildPointer.LogicalDirection); 765return CreatePointer(thisTp, distance, thisTp.ChildPointer.LogicalDirection); 847return $"{(thisTp is DocumentSequenceTextPointer ? "DSTP" : "DSTN")} Id={thisTp.DebugId} B={thisTp.ChildBlock.DebugId} G={thisTp.ChildPointer.LogicalDirection}"; 1075cdb.ChildContainer.Start.CreatePointer(childTn.LogicalDirection) 1076: cdb.ChildContainer.End.CreatePointer(childTn.LogicalDirection)
System\Windows\Documents\DocumentSequenceTextView.cs (10)
82edge = childOTP.LogicalDirection; 119DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"GetRawRectangleFromTextPosition {position} {position.LogicalDirection}"); 136return ChildTextView.GetRawRectangleFromTextPosition(tp.ChildPointer.CreatePointer(position.LogicalDirection), out transform); 203DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"GetPositionAtNextLine {position} {position.LogicalDirection} {suggestedX} {count} "); 219ITextPointer childOTP = ChildTextView.GetPositionAtNextLine(tp.ChildPointer.CreatePointer(position.LogicalDirection), suggestedX, count, out newSuggestedX, out linesMoved); 223newEdge = childOTP.LogicalDirection; 352DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"GetLineRange {position} {position.LogicalDirection}"); 365TextSegment childTR = ChildTextView.GetLineRange(tpLine.ChildPointer.CreatePointer(position.LogicalDirection)); 425DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"Contains {position} {position.LogicalDirection}"); 439return ChildTextView.Contains(tp.ChildPointer.CreatePointer(position.LogicalDirection));
System\Windows\Documents\FixedTextPointer.cs (3)
239return ((ITextPointer)this).CreatePointer(0, ((ITextPointer)this).LogicalDirection); 257return ((ITextPointer)this).CreatePointer(distance, ((ITextPointer)this).LogicalDirection); 587/// <see cref="ITextPointer.LogicalDirection"/>
System\Windows\Documents\FixedTextView.cs (5)
152DocumentsTrace.FixedTextOM.TextView.Trace($"GetRectFromTextPosition {(FixedTextPointer)position}, {position.LogicalDirection}"); 334DocumentsTrace.FixedTextOM.TextView.Trace($"FixedTextView.MoveToLine {(FixedTextPointer)position}, {position.LogicalDirection}, {suggestedX}, {count}"); 338LogicalDirection edge = position.LogicalDirection; 583DocumentsTrace.FixedTextOM.TextView.Trace($"GetLineRange {(FixedTextPointer)position}, {position.LogicalDirection}"); 1203LogicalDirection dir = textPointer.LogicalDirection;
System\Windows\Documents\NullTextNavigator.cs (1)
452/// <see cref="ITextPointer.LogicalDirection"/>
System\windows\Documents\TextEditorDragDrop.cs (1)
454dropPosition = dropPosition.GetInsertionPosition(dropPosition.LogicalDirection);
System\windows\Documents\TextEditorMouse.cs (4)
722if (!(mouseMovePosition.GetPointerContext(mouseMovePosition.LogicalDirection) == TextPointerContext.EmbeddedElement)) 734ITextPointer otherEdgePosition = mouseMovePosition.GetNextContextPosition(mouseMovePosition.LogicalDirection); 735LogicalDirection otherEdgeDirection = (mouseMovePosition.LogicalDirection == LogicalDirection.Forward) ? 751return mouseMovePosition.GetAdjacentElement(mouseMovePosition.LogicalDirection) as UIElement;
System\windows\Documents\TextEditorSelection.cs (24)
270This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 299This.Selection.SetCaretToPosition(newMovingPosition, newMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 315originalMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 359This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 389This.Selection.SetCaretToPosition(newMovingPosition, newMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 405originalMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 456This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 508This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 561This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 603This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 641This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 678This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 717This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 755This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/ 1116if (newComparedToOld > 0 || newComparedToOld == 0 && newMovingPosition.LogicalDirection != originalMovingPosition.LogicalDirection) 1230if (newComparedToOld < 0 || newComparedToOld == 0 && newMovingPosition.LogicalDirection != originalMovingPosition.LogicalDirection) 1785This.Selection.SetCaretToPosition(e.NewPosition, e.NewPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 1815This.Selection.SetCaretToPosition(e.NewPosition, e.NewPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 1850if (newComparedToOld < 0 || newComparedToOld == 0 && e.NewPosition.LogicalDirection != e.Position.LogicalDirection) 2306movingPosition.LogicalDirection == LogicalDirection.Backward && 2321movingPosition = movingPosition.GetInsertionPosition(movingPosition.LogicalDirection);
System\windows\Documents\TextEditorSpelling.cs (1)
59LogicalDirection direction = This.Selection.IsEmpty ? This.Selection.Start.LogicalDirection : LogicalDirection.Forward;
System\Windows\Documents\TextFindEngine.cs (1)
300ITextPointer oppositeEndPosition = position.CreatePointer(oppositeEndOffset, position.LogicalDirection);
System\Windows\Documents\TextParentUndoUnit.cs (4)
45_undoAnchorPositionDirection = anchorPosition.LogicalDirection; 47_undoMovingPositionDirection = movingPosition.LogicalDirection; 183_redoAnchorPositionDirection = anchorPosition.LogicalDirection; 185_redoMovingPositionDirection = movingPosition.LogicalDirection;
System\Windows\Documents\TextPointerBase.cs (6)
697bool isAtLineWrappingPosition = position.LogicalDirection == LogicalDirection.Forward 817position.MoveToInsertionPosition(position.LogicalDirection); 830thisPointer.SetLogicalDirection(position.LogicalDirection); 839thisPointer.SetLogicalDirection(lineRange.Start.LogicalDirection); 847thisPointer.SetLogicalDirection(position.LogicalDirection); 1101if (thisPointer.IsFrozen && thisPointer.LogicalDirection == logicalDirection)
System\Windows\Documents\TextRangeBase.cs (6)
1707if (!IsAtNormalizedPosition(thisRange, start, start.LogicalDirection)) 1709start = GetNormalizedPosition(thisRange, start, start.LogicalDirection); 1729if (start.LogicalDirection == LogicalDirection.Backward) 1757if (!IsAtNormalizedPosition(thisRange, start, start.LogicalDirection)) 1759start = GetNormalizedPosition(thisRange, start, start.LogicalDirection); 1940if (!TextPointerBase.IsAtInsertionPosition(start, start.LogicalDirection))
System\windows\Documents\TextSegment.cs (3)
69_start = startPosition.GetFrozenPointer(startPosition.LogicalDirection); 75_start = startPosition.GetFrozenPointer(preserveLogicalDirection ? startPosition.LogicalDirection : LogicalDirection.Backward); 76_end = endPosition.GetFrozenPointer(preserveLogicalDirection ? endPosition.LogicalDirection : LogicalDirection.Forward);
System\windows\Documents\TextSelection.cs (22)
537Invariant.Assert(thisSelection.Start.LogicalDirection == caretPosition.LogicalDirection); // orientation must be as passed 685position = position.GetNextInsertionPosition(position.LogicalDirection); 900cursorWordRange = TextPointerBase.GetWordRange(cursorPosition, cursorPosition.LogicalDirection); 998cursorWordRange = TextPointerBase.GetWordRange(cursorPosition, cursorPosition.LogicalDirection); 1869_anchorPosition = anchorPosition.GetInsertionPosition(anchorPosition.LogicalDirection); 1874_anchorPosition = thisSelection.Start.GetFrozenPointer(_anchorPosition.LogicalDirection); 1878_anchorPosition = thisSelection.End.GetFrozenPointer(_anchorPosition.LogicalDirection); 1882_movingPositionDirection = movingPosition.LogicalDirection; 1951if (cursorPosition.GetPointerContext(cursorPosition.LogicalDirection) == TextPointerContext.EmbeddedElement) 1959movingPosition = cursorPosition.GetNextContextPosition(cursorPosition.LogicalDirection); 1966thisSelection.SetCaretToPosition(cursorPosition, cursorPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 1994(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 1995cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2000(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2001cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2009(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2010cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2015(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2016cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2178if ((caretPosition.LogicalDirection == LogicalDirection.Backward && // 2195if (caretPosition.LogicalDirection == LogicalDirection.Backward && //