Export (0) Print
Expand All

IVsTextMarker Interface

Provides methods for managing text markers.

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

public interface IVsTextMarker

The IVsTextMarker type exposes the following members.

Public methodDrawGlyphDraws a glyph in the widget margin given a display context and bounding rectangle.
Public methodExecMarkerCommandExecutes a text marker command against a marker.
Public methodGetBehaviorReturns a text marker behavior set by the SetBehavior method.
Public methodGetMarkerCommandInfoReturns text marker command information.
Public methodGetPriorityIndexReturns the text marker priority index, with the highest value getting the topmost placement.
Public methodGetTipTextReturns the text to display in a tip for the marker type.
Public methodGetTypeReturns a text marker type.
Public methodGetVisualStyleReturns the visual style of a marker type.
Public methodInvalidatePrevents a text marker from appearing in the user interface.
Public methodSetBehaviorSets the behavior of a text marker.
Public methodSetTypeSets a text marker type.
Public methodSetVisualStyleSets the visual style of a marker type.
Public methodUnadviseClientUnadvises the client, if there is one.

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.


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.

© 2014 Microsoft