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