Udostępnij za pośrednictwem


IVsTextTrackingPoint Interface

Definition

Establishes and maintains an internal tracking point.

public interface class IVsTextTrackingPoint
public interface class IVsTextTrackingPoint
__interface IVsTextTrackingPoint
[System.Runtime.InteropServices.Guid("D6BF0A8A-3798-49C5-8806-648A635EACC8")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsTextTrackingPoint
[System.Runtime.InteropServices.Guid("D6BF0A8A-3798-49C5-8806-648A635EACC8")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsTextTrackingPoint
[<System.Runtime.InteropServices.Guid("D6BF0A8A-3798-49C5-8806-648A635EACC8")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsTextTrackingPoint = interface
[<System.Runtime.InteropServices.Guid("D6BF0A8A-3798-49C5-8806-648A635EACC8")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsTextTrackingPoint = interface
Public Interface IVsTextTrackingPoint
Attributes

Remarks

When tracking certain positions, such as the current selection, it is necessary to track a location in layer-generated text, that is, text produced by the synthetic text layer, yet still be able to track the location even if that layer goes away.

The solution is a track point object, which is like a marker except that it is guaranteed to keep tracking, possibly in a different layer, for as long as the buffer lives. Put another way, a multi-layer track point is similar to a zero-length marker, but it is guaranteed to always have a meaningful location in one of the layers, provided the buffer continues to exist. A track point never shows UI, and its position may not be reset. The only things you can do with track points are create them and query their layer and current line/index.

This interface is used only in special-purpose scenarios. Unless you need to track a point which may exist in a synthetic text region, you will not need to use this interface. Clients should normally use ordinary text markers on the buffer.

Methods

GetBehavior(UInt32)

Gets the tracking point behavior.

GetCurrentLineIndex(Int32, Int32)

Gets the tracking point current line and index.

GetTextLayer(IVsTextLayer)

Gets the tracking point’s text layer.

SetBehavior(UInt32)

Sets the tracking point’s behavior.

Applies to