다음을 통해 공유


IVsTextMarker Interface

Provides methods for managing text markers.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
<InterfaceTypeAttribute()> _
<GuidAttribute("950122D9-1A51-43CA-8CED-B5D9E42DE1B5")> _
Public Interface IVsTextMarker
[InterfaceTypeAttribute()]
[GuidAttribute("950122D9-1A51-43CA-8CED-B5D9E42DE1B5")]
public interface IVsTextMarker
[InterfaceTypeAttribute()]
[GuidAttribute(L"950122D9-1A51-43CA-8CED-B5D9E42DE1B5")]
public interface class IVsTextMarker
[<InterfaceTypeAttribute()>]
[<GuidAttribute("950122D9-1A51-43CA-8CED-B5D9E42DE1B5")>]
type IVsTextMarker =  interface end
public interface IVsTextMarker

The IVsTextMarker type exposes the following members.

Methods

  Name Description
Public method DrawGlyph Draws a glyph in the widget margin given a display context and bounding rectangle.
Public method ExecMarkerCommand Executes a text marker command against a marker.
Public method GetBehavior Returns a text marker behavior set by the SetBehavior method.
Public method GetMarkerCommandInfo Returns text marker command information.
Public method GetPriorityIndex Returns the text marker priority index, with the highest value getting the topmost placement.
Public method GetTipText Returns the text to display in a tip for the marker type.
Public method GetType Returns a text marker type.
Public method GetVisualStyle Returns the visual style of a marker type.
Public method Invalidate Prevents a text marker from appearing in the user interface.
Public method SetBehavior Sets the behavior of a text marker.
Public method SetType Sets a text marker type.
Public method SetVisualStyle Sets the visual style of a marker type.
Public method UnadviseClient Unadvises the client, if there is one.

Top

Remarks

The text marker tracks edits in its owning text buffer and maintains the position data so that interested parties can query the new position information post-edit.

Note

If any part of the text range specified in the text marker is involved in an edit, the marker becomes invalid.

There are several ways that you can access IVsTextMarker:

See illustrations of the calling of this interface in the sample Figures Language Service.

Notes to Callers

Call IVsTextMarker when you need to track positional and edit information in the text buffer.

See Also

Reference

Microsoft.VisualStudio.TextManager.Interop Namespace