VirtualSnapshotPoint Structure
Represents a SnapshotPoint that may have virtual spaces.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
Syntax
'Declaration
Public Structure VirtualSnapshotPoint _
Implements IComparable(Of VirtualSnapshotPoint)
public struct VirtualSnapshotPoint : IComparable<VirtualSnapshotPoint>
public value class VirtualSnapshotPoint : IComparable<VirtualSnapshotPoint>
[<Sealed>]
type VirtualSnapshotPoint =
struct
interface IComparable<VirtualSnapshotPoint>
end
JScript supports the use of structures, but not the declaration of new ones.
The VirtualSnapshotPoint type exposes the following members.
Constructors
Name | Description | |
---|---|---|
VirtualSnapshotPoint(SnapshotPoint) | Initializes a new instance of a VirtualSnapshotPoint at the specified position, with zero virtual spaces. | |
VirtualSnapshotPoint(ITextSnapshot, Int32) | Initializes a new instance of a VirtualSnapshotPoint at the specified position in the specified snapshot, with zero virtual spaces. | |
VirtualSnapshotPoint(ITextSnapshotLine, Int32) | Initializes a new instance of a VirtualSnapshotPoint at the specified offset of the specified line, placing the point in virtual space if necessary. | |
VirtualSnapshotPoint(SnapshotPoint, Int32) | Initializes a new instance of a VirtualSnapshotPoint at the specified position, with the specified number of virtual spaces. |
Top
Properties
Name | Description | |
---|---|---|
IsInVirtualSpace | Determines whether the snapshot point has virtual spaces. | |
Position | Gets the position of the snapshot point. | |
VirtualSpaces | Gets the number of virtual spaces. |
Top
Methods
Name | Description | |
---|---|---|
CompareTo | Compares one VirtualSnapshotPoint to another. | |
Equals | Determines whether two VirtualSnapshotPoint objects are the same. (Overrides ValueType.Equals(Object).) | |
GetHashCode | Gets the hash code for the object. (Overrides ValueType.GetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Converts the object to a string. (Overrides ValueType.ToString.) | |
TranslateTo(ITextSnapshot) | Translates this point to the specified snapshot. | |
TranslateTo(ITextSnapshot, PointTrackingMode) | Translates this point to the specified text snapshot with the specified tracking mode. |
Top
Operators
Name | Description | |
---|---|---|
Equality | Determines whether two VirtualSnapshotPoint objects are the same. | |
GreaterThan | Determines whether the position of the left point is greater than the position of the right point. | |
GreaterThanOrEqual | Determines whether the position of the left point is greater than or equal to the position of the right point. | |
Inequality | Determines whether two VirtualSnapshotPoint objects are different. | |
LessThan | Determines whether the position of the left point is less than the position of the right point. | |
LessThanOrEqual | Determines whether the position of the left point is less than or equal to the position of the right point. |
Top
Remarks
Virtual spaces are "extra" spaces at the end of a line that do not add to the length of the line. You can enable or disable virtual spaces in Visual Studio. When virtual spaces are disabled, pressing on the right arrow key at the end of a line causes the caret to move to the beginning of the next line. When virtual spaces are enabled, pressing on the right arrow key at the end of a line causes the caret to move forward on the same line.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.