66 instantiations of CharacterHit
PresentationCore (36)
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (11)
898
CharacterHit characterHit = new
CharacterHit
(_cpFirst, 0);
920
return new
CharacterHit
(_collapsedRange.TextSourceCharacterIndex, _collapsedRange.Length);
925
return new
CharacterHit
(_collapsedRange.TextSourceCharacterIndex, 0);
988
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + i, codepointsToNextCaretStop);
992
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + i, 0);
999
return new
CharacterHit
(GetExternalCp(lsTextCell.lscpStartCell) + caretStopCount - 1, codepointsToNextCaretStop);
1224
return new
CharacterHit
(caretStopIndex, offsetToNextCaretStopIndex);
1229
return new
CharacterHit
(caretStopIndex, offsetToNextCaretStopIndex);
1332
return new
CharacterHit
(caretStopIndex, 0);
2067
DistanceFromCharacterHit(new
CharacterHit
(cp, 0))
2073
DistanceFromCharacterHit(new
CharacterHit
(cp + cchBounds - 1, 1))
Core\CSharp\MS\Internal\TextFormatting\SimpleTextLine.cs (14)
667
return new
CharacterHit
(_cpFirst, 0);
672
CharacterHit runIndex = new
CharacterHit
();
693
return new
CharacterHit
(first, runIndex.TrailingLength);
731
return new
CharacterHit
(nextVisisbleCp, 1);
739
return new
CharacterHit
(nextVisisbleCp, 1);
776
return new
CharacterHit
(previousVisisbleCp, 0);
784
return new
CharacterHit
(previousVisisbleCp, 0);
841
new
CharacterHit
(firstTextSourceCharacterIndex, 0)
845
new
CharacterHit
(firstTextSourceCharacterIndex + textLength, 0)
2014
return (EOT || idealDistance <= 0) ? new
CharacterHit
() : new
CharacterHit
(Length, 0);
2019
return new
CharacterHit
();
2040
return new
CharacterHit
(dcp, (idealDistance > currentIdealAdvance / 2 ? 1 : 0));
2044
return new
CharacterHit
(Length - 1, 1);
Core\CSharp\System\Windows\Media\GlyphRun.cs (10)
694
return new
CharacterHit
(caretStops.Count - 1, 0);
696
return new
CharacterHit
(0, 0);
706
return new
CharacterHit
(secondStopIndex, 0);
716
return new
CharacterHit
(firstStopIndex, caretStops.Count - 1 - firstStopIndex);
724
return new
CharacterHit
(firstStopIndex, 0);
729
return new
CharacterHit
(firstStopIndex, secondStopIndex - firstStopIndex);
761
return new
CharacterHit
(caretStopIndex, codePointsUntilNextStop);
777
return new
CharacterHit
(nextCaretStopIndex, nextCodePointsUntilNextStop);
807
return new
CharacterHit
(caretStopIndex, 0);
821
return new
CharacterHit
(previousCaretStopIndex, 0);
Core\CSharp\System\Windows\Media\TextFormatting\TextLine.cs (1)
165
nextHit = new
CharacterHit
(cpFirst + Length - 1, 1);
PresentationFramework (30)
src\Framework\MS\Internal\Documents\TextBoxView.cs (5)
827
CharacterHit sourceCharacterHit = new
CharacterHit
();
831
sourceCharacterHit = new
CharacterHit
(position.Offset, 0);
838
sourceCharacterHit = new
CharacterHit
(position.Offset - 1, 1);
875
CharacterHit sourceCharacterHit = new
CharacterHit
(position.Offset, 0);
948
CharacterHit sourceCharacterHit = new
CharacterHit
(position.Offset, 0);
src\Framework\MS\Internal\PtsHost\Line.cs (1)
135
double distance = _line.GetDistanceFromCharacterHit(new
CharacterHit
(dcpFigure, 0));
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (13)
2617
CharacterHit charHit = new
CharacterHit
();
2641
charHit = new
CharacterHit
(dcp - 1, 1);
2648
charHit = new
CharacterHit
(dcp - 1, 1);
2654
charHit = new
CharacterHit
(dcp, 0);
2725
CharacterHit charHit = new
CharacterHit
();
2743
charHit = new
CharacterHit
(dcp - 1, 1);
2768
charHit = new
CharacterHit
(dcp - 1, 1);
2777
charHit = new
CharacterHit
(dcp - 1, 1);
2783
charHit = new
CharacterHit
(dcp, 0);
2884
CharacterHit charHit = new
CharacterHit
(dcp, 0);
3055
CharacterHit charHit = new
CharacterHit
(dcp, 0);
3175
CharacterHit textSourceCharacterIndex = new
CharacterHit
(dcp, 0);
3305
CharacterHit charHit = new
CharacterHit
(dcp, 0);
src\Framework\System\Windows\Controls\TextBlock.cs (5)
2487
CharacterHit charHit = new
CharacterHit
();
2493
charHit = new
CharacterHit
(characterIndex - 1, 1);
2505
charHit = new
CharacterHit
(characterIndex, 0);
2595
CharacterHit textSourceCharacterIndex = new
CharacterHit
(characterIndex, 0);
2703
CharacterHit textSourceCharacterIndex = new
CharacterHit
(characterIndex, 0);
src\Framework\System\Windows\Documents\FixedHighlight.cs (3)
151
x1 = run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(_gBeginOffset, 0));
155
x2 = run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(chrct - 1, 1));
159
x2 = run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(_gEndOffset, 0));
src\Framework\System\Windows\Documents\FixedTextView.cs (3)
538
new
CharacterHit
(fixedp.Offset - 1, 1) :
539
new
CharacterHit
(fixedp.Offset, 0);
1001
return run.GetDistanceFromCaretCharacterHit(new
CharacterHit
(firstChar, trailingLength));
106 references to CharacterHit
PresentationCore (52)
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (14)
879
public override
CharacterHit
GetCharacterHitFromDistance(
895
private
CharacterHit
CharacterHitFromDistance(int hitTestDistance)
898
CharacterHit
characterHit = new CharacterHit(_cpFirst, 0);
1013
CharacterHit
characterHit
1031
private int DistanceFromCharacterHit(
CharacterHit
characterHit)
1172
public override
CharacterHit
GetNextCaretCharacterHit(
1173
CharacterHit
characterHit
1238
public override
CharacterHit
GetPreviousCaretCharacterHit(
1239
CharacterHit
characterHit
1251
public override
CharacterHit
GetBackspaceCaretCharacterHit(
1252
CharacterHit
characterHit
1262
private
CharacterHit
GetPreviousCaretCharacterHitByBehavior(
1263
CharacterHit
characterHit,
2273
CharacterHit
characterHit = CharacterHitFromDistance(_metrics._textWidthAtTrailing + _metrics._textStart);
Core\CSharp\MS\Internal\TextFormatting\SimpleTextLine.cs (10)
657
public override
CharacterHit
GetCharacterHitFromDistance(
672
CharacterHit
runIndex = new CharacterHit();
704
CharacterHit
characterHit
717
public override
CharacterHit
GetNextCaretCharacterHit(
718
CharacterHit
characterHit
752
public override
CharacterHit
GetPreviousCaretCharacterHit(
753
CharacterHit
characterHit
797
public override
CharacterHit
GetBackspaceCaretCharacterHit(
798
CharacterHit
characterHit
2010
internal
CharacterHit
DcpFromDistance(int idealDistance)
Core\CSharp\MS\Internal\TextFormatting\TextFormatterImp.cs (1)
523
CharacterHit
characterHit,
Core\CSharp\System\Windows\Media\GlyphRun.cs (6)
514
public double GetDistanceFromCaretCharacterHit(
CharacterHit
characterHit)
603
public
CharacterHit
GetCaretCharacterHitFromDistance(double distance, out bool isInside)
740
public
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
characterHit)
787
public
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
characterHit)
Core\CSharp\System\Windows\Media\TextFormatting\CharacterHit.cs (8)
30
public struct CharacterHit : IEquatable<
CharacterHit
>
74
public static bool operator==(
CharacterHit
left,
CharacterHit
right)
87
public static bool operator!=(
CharacterHit
left,
CharacterHit
right)
98
public bool Equals(
CharacterHit
obj)
111
if (!(obj is
CharacterHit
))
113
return this == (
CharacterHit
)obj;
Core\CSharp\System\Windows\Media\TextFormatting\TextLine.cs (13)
89
public abstract
CharacterHit
GetCharacterHitFromDistance(
101
CharacterHit
characterHit
110
public abstract
CharacterHit
GetNextCaretCharacterHit(
111
CharacterHit
characterHit
120
public abstract
CharacterHit
GetPreviousCaretCharacterHit(
121
CharacterHit
characterHit
130
public abstract
CharacterHit
GetBackspaceCaretCharacterHit(
131
CharacterHit
characterHit
154
internal bool IsAtCaretCharacterHit(
CharacterHit
characterHit, int cpFirst)
160
CharacterHit
nextHit = GetNextCaretCharacterHit(characterHit);
168
CharacterHit
previousHit = GetPreviousCaretCharacterHit(nextHit);
173
CharacterHit
previousHit = GetPreviousCaretCharacterHit(characterHit);
174
CharacterHit
nextHit = GetNextCaretCharacterHit(previousHit);
PresentationFramework (54)
src\Framework\MS\Internal\Documents\TextBoxLine.cs (8)
293
internal
CharacterHit
GetTextPositionFromDistance(double distance)
305
internal
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
index)
315
internal
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
index)
325
internal
CharacterHit
GetBackspaceCaretCharacterHit(
CharacterHit
index)
336
internal bool IsAtCaretCharacterHit(
CharacterHit
charHit)
src\Framework\MS\Internal\Documents\TextBoxView.cs (6)
827
CharacterHit
sourceCharacterHit = new CharacterHit();
875
CharacterHit
sourceCharacterHit = new CharacterHit(position.Offset, 0);
876
CharacterHit
nextCharacterHit;
948
CharacterHit
sourceCharacterHit = new CharacterHit(position.Offset, 0);
949
CharacterHit
backspaceCharacterHit;
1753
CharacterHit
charIndex;
src\Framework\MS\Internal\PtsHost\Line.cs (9)
561
internal
CharacterHit
GetTextPositionFromDistance(int urDistance)
589
CharacterHit
charIndex;
758
internal
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
index)
769
internal
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
index)
780
internal
CharacterHit
GetBackspaceCaretCharacterHit(
CharacterHit
index)
791
internal bool IsAtCaretCharacterHit(
CharacterHit
charHit)
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (11)
1236
CharacterHit
charHit = line.GetTextPositionFromDistance(urDistance);
2617
CharacterHit
charHit = new CharacterHit();
2725
CharacterHit
charHit = new CharacterHit();
2884
CharacterHit
charHit = new CharacterHit(dcp, 0);
2888
CharacterHit
nextCharacterHit;
3055
CharacterHit
charHit = new CharacterHit(dcp, 0);
3056
CharacterHit
nextCharacterHit;
3175
CharacterHit
textSourceCharacterIndex = new CharacterHit(dcp, 0);
3176
CharacterHit
backspaceCharacterHit = line.GetBackspaceCaretCharacterHit(textSourceCharacterIndex);
3305
CharacterHit
charHit = new CharacterHit(dcp, 0);
3306
CharacterHit
backspaceCharacterHit = line.GetBackspaceCaretCharacterHit(charHit);
src\Framework\MS\Internal\Text\ComplexLine.cs (2)
261
CharacterHit
charHit;
565
private int CalcPositionOffset(
CharacterHit
charHit)
src\Framework\MS\Internal\Text\Line.cs (8)
207
internal
CharacterHit
GetTextPositionFromDistance(double distance)
228
internal
CharacterHit
GetNextCaretCharacterHit(
CharacterHit
index)
240
internal
CharacterHit
GetPreviousCaretCharacterHit(
CharacterHit
index)
252
internal
CharacterHit
GetBackspaceCaretCharacterHit(
CharacterHit
index)
263
internal bool IsAtCaretCharacterHit(
CharacterHit
charHit)
src\Framework\System\Windows\Controls\TextBlock.cs (6)
2240
CharacterHit
charIndex = line.GetTextPositionFromDistance(distance);
2487
CharacterHit
charHit = new CharacterHit();
2595
CharacterHit
textSourceCharacterIndex = new CharacterHit(characterIndex, 0);
2597
CharacterHit
nextCharacterHit;
2703
CharacterHit
textSourceCharacterIndex = new CharacterHit(characterIndex, 0);
2704
CharacterHit
backspaceCharacterHit;
src\Framework\System\Windows\Documents\FixedTextView.cs (3)
537
CharacterHit
start = (fixedp.Offset == characterCount) ?
540
CharacterHit
next = (direction == LogicalDirection.Forward) ?
827
CharacterHit
hit = run.GetCaretCharacterHitFromDistance(distance, out isInside);
src\Framework\System\Windows\Documents\RubberbandSelector.cs (1)
589
CharacterHit
hit = run.GetCaretCharacterHitFromDistance(distance, out isInside);