This topic has not yet been rated - Rate this topic

Text Markers in the Editor

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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 only changes the color of text. Text markers additionally change other text properties. Text markers are COM objects that "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.

NoteNote

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

In This Section

How to: Add Standard Text Markers

Describes how to add a standard text marker type provided by the Visual Studio core editor to a text view.

How to: Implement Error Markers

Describes 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 Markers

Describes how to create and add a custom text marker type to a text view.

How to: Use Text Markers

Explains how to add text markers.

Reference

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.

Related Sections

Core Editor

Describes the features of the core editor and provides details about how to customize the core editor.

Editor Features

Describes the features available in the Visual Studio core editor.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.