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