Condividi tramite


IVsCodeWindow Interface

Definition

Represents a multiple-document interface (MDI) child that contains one or more code views.

public interface class IVsCodeWindow
public interface class IVsCodeWindow
__interface IVsCodeWindow
[System.Runtime.InteropServices.Guid("8560CECD-DFAC-4F7B-9D2A-E6D9810F3443")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsCodeWindow
[System.Runtime.InteropServices.Guid("8560CECD-DFAC-4F7B-9D2A-E6D9810F3443")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsCodeWindow
[<System.Runtime.InteropServices.Guid("8560CECD-DFAC-4F7B-9D2A-E6D9810F3443")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsCodeWindow = interface
[<System.Runtime.InteropServices.Guid("8560CECD-DFAC-4F7B-9D2A-E6D9810F3443")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsCodeWindow = interface
Public Interface IVsCodeWindow
Derived
Attributes

Remarks

The code window hosts the views for a text buffer and provides the ability to split views. A code window is a frame window that can enclose one or more views. In MDI mode, the code window is the MDI child frame. Each language service can provide its own code window manager, which allows it to add special adornments, such as a drop-down bar, to the code window.

Notes to Implementers

The environment implements a default configuration of this interface. This implementation is typically used to support an editor, such as the core editor, by using IVsTextView to display source.

Any non-core editors or designers that support a LOGVIEWID_TextView logical view must implement IVsCodeWindow on their document view to support IDE Findand Navigate operations.

Notes to Callers

Call IVsCodeWindow to access the views associated with the code window.

An interface to the default code window implementation can be obtained by calling CreateInstance(Guid, Object, Guid, UInt32, IntPtr), with a class ID of CLSID_VsCodeWindow and an interface ID of IID_IVsCodeWindow. The interface is typically exposed through an instance of the core editor.

Applications that do not use the core editor, but need a code window must implement it on a document view object.

Support of IDE find operations requires full implementation of GetLastActiveView(IVsTextView),GetPrimaryView(IVsTextView), and GetBuffer(IVsTextLines).

An example of how to apply an IVsCodeWindow interface to either a default or to a non-standard implementation of a code window can be found in the discussion Single and Multi-tab Views.

A given code window is always owned by one language service. When the code window is created, the language service is allowed to attach an IVsCodeWindowManager instance to the code window. At the appropriate time during initialization, the code window calls AddAdornments(), at which time the language service can add a drop-down bar or other widgets.

Only one text buffer can exist per code window.

Methods

Close()

Closes the code window.

GetBuffer(IVsTextLines)

Returns the buffer used by all views in the code window.

GetEditorCaption(READONLYSTATUS, String)

Returns the editor caption to which editors can append custom text.

GetLastActiveView(IVsTextView)

Returns the last active view of the code window.

GetPrimaryView(IVsTextView)

Returns the top (or primary) view of a split code window.

GetSecondaryView(IVsTextView)

Returns the bottom (or secondary) view of a split code window.

GetViewClassID(Guid)

Returns the text view class to change or query.

SetBaseEditorCaption(String[])

Appends custom text to the editor caption

SetBuffer(IVsTextLines)

Sets the text buffer for all views in the code window.

SetViewClassID(Guid)

Sets the text view class to change or query.

Applies to