Provides methods for managing text markers.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Thetype exposes the following members.
|DrawGlyph||Draws a glyph in the widget margin given a display context and bounding rectangle.|
|ExecMarkerCommand||Executes a text marker command against a marker.|
|GetBehavior||Returns a text marker behavior set by the SetBehavior method.|
|GetMarkerCommandInfo||Returns text marker command information.|
|GetPriorityIndex||Returns the text marker priority index, with the highest value getting the topmost placement.|
|GetTipText||Returns the text to display in a tip for the marker type.|
|GetType||Returns a text marker type.|
|GetVisualStyle||Returns the visual style of a marker type.|
|Invalidate||Prevents a text marker from appearing in the user interface.|
|SetBehavior||Sets the behavior of a text marker.|
|SetType||Sets a text marker type.|
|SetVisualStyle||Sets the visual style of a marker type.|
|UnadviseClient||Unadvises 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 :
Implement IVsTextMarkerClient. If you provide an IVsTextMarkerClient when you create the text marker using CreateLineMarker or CreateStreamMarker then the environment will call you with a pointer to IVsTextMarker whenever you need to provide a custom context menu, tip text, or need to change the appearance or behavior of a text marker that has moved.
Save the pointer. If you are only creating one or two specific markers, you can save the pointer to each of these markers for later use.
Call Query Interface from IVsTextLineMarker to obtain a pointer to IVsTextMarker.
See illustrations of the calling of this interface in the sample Figures Language Service.Notes to Callers
Call when you need to track positional and edit information in the text buffer.