Code Windows

A code window is a document window object that supports one or more text views. The exact features of a code window depend on the associated language service. In multiple-document interface (MDI) mode, the code window is the MDI child frame.

Code windows are controlled by language services, and each language service can provide its own code window manager. This enables the language service to add its own special features, known as adornments, to the code window, such as squigglies, colorization, and more. For more information about how to create a core window, see Instantiating the Core Editor.

A code window is an IVsWindowFrame object that has a text view and any adornments sited in the object. When you create the code window during your instantiation of the core editor, the language service can attach an IVsCodeWindowManager interface instance to the code window, as is shown in the following illustration.

Code window

CodeWindow graphic

The language service implements the code window manager and is responsible for managing adornments, such as a drop-down button. The code window in turn calls the AddAdornments method during code window initialization. When this call is made, the language service can add a drop-down bar or a button bar (IVsButtonBarClient) to the code window.

See Also

Concepts

Instantiating the Core Editor

Document Windows Overview

Text View in Visual Studio

Reference

VsCodeWindow

IVsTextView

VsTextBuffer

VsTextView