5 implementations of LogicalDirection
PresentationFramework (5)
System\Windows\Controls\PasswordTextNavigator.cs (1)
653LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
385LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\FixedTextPointer.cs (1)
594LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\NullTextNavigator.cs (1)
457LogicalDirection ITextPointer.LogicalDirection
System\Windows\Documents\TextPointer.cs (1)
3678LogicalDirection ITextPointer.LogicalDirection
160 references to LogicalDirection
PresentationFramework (160)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (3)
799LogicalDirection direction = pointer.LogicalDirection; 835if (currentContext == TextPointerContext.ElementEnd && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementStart) 842if (currentContext == TextPointerContext.ElementStart && nextPointer.GetPointerContext(nextPointer.LogicalDirection) == TextPointerContext.ElementEnd)
MS\Internal\Annotations\TextAnchor.cs (7)
219(theirSegment.Start.LogicalDirection == LogicalDirection.Forward)) 225(theirSegment.End.LogicalDirection == LogicalDirection.Backward)) 660if (!TextPointerBase.IsAtInsertionPosition(start, start.LogicalDirection)) 662start = start.GetInsertionPosition(start.LogicalDirection); 668if (!TextPointerBase.IsAtInsertionPosition(start, start.LogicalDirection)) 672if (!TextPointerBase.IsAtInsertionPosition(end, start.LogicalDirection)) 681if (start.LogicalDirection == LogicalDirection.Backward)
MS\Internal\Documents\IFlowDocumentViewer.cs (2)
226textSelection.SetCaretToPosition(newTextSelection.AnchorPosition, newTextSelection.MovingPosition.LogicalDirection, true, true); 565textSelection.SetCaretToPosition(newTextSelection.AnchorPosition, newTextSelection.MovingPosition.LogicalDirection, true, true);
MS\Internal\Documents\TextBoxView.cs (7)
633if (offset > 0 && position.LogicalDirection == LogicalDirection.Backward) 657if (position.LogicalDirection == LogicalDirection.Forward || position.Offset == 0) 664if (position.LogicalDirection == LogicalDirection.Backward && position.Offset > 0) 781nextLinePosition = position.GetFrozenPointer(position.LogicalDirection); 824if (position.LogicalDirection == LogicalDirection.Forward) 829else if (position.LogicalDirection == LogicalDirection.Backward) 1698return GetLineIndexFromOffset(position.Offset, position.LogicalDirection);
MS\Internal\Documents\TextContainerHelper.cs (4)
124if (cpPos == _cpFirst && position.LogicalDirection == LogicalDirection.Backward || 125cpPos == _cpLast && position.LogicalDirection == LogicalDirection.Forward) 141if (cpPos == _ranges[i * 2] && position.LogicalDirection == LogicalDirection.Backward || 142cpPos == _ranges[i * 2 + 1] && position.LogicalDirection == LogicalDirection.Forward)
MS\Internal\Documents\TextDocumentView.cs (8)
482if (position.LogicalDirection == LogicalDirection.Forward) 492if (segment.Start.LogicalDirection == LogicalDirection.Backward) 501if (position.LogicalDirection == LogicalDirection.Backward) 511if (segment.End.LogicalDirection == LogicalDirection.Forward) 524if (position.TextContainer.Start.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Backward) 528else if (position.TextContainer.End.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Forward) 3483if (textPointer.LogicalDirection == LogicalDirection.Forward && textPointer.CompareTo(textElement.ElementStart) == 0) 3488if (textPointer.LogicalDirection == LogicalDirection.Backward && textPointer.CompareTo(textElement.ElementEnd) == 0)
MS\Internal\Documents\TextParagraphView.cs (5)
118ValidationHelper.VerifyDirection(startPosition.LogicalDirection, "startPosition.LogicalDirection"); 403if (position.LogicalDirection == LogicalDirection.Forward && (lineIndex != lines.Count - 1)) 410if (position.LogicalDirection == LogicalDirection.Backward && lineIndex != 0) 422( position.LogicalDirection == LogicalDirection.Backward || 423(position.LogicalDirection == LogicalDirection.Forward && (lineIndex == lines.Count - 1)))));
MS\Internal\PtsHost\TextParaClient.cs (9)
685if (position.LogicalDirection == LogicalDirection.Backward && dcp > 0) 707RectFromDcpSimpleLines(dcp, originalDcp, position.LogicalDirection, position.GetPointerContext(position.LogicalDirection), ref textDetails.u.full, ref rect, ref vrBaseline); 712RectFromDcpCompositeLines(dcp, originalDcp, position.LogicalDirection, position.GetPointerContext(position.LogicalDirection), ref textDetails.u.full, ref rect, ref vrBaseline); 2404if (position.LogicalDirection == LogicalDirection.Backward) 2429else if (position.LogicalDirection == LogicalDirection.Forward) 2507if (position.LogicalDirection == LogicalDirection.Backward) 2553else if (position.LogicalDirection == LogicalDirection.Forward)
System\Windows\Annotations\AnnotationHelper.cs (4)
528selection.SetCaretToPosition(selection.MovingPosition, selection.MovingPosition.LogicalDirection, true, true); 870(selection.Start.LogicalDirection == LogicalDirection.Forward)) || 872(selection.End.LogicalDirection == LogicalDirection.Backward))) 963selection.SetCaretToPosition(selection.MovingPosition, selection.MovingPosition.LogicalDirection, true, true);
System\Windows\Controls\TextBlock.cs (5)
2188if (orientedPosition.LogicalDirection == LogicalDirection.Backward && characterIndex > 0) 2246if (orientedPosition.LogicalDirection == LogicalDirection.Forward || originalCharacterIndex == 0) 2256if (orientedPosition.LogicalDirection == LogicalDirection.Backward && originalCharacterIndex > 0) 2400if (position.LogicalDirection == LogicalDirection.Backward) 2414else if (position.LogicalDirection == LogicalDirection.Forward)
System\Windows\Controls\TextRangeAdaptor.cs (6)
1493MoveToInsertionPosition(_start, _start.LogicalDirection); 1494MoveToInsertionPosition(_end, _end.LogicalDirection); 1900if ((position.CompareTo(_start)==0 && position.LogicalDirection != _start.LogicalDirection) || 1962(position.CompareTo(positionRef) == 0 && position.LogicalDirection != positionRef.LogicalDirection))
System\Windows\Documents\DocumentSequenceTextPointer.cs (9)
367if (!isAtCaretUnitBoundary && ((ITextPointer)this).LogicalDirection == LogicalDirection.Backward) 383/// <see cref="ITextPointer.LogicalDirection"/> 389return _childTp.LogicalDirection; 484LogicalDirection gravity = this.ChildPointer.LogicalDirection; 766return CreatePointer(thisTp, 0, thisTp.ChildPointer.LogicalDirection); 771return CreatePointer(thisTp, distance, thisTp.ChildPointer.LogicalDirection); 853return $"{(thisTp is DocumentSequenceTextPointer ? "DSTP" : "DSTN")} Id={thisTp.DebugId} B={thisTp.ChildBlock.DebugId} G={thisTp.ChildPointer.LogicalDirection}"; 1081cdb.ChildContainer.Start.CreatePointer(childTn.LogicalDirection) 1082: cdb.ChildContainer.End.CreatePointer(childTn.LogicalDirection)
System\Windows\Documents\DocumentSequenceTextView.cs (10)
90edge = childOTP.LogicalDirection; 127DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"GetRawRectangleFromTextPosition {position} {position.LogicalDirection}"); 144return ChildTextView.GetRawRectangleFromTextPosition(tp.ChildPointer.CreatePointer(position.LogicalDirection), out transform); 211DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"GetPositionAtNextLine {position} {position.LogicalDirection} {suggestedX} {count} "); 227ITextPointer childOTP = ChildTextView.GetPositionAtNextLine(tp.ChildPointer.CreatePointer(position.LogicalDirection), suggestedX, count, out newSuggestedX, out linesMoved); 231newEdge = childOTP.LogicalDirection; 360DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"GetLineRange {position} {position.LogicalDirection}"); 373TextSegment childTR = ChildTextView.GetLineRange(tpLine.ChildPointer.CreatePointer(position.LogicalDirection)); 433DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"Contains {position} {position.LogicalDirection}"); 447return ChildTextView.Contains(tp.ChildPointer.CreatePointer(position.LogicalDirection));
System\Windows\Documents\FixedTextPointer.cs (3)
244return ((ITextPointer)this).CreatePointer(0, ((ITextPointer)this).LogicalDirection); 262return ((ITextPointer)this).CreatePointer(distance, ((ITextPointer)this).LogicalDirection); 592/// <see cref="ITextPointer.LogicalDirection"/>
System\Windows\Documents\FixedTextView.cs (5)
160DocumentsTrace.FixedTextOM.TextView.Trace($"GetRectFromTextPosition {(FixedTextPointer)position}, {position.LogicalDirection}"); 342DocumentsTrace.FixedTextOM.TextView.Trace($"FixedTextView.MoveToLine {(FixedTextPointer)position}, {position.LogicalDirection}, {suggestedX}, {count}"); 346LogicalDirection edge = position.LogicalDirection; 591DocumentsTrace.FixedTextOM.TextView.Trace($"GetLineRange {(FixedTextPointer)position}, {position.LogicalDirection}"); 1211LogicalDirection dir = textPointer.LogicalDirection;
System\Windows\Documents\NullTextNavigator.cs (1)
455/// <see cref="ITextPointer.LogicalDirection"/>
System\windows\Documents\TextEditorDragDrop.cs (1)
471dropPosition = dropPosition.GetInsertionPosition(dropPosition.LogicalDirection);
System\windows\Documents\TextEditorMouse.cs (4)
736if (!(mouseMovePosition.GetPointerContext(mouseMovePosition.LogicalDirection) == TextPointerContext.EmbeddedElement)) 748ITextPointer otherEdgePosition = mouseMovePosition.GetNextContextPosition(mouseMovePosition.LogicalDirection); 749LogicalDirection otherEdgeDirection = (mouseMovePosition.LogicalDirection == LogicalDirection.Forward) ? 765return mouseMovePosition.GetAdjacentElement(mouseMovePosition.LogicalDirection) as UIElement;
System\windows\Documents\TextEditorSelection.cs (24)
285This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 314This.Selection.SetCaretToPosition(newMovingPosition, newMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 330originalMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 374This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 404This.Selection.SetCaretToPosition(newMovingPosition, newMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 420originalMovingPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 471This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 523This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 576This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 618This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 656This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 693This.Selection.SetCaretToPosition(position, position.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 732This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 770This.Selection.SetCaretToPosition(targetPosition, targetPosition.LogicalDirection, /*allowStopAtLineEnd:*/ 1131if (newComparedToOld > 0 || newComparedToOld == 0 && newMovingPosition.LogicalDirection != originalMovingPosition.LogicalDirection) 1245if (newComparedToOld < 0 || newComparedToOld == 0 && newMovingPosition.LogicalDirection != originalMovingPosition.LogicalDirection) 1800This.Selection.SetCaretToPosition(e.NewPosition, e.NewPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 1830This.Selection.SetCaretToPosition(e.NewPosition, e.NewPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 1865if (newComparedToOld < 0 || newComparedToOld == 0 && e.NewPosition.LogicalDirection != e.Position.LogicalDirection) 2321movingPosition.LogicalDirection == LogicalDirection.Backward && 2336movingPosition = movingPosition.GetInsertionPosition(movingPosition.LogicalDirection);
System\windows\Documents\TextEditorSpelling.cs (1)
60LogicalDirection direction = This.Selection.IsEmpty ? This.Selection.Start.LogicalDirection : LogicalDirection.Forward;
System\Windows\Documents\TextFindEngine.cs (1)
308ITextPointer oppositeEndPosition = position.CreatePointer(oppositeEndOffset, position.LogicalDirection);
System\Windows\Documents\TextParentUndoUnit.cs (4)
56_undoAnchorPositionDirection = anchorPosition.LogicalDirection; 58_undoMovingPositionDirection = movingPosition.LogicalDirection; 194_redoAnchorPositionDirection = anchorPosition.LogicalDirection; 196_redoMovingPositionDirection = movingPosition.LogicalDirection;
System\Windows\Documents\TextPointerBase.cs (6)
699bool isAtLineWrappingPosition = position.LogicalDirection == LogicalDirection.Forward 819position.MoveToInsertionPosition(position.LogicalDirection); 832thisPointer.SetLogicalDirection(position.LogicalDirection); 841thisPointer.SetLogicalDirection(lineRange.Start.LogicalDirection); 849thisPointer.SetLogicalDirection(position.LogicalDirection); 1103if (thisPointer.IsFrozen && thisPointer.LogicalDirection == logicalDirection)
System\Windows\Documents\TextRangeBase.cs (6)
1710if (!IsAtNormalizedPosition(thisRange, start, start.LogicalDirection)) 1712start = GetNormalizedPosition(thisRange, start, start.LogicalDirection); 1732if (start.LogicalDirection == LogicalDirection.Backward) 1760if (!IsAtNormalizedPosition(thisRange, start, start.LogicalDirection)) 1762start = GetNormalizedPosition(thisRange, start, start.LogicalDirection); 1943if (!TextPointerBase.IsAtInsertionPosition(start, start.LogicalDirection))
System\windows\Documents\TextSegment.cs (3)
70_start = startPosition.GetFrozenPointer(startPosition.LogicalDirection); 76_start = startPosition.GetFrozenPointer(preserveLogicalDirection ? startPosition.LogicalDirection : LogicalDirection.Backward); 77_end = endPosition.GetFrozenPointer(preserveLogicalDirection ? endPosition.LogicalDirection : LogicalDirection.Forward);
System\windows\Documents\TextSelection.cs (22)
540Invariant.Assert(thisSelection.Start.LogicalDirection == caretPosition.LogicalDirection); // orientation must be as passed 688position = position.GetNextInsertionPosition(position.LogicalDirection); 903cursorWordRange = TextPointerBase.GetWordRange(cursorPosition, cursorPosition.LogicalDirection); 1001cursorWordRange = TextPointerBase.GetWordRange(cursorPosition, cursorPosition.LogicalDirection); 1872_anchorPosition = anchorPosition.GetInsertionPosition(anchorPosition.LogicalDirection); 1877_anchorPosition = thisSelection.Start.GetFrozenPointer(_anchorPosition.LogicalDirection); 1881_anchorPosition = thisSelection.End.GetFrozenPointer(_anchorPosition.LogicalDirection); 1885_movingPositionDirection = movingPosition.LogicalDirection; 1954if (cursorPosition.GetPointerContext(cursorPosition.LogicalDirection) == TextPointerContext.EmbeddedElement) 1962movingPosition = cursorPosition.GetNextContextPosition(cursorPosition.LogicalDirection); 1969thisSelection.SetCaretToPosition(cursorPosition, cursorPosition.LogicalDirection, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/false); 1997(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 1998cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2003(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2004cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2012(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2013cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2018(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2019cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2181if ((caretPosition.LogicalDirection == LogicalDirection.Backward && // 2198if (caretPosition.LogicalDirection == LogicalDirection.Backward && //