66 instantiations of CharacterHit
PresentationCore (36)
MS\Internal\TextFormatting\FullTextLine.cs (11)
850
CharacterHit characterHit = new
CharacterHit
(_cpFirst, 0);
872
return new
CharacterHit
(_collapsedRange.TextSourceCharacterIndex, _collapsedRange.Length);
877
return new
CharacterHit
(_collapsedRange.TextSourceCharacterIndex, 0);
940
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + i, codepointsToNextCaretStop);
944
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + i, 0);
951
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + caretStopCount - 1, codepointsToNextCaretStop);
1176
return new
CharacterHit
(caretStopIndex, offsetToNextCaretStopIndex);
1181
return new
CharacterHit
(caretStopIndex, offsetToNextCaretStopIndex);
1284
return new
CharacterHit
(caretStopIndex, 0);
2016
DistanceFromCharacterHit(new
CharacterHit
(cp, 0))
2022
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)
1985
return (EOT || idealDistance <= 0) ? new
CharacterHit
() : new
CharacterHit
(Length, 0);
1990
return new
CharacterHit
();
2011
return new
CharacterHit
(dcp, (idealDistance > currentIdealAdvance / 2 ? 1 : 0));
2015
return new
CharacterHit
(Length - 1, 1);
System\Windows\Media\GlyphRun.cs (10)
672
return new
CharacterHit
(caretStops.Count - 1, 0);
674
return new
CharacterHit
(0, 0);
684
return new
CharacterHit
(secondStopIndex, 0);
694
return new
CharacterHit
(firstStopIndex, caretStops.Count - 1 - firstStopIndex);
702
return new
CharacterHit
(firstStopIndex, 0);
707
return new
CharacterHit
(firstStopIndex, secondStopIndex - firstStopIndex);
739
return new
CharacterHit
(caretStopIndex, codePointsUntilNextStop);
755
return new
CharacterHit
(nextCaretStopIndex, nextCodePointsUntilNextStop);
785
return new
CharacterHit
(caretStopIndex, 0);
799
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)
126
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)
2389
CharacterHit charHit = new
CharacterHit
();
2395
charHit = new
CharacterHit
(characterIndex - 1, 1);
2407
charHit = new
CharacterHit
(characterIndex, 0);
2496
CharacterHit textSourceCharacterIndex = new
CharacterHit
(characterIndex, 0);
2604
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)
521
new
CharacterHit
(fixedp.Offset - 1, 1) :
522
new
CharacterHit
(fixedp.Offset, 0);
981
return run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(firstChar, trailingLength));
106 references to CharacterHit
PresentationCore (52)
MS\Internal\TextFormatting\FullTextLine.cs (14)
831
public override
CharacterHit
GetCharacterHitFromDistance(
847
private
CharacterHit
CharacterHitFromDistance(int hitTestDistance)
850
CharacterHit
characterHit = new CharacterHit(_cpFirst, 0);
965
CharacterHit
characterHit
983
private int DistanceFromCharacterHit(
CharacterHit
characterHit)
1124
public override
CharacterHit
GetNextCaretCharacterHit(
1125
CharacterHit
characterHit
1190
public override
CharacterHit
GetPreviousCaretCharacterHit(
1191
CharacterHit
characterHit
1203
public override
CharacterHit
GetBackspaceCaretCharacterHit(
1204
CharacterHit
characterHit
1214
private
CharacterHit
GetPreviousCaretCharacterHitByBehavior(
1215
CharacterHit
characterHit,
2210
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
1981
internal
CharacterHit
DcpFromDistance(int idealDistance)
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
477
CharacterHit
characterHit,
System\Windows\Media\GlyphRun.cs (6)
492
public double GetDistanceFromCaretCharacterHit(
CharacterHit
characterHit)
581
public
CharacterHit
GetCaretCharacterHitFromDistance(double distance, out bool isInside)
718
public
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
characterHit)
765
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;
1753
CharacterHit
charIndex;
MS\Internal\PtsHost\Line.cs (9)
552
internal
CharacterHit
GetTextPositionFromDistance(int urDistance)
580
CharacterHit
charIndex;
749
internal
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
index)
760
internal
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
index)
771
internal
CharacterHit
GetBackspaceCaretCharacterHit(
CharacterHit
index)
782
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)
2143
CharacterHit
charIndex = line.GetTextPositionFromDistance(distance);
2389
CharacterHit
charHit = new CharacterHit();
2496
CharacterHit
textSourceCharacterIndex = new CharacterHit(characterIndex, 0);
2498
CharacterHit
nextCharacterHit;
2604
CharacterHit
textSourceCharacterIndex = new CharacterHit(characterIndex, 0);
2605
CharacterHit
backspaceCharacterHit;
System\Windows\Documents\FixedTextView.cs (3)
520
CharacterHit
start = (fixedp.Offset == characterCount) ?
523
CharacterHit
next = (direction == LogicalDirection.Forward) ?
808
CharacterHit
hit = run.GetCaretCharacterHitFromDistance(distance, out isInside);
System\Windows\Documents\RubberbandSelector.cs (1)
481
CharacterHit
hit = run.GetCaretCharacterHitFromDistance(distance, out isInside);