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