Using Text Markers with the Legacy API

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Using Text Markers with the Legacy API.

A text marker is a floating range of text in a buffer that can affect the display and behavior of a region of text. Markers include breakpoints, bookmarks, wavy underlines, and read-only regions. Text markers are basically different from syntax coloring. Syntax coloring is a quick way to communicate the language syntax that is associated with a region of text. Syntax coloring is generally requested when Windows repaints the screen, when speed is important. Syntax coloring changes only the color of text. Text markers can change many other text properties. Text markers can "float" and apply special behavior and coloring.

Because of the performance overhead associated with text markers, do not create many markers for your text buffers. Each marker is updated every time that a user edits the buffer contents.

System_CAPS_ICON_note.jpg Note

Users can change the color of a visible marker type but not its shape and style. For more information, see Fonts and Colors, Environment, Options Dialog Box.

TitleDescription
How to: Add Standard Text MarkersDescribes how to add a standard text marker type provided by the Visual Studio core editor to a text view.
How to: Implement Error MarkersDescribes how to implement an instance of the Visual Studio marker that is used to indicate errors by using red wavy underlines.
How to: Create Custom Text MarkersDescribes how to create and add a custom text marker type to a text view.
How to: Use Text MarkersExplains how to add text markers.
Inside the Core EditorDescribes the features of the core editor and provides details about how to customize the core editor.
Editor FeaturesDescribes the features available in the Visual Studio core editor.

IVsPackageDefinedTextMarkerType
Provides a uniform mechanism for obtaining information about a specific text marker type, whether predefined by the editor or registered by a VSPackage.

IVsTextLineMarker
Provides access to and adjusts the position of a text marker in a text buffer by using two-dimensional coordinates.

IVsTextMarker
Provides methods for managing text markers.

IVsTextMarkerClient
Provides callbacks to the Visual Studio IDE and other processes that are used to adjust a text marker.

IVsTextMarkerClientAdvanced
Extends the functionality that is available through the IVsTextMarkerClient interface by providing additional callbacks.

IVsTextMarkerClientEx
Extends the functionality that is available through the IVsTextMarkerClient interface by providing additional callbacks.

IVsTextMarkerColorSet
Enables a marker type to determine whether other marker types share the same set of colors.

IVsTextMarkerContextProvider
Provides context for text markers in the core editor. For each text marker type that is in the core editor, the IDE creates a separate IVsTextMarkerContextProvider object.

IVsTextMarkerGlyphDropHandler
A handler that is provided for markers whose glyphs support drag-and-drop editing. A glyph is an icon that indicates the position of a marker.

IVsTextMarkerTypeProvider
Returns an IVsPackageDefinedTextMarkerType interface from a service that provides a text markers to other VSPackages.

IVsTextStreamMarker
Provides access to and adjusts the position of a text marker in a text buffer by using one-dimensional coordinates. If it is possible, do not use this interface.

Show: