Provides the base requirements for the hit test results of a call to the
Syntax
Properties
IntraTextSpacerTag
Gets the intra-text spacer tag range that is directly under the Location, if any.
Property Value
- Tag
Snapshot <IIntraRange Text >:Spacer Tag The intra-text spacer tag range that is directly under the Location, if any.
Location
Gets the Point for which the hit test result was created, relative to the Syntax
Property Value
- Point:
The Point for which the hit test result was created, relative to the Syntax
Editor .
Offset
Gets the zero-based offset within the Snapshot that is directly under the Location, or closest to it.
Property Value
- int:
The zero-based offset within the Snapshot that is directly under the Location, or closest to it.
Remarks
If the Location is directly over a character, the Type property returns
HitTestResultType.ViewTextAreaOverCharacter
and this property indicates the offset of the character.
Otherwise, the offset of the nearest character is used.
For instance, locations over the line number margin will return the offset of the first character in the view line
that the mouse is over.
The value will be -1
if the Location is not over an editor view.
Position
Gets the zero-based Text
Property Value
- Text
Position : The zero-based Text
Position within the Snapshot that is directly under the Location, or closest to it.
Remarks
If the Location is directly over a character, the Type property returns
HitTestResultType.ViewTextAreaOverCharacter
and this property indicates the Text
The value will be TextPosition.Empty
if the Location is not over an editor view.
Snapshot
Gets the IText
Property Value
- IText
Snapshot : The IText
Snapshot that was current within the View when the hit test was performed.
SyntaxEditor
Gets the Syntax
Property Value
- Syntax
Editor : The Syntax
Editor that was hit tested.
TextAreaLocation
Property Value
Remarks
This location is useful for calls to methods like IEditor
Type
Gets a Hit
Property Value
- Hit
Test :Result Type A Hit
Test that provides a general categorization about what the hit test result represents.Result Type
View
Gets the IEditor
Property Value
- IEditor
View : The IEditor
View , if any, that the Location is over.
ViewLine
Gets the IText
Property Value
- IText
View :Line The IText
View that contains the Position.Line
Remarks
See the remarks on the Position property for details on how it is populated.
ViewMargin
Gets the IEditor
Property Value
- IEditor
View :Margin The IEditor
View , if any, that the Location is over.Margin
VisualElement
Gets the IUIElement, if any, that is related to the hit test result.
Property Value
- IUIElement:
The IUIElement, if any, that is related to the hit test result.
Methods
GetReader()
Returns an IText
Returns
- IText
Snapshot :Reader An IText
Snapshot that is initialized to the Offset.Reader