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