66 instantiations of CharacterHit
PresentationCore (36)
MS\Internal\TextFormatting\FullTextLine.cs (11)
852
CharacterHit characterHit = new
CharacterHit
(_cpFirst, 0);
874
return new
CharacterHit
(_collapsedRange.TextSourceCharacterIndex, _collapsedRange.Length);
879
return new
CharacterHit
(_collapsedRange.TextSourceCharacterIndex, 0);
942
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + i, codepointsToNextCaretStop);
946
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + i, 0);
953
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + caretStopCount - 1, codepointsToNextCaretStop);
1178
return new
CharacterHit
(caretStopIndex, offsetToNextCaretStopIndex);
1183
return new
CharacterHit
(caretStopIndex, offsetToNextCaretStopIndex);
1286
return new
CharacterHit
(caretStopIndex, 0);
2018
DistanceFromCharacterHit(new
CharacterHit
(cp, 0))
2024
DistanceFromCharacterHit(new
CharacterHit
(cp + cchBounds - 1, 1))
MS\Internal\TextFormatting\SimpleTextLine.cs (14)
651
return new
CharacterHit
(_cpFirst, 0);
656
CharacterHit runIndex = new
CharacterHit
();
677
return new
CharacterHit
(first, runIndex.TrailingLength);
715
return new
CharacterHit
(nextVisisbleCp, 1);
723
return new
CharacterHit
(nextVisisbleCp, 1);
760
return new
CharacterHit
(previousVisisbleCp, 0);
768
return new
CharacterHit
(previousVisisbleCp, 0);
822
new
CharacterHit
(firstTextSourceCharacterIndex, 0)
826
new
CharacterHit
(firstTextSourceCharacterIndex + textLength, 0)
1989
return (EOT || idealDistance <= 0) ? new
CharacterHit
() : new
CharacterHit
(Length, 0);
1994
return new
CharacterHit
();
2015
return new
CharacterHit
(dcp, (idealDistance > currentIdealAdvance / 2 ? 1 : 0));
2019
return new
CharacterHit
(Length - 1, 1);
System\Windows\Media\GlyphRun.cs (10)
657
return new
CharacterHit
(caretStops.Count - 1, 0);
659
return new
CharacterHit
(0, 0);
669
return new
CharacterHit
(secondStopIndex, 0);
679
return new
CharacterHit
(firstStopIndex, caretStops.Count - 1 - firstStopIndex);
687
return new
CharacterHit
(firstStopIndex, 0);
692
return new
CharacterHit
(firstStopIndex, secondStopIndex - firstStopIndex);
724
return new
CharacterHit
(caretStopIndex, codePointsUntilNextStop);
740
return new
CharacterHit
(nextCaretStopIndex, nextCodePointsUntilNextStop);
770
return new
CharacterHit
(caretStopIndex, 0);
784
return new
CharacterHit
(previousCaretStopIndex, 0);
System\Windows\Media\textformatting\TextLine.cs (1)
152
nextHit = new
CharacterHit
(cpFirst + Length - 1, 1);
PresentationFramework (30)
MS\Internal\Documents\TextBoxView.cs (5)
821
CharacterHit sourceCharacterHit = new
CharacterHit
();
825
sourceCharacterHit = new
CharacterHit
(position.Offset, 0);
832
sourceCharacterHit = new
CharacterHit
(position.Offset - 1, 1);
869
CharacterHit sourceCharacterHit = new
CharacterHit
(position.Offset, 0);
942
CharacterHit sourceCharacterHit = new
CharacterHit
(position.Offset, 0);
MS\Internal\PtsHost\Line.cs (1)
118
double distance = _line.GetDistanceFromCharacterHit(new
CharacterHit
(dcpFigure, 0));
MS\Internal\PtsHost\TextParaClient.cs (13)
2389
CharacterHit charHit = new
CharacterHit
();
2413
charHit = new
CharacterHit
(dcp - 1, 1);
2420
charHit = new
CharacterHit
(dcp - 1, 1);
2426
charHit = new
CharacterHit
(dcp, 0);
2493
CharacterHit charHit = new
CharacterHit
();
2511
charHit = new
CharacterHit
(dcp - 1, 1);
2535
charHit = new
CharacterHit
(dcp - 1, 1);
2544
charHit = new
CharacterHit
(dcp - 1, 1);
2550
charHit = new
CharacterHit
(dcp, 0);
2647
CharacterHit charHit = new
CharacterHit
(dcp, 0);
2813
CharacterHit charHit = new
CharacterHit
(dcp, 0);
2929
CharacterHit textSourceCharacterIndex = new
CharacterHit
(dcp, 0);
3055
CharacterHit charHit = new
CharacterHit
(dcp, 0);
System\Windows\Controls\TextBlock.cs (5)
2387
CharacterHit charHit = new
CharacterHit
();
2393
charHit = new
CharacterHit
(characterIndex - 1, 1);
2405
charHit = new
CharacterHit
(characterIndex, 0);
2494
CharacterHit textSourceCharacterIndex = new
CharacterHit
(characterIndex, 0);
2602
CharacterHit textSourceCharacterIndex = new
CharacterHit
(characterIndex, 0);
System\Windows\Documents\FixedHighlight.cs (3)
143
x1 = run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(_gBeginOffset, 0));
147
x2 = run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(chrct - 1, 1));
151
x2 = run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(_gEndOffset, 0));
System\Windows\Documents\FixedTextView.cs (3)
516
new
CharacterHit
(fixedp.Offset - 1, 1) :
517
new
CharacterHit
(fixedp.Offset, 0);
976
return run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(firstChar, trailingLength));
106 references to CharacterHit
PresentationCore (52)
MS\Internal\TextFormatting\FullTextLine.cs (14)
833
public override
CharacterHit
GetCharacterHitFromDistance(
849
private
CharacterHit
CharacterHitFromDistance(int hitTestDistance)
852
CharacterHit
characterHit = new CharacterHit(_cpFirst, 0);
967
CharacterHit
characterHit
985
private int DistanceFromCharacterHit(
CharacterHit
characterHit)
1126
public override
CharacterHit
GetNextCaretCharacterHit(
1127
CharacterHit
characterHit
1192
public override
CharacterHit
GetPreviousCaretCharacterHit(
1193
CharacterHit
characterHit
1205
public override
CharacterHit
GetBackspaceCaretCharacterHit(
1206
CharacterHit
characterHit
1216
private
CharacterHit
GetPreviousCaretCharacterHitByBehavior(
1217
CharacterHit
characterHit,
2212
CharacterHit
characterHit = CharacterHitFromDistance(_metrics._textWidthAtTrailing + _metrics._textStart);
MS\Internal\TextFormatting\SimpleTextLine.cs (10)
641
public override
CharacterHit
GetCharacterHitFromDistance(
656
CharacterHit
runIndex = new CharacterHit();
688
CharacterHit
characterHit
701
public override
CharacterHit
GetNextCaretCharacterHit(
702
CharacterHit
characterHit
736
public override
CharacterHit
GetPreviousCaretCharacterHit(
737
CharacterHit
characterHit
781
public override
CharacterHit
GetBackspaceCaretCharacterHit(
782
CharacterHit
characterHit
1985
internal
CharacterHit
DcpFromDistance(int idealDistance)
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
477
CharacterHit
characterHit,
System\Windows\Media\GlyphRun.cs (6)
477
public double GetDistanceFromCaretCharacterHit(
CharacterHit
characterHit)
566
public
CharacterHit
GetCaretCharacterHitFromDistance(double distance, out bool isInside)
703
public
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
characterHit)
750
public
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
characterHit)
System\Windows\Media\textformatting\CharacterHit.cs (8)
27
public struct CharacterHit : IEquatable<
CharacterHit
>
71
public static bool operator==(
CharacterHit
left,
CharacterHit
right)
84
public static bool operator!=(
CharacterHit
left,
CharacterHit
right)
95
public bool Equals(
CharacterHit
obj)
108
if (!(obj is
CharacterHit
))
110
return this == (
CharacterHit
)obj;
System\Windows\Media\textformatting\TextLine.cs (13)
77
public abstract
CharacterHit
GetCharacterHitFromDistance(
89
CharacterHit
characterHit
98
public abstract
CharacterHit
GetNextCaretCharacterHit(
99
CharacterHit
characterHit
108
public abstract
CharacterHit
GetPreviousCaretCharacterHit(
109
CharacterHit
characterHit
118
public abstract
CharacterHit
GetBackspaceCaretCharacterHit(
119
CharacterHit
characterHit
141
internal bool IsAtCaretCharacterHit(
CharacterHit
characterHit, int cpFirst)
147
CharacterHit
nextHit = GetNextCaretCharacterHit(characterHit);
155
CharacterHit
previousHit = GetPreviousCaretCharacterHit(nextHit);
160
CharacterHit
previousHit = GetPreviousCaretCharacterHit(characterHit);
161
CharacterHit
nextHit = GetNextCaretCharacterHit(previousHit);
PresentationFramework (54)
MS\Internal\Documents\TextBoxLine.cs (8)
284
internal
CharacterHit
GetTextPositionFromDistance(double distance)
296
internal
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
index)
306
internal
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
index)
316
internal
CharacterHit
GetBackspaceCaretCharacterHit(
CharacterHit
index)
327
internal bool IsAtCaretCharacterHit(
CharacterHit
charHit)
MS\Internal\Documents\TextBoxView.cs (6)
821
CharacterHit
sourceCharacterHit = new CharacterHit();
869
CharacterHit
sourceCharacterHit = new CharacterHit(position.Offset, 0);
870
CharacterHit
nextCharacterHit;
942
CharacterHit
sourceCharacterHit = new CharacterHit(position.Offset, 0);
943
CharacterHit
backspaceCharacterHit;
1755
CharacterHit
charIndex;
MS\Internal\PtsHost\Line.cs (9)
543
internal
CharacterHit
GetTextPositionFromDistance(int urDistance)
571
CharacterHit
charIndex;
740
internal
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
index)
751
internal
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
index)
762
internal
CharacterHit
GetBackspaceCaretCharacterHit(
CharacterHit
index)
773
internal bool IsAtCaretCharacterHit(
CharacterHit
charHit)
MS\Internal\PtsHost\TextParaClient.cs (11)
1082
CharacterHit
charHit = line.GetTextPositionFromDistance(urDistance);
2389
CharacterHit
charHit = new CharacterHit();
2493
CharacterHit
charHit = new CharacterHit();
2647
CharacterHit
charHit = new CharacterHit(dcp, 0);
2651
CharacterHit
nextCharacterHit;
2813
CharacterHit
charHit = new CharacterHit(dcp, 0);
2814
CharacterHit
nextCharacterHit;
2929
CharacterHit
textSourceCharacterIndex = new CharacterHit(dcp, 0);
2930
CharacterHit
backspaceCharacterHit = line.GetBackspaceCaretCharacterHit(textSourceCharacterIndex);
3055
CharacterHit
charHit = new CharacterHit(dcp, 0);
3056
CharacterHit
backspaceCharacterHit = line.GetBackspaceCaretCharacterHit(charHit);
MS\Internal\Text\ComplexLine.cs (2)
253
CharacterHit
charHit;
553
private int CalcPositionOffset(
CharacterHit
charHit)
MS\Internal\Text\Line.cs (8)
197
internal
CharacterHit
GetTextPositionFromDistance(double distance)
218
internal
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
index)
230
internal
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
index)
242
internal
CharacterHit
GetBackspaceCaretCharacterHit(
CharacterHit
index)
253
internal bool IsAtCaretCharacterHit(
CharacterHit
charHit)
System\Windows\Controls\TextBlock.cs (6)
2141
CharacterHit
charIndex = line.GetTextPositionFromDistance(distance);
2387
CharacterHit
charHit = new CharacterHit();
2494
CharacterHit
textSourceCharacterIndex = new CharacterHit(characterIndex, 0);
2496
CharacterHit
nextCharacterHit;
2602
CharacterHit
textSourceCharacterIndex = new CharacterHit(characterIndex, 0);
2603
CharacterHit
backspaceCharacterHit;
System\Windows\Documents\FixedTextView.cs (3)
515
CharacterHit
start = (fixedp.Offset == characterCount) ?
518
CharacterHit
next = (direction == LogicalDirection.Forward) ?
803
CharacterHit
hit = run.GetCaretCharacterHitFromDistance(distance, out isInside);
System\Windows\Documents\RubberbandSelector.cs (1)
483
CharacterHit
hit = run.GetCaretCharacterHitFromDistance(distance, out isInside);