Udostępnij za pośrednictwem


IVsTextMarkerClient Interface

Definition

Provides callbacks to the Visual Studio environment and other processes used to manipulate a text marker.

public interface class IVsTextMarkerClient
public interface class IVsTextMarkerClient
__interface IVsTextMarkerClient
[System.Runtime.InteropServices.Guid("B1938F1B-D7A9-42F8-9960-D009027B3D2E")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsTextMarkerClient
[System.Runtime.InteropServices.Guid("B1938F1B-D7A9-42F8-9960-D009027B3D2E")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsTextMarkerClient
[<System.Runtime.InteropServices.Guid("B1938F1B-D7A9-42F8-9960-D009027B3D2E")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsTextMarkerClient = interface
[<System.Runtime.InteropServices.Guid("B1938F1B-D7A9-42F8-9960-D009027B3D2E")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsTextMarkerClient = interface
Public Interface IVsTextMarkerClient
Derived
Attributes

Remarks

When creating a marker using either M:Microsoft.VisualStudio.TextManager.Interop.IVsTextLines.CreateLineMarker(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient,Microsoft.VisualStudio.TextManager.Interop.IVsTextLineMarker[]) or CreateStreamMarker, you can provide a pointer to your implementation of IVsTextMarkerClient to be informed of changes to the newly-created marker. This allows you to provide enhanced marker behavior, such as tip text and command execution. You can also use this notification to produce a custom context menu over the marker by implementing the GetMarkerCommandInfo and ExecMarkerCommand methods.

Notes to Implementers

Implement this interface to be informed of changes to an individual marker.

Notes to Callers

Called by the text buffer when changes to a marker occur.

Methods

ExecMarkerCommand(IVsTextMarker, Int32)

Executes a command on a specific marker within the text buffer.

GetMarkerCommandInfo(IVsTextMarker, Int32, String[], UInt32[])

Queries the marker for the command information.

GetTipText(IVsTextMarker, String[])

Returns the tip text for the text marker when the mouse hovers over the marker.

MarkerInvalidated()

Called when the text associated with a marker is deleted by a user action.

OnAfterMarkerChange(IVsTextMarker)

Signals that the marker position has changed.

OnAfterSpanReload()

Signals that the text under the marker has been altered but the marker has not been deleted.

OnBeforeBufferClose()

Sends notification that the text buffer is about to close.

OnBufferSave(String)

Determines whether the buffer was saved to a different name.

Applies to