CodeWindowManager CodeWindowManager CodeWindowManager CodeWindowManager CodeWindowManager Class

Definition

Important

This API is not CLS-compliant.

Wraps an IVsCodeWindow object for use in a language service.

public ref class CodeWindowManager : Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindowManager
[Windows::Foundation::Metadata::WebHostHidden]
class CodeWindowManager : Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindowManager
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
public class CodeWindowManager : Microsoft.VisualStudio.TextManager.Interop.IVsCodeWindowManager
type CodeWindowManager = class
    interface IVsCodeWindowManager
Public Class CodeWindowManager
Implements IVsCodeWindowManager
Inheritance
CodeWindowManagerCodeWindowManagerCodeWindowManagerCodeWindowManagerCodeWindowManager
Attributes
Implements

Remarks

This class provides a default implementation of the VSIP interface, IVsCodeWindowManager and manages the LanguageService, Source, ViewFilter, and DocumentProperties objects associated with the given IVsCodeWindow.

This class calls CreateViewFilter on your LanguageService for each new IVsTextView created by Visual Studio and installs the resulting filter into the command chain. You do not have to override CreateViewFilter, since a default view filter will be created.

If your LanguageService returns an object from CreateDocumentProperties then you will have properties in the Properties window associated with your source files.

This class also provides support for optional drop-down combo boxes (also known as drop-down bars), as represented by the IVsDropdownBar interface, for listing types and members by installing the TypeAndMemberDropdownBars object returned from your CreateDropDownHelper method. If you do not implement CreateDropDownHelper, no drop down-bars are established.

Notes to Inheritors

If you need to add any user interface (UI) features to the view window, you can derive a class from the CodeWindowManager class and override the methods AddAdornments() and RemoveAdornments(); just be sure to call the base class versions of those methods in your implementations. Otherwise, the base class handles all normal chores associated with a language service.

Notes to Callers

The LanguageService class maintains a list of CodeWindowManagers, one instance for each text view or open source file. The only methods called by Visual Studio are AddAdornments() and RemoveAdornments() (these are called directly) and OnSetFocus(IVsTextView) and OnKillFocus(IVsTextView) (these are called indirectly through the ViewFilter class in its implementation of the IVsTextViewEvents interface).

Constructors

CodeWindowManager(LanguageService, IVsCodeWindow, Source) CodeWindowManager(LanguageService, IVsCodeWindow, Source) CodeWindowManager(LanguageService, IVsCodeWindow, Source) CodeWindowManager(LanguageService, IVsCodeWindow, Source) CodeWindowManager(LanguageService, IVsCodeWindow, Source)

Initializes the CodeWindowManager class.

Properties

CodeWindow CodeWindow CodeWindow CodeWindow CodeWindow

Returns the IVsCodeWindow this CodeWindowManager is managing.

DropDownHelper DropDownHelper DropDownHelper DropDownHelper DropDownHelper

Returns the drop-down helper class.

LanguageService LanguageService LanguageService LanguageService LanguageService

Returns the language service that owns this code window manager.

Properties Properties Properties Properties Properties

Allows retrieving and updating the document properties.

Source Source Source Source Source

Returns the Source object associated with the view managed by this code window manager class.

Methods

AddAdornments() AddAdornments() AddAdornments() AddAdornments() AddAdornments()

Called to add adornments or additional user interface (UI) elements to the text view.

Close() Close() Close() Close() Close()

Close down the CodeWindowManager object.

Finalize() Finalize() Finalize() Finalize() Finalize()

The destructor for the CodeWindowManager class.

GetFilter(IVsTextView) GetFilter(IVsTextView) GetFilter(IVsTextView) GetFilter(IVsTextView) GetFilter(IVsTextView)

Returns the ViewFilter object associated with the specified text view.

OnKillFocus(IVsTextView) OnKillFocus(IVsTextView) OnKillFocus(IVsTextView) OnKillFocus(IVsTextView) OnKillFocus(IVsTextView)

Called when the specified text view loses focus.

OnNewView(IVsTextView) OnNewView(IVsTextView) OnNewView(IVsTextView) OnNewView(IVsTextView) OnNewView(IVsTextView)

Called when a new text view is created.

OnSetFocus(IVsTextView) OnSetFocus(IVsTextView) OnSetFocus(IVsTextView) OnSetFocus(IVsTextView) OnSetFocus(IVsTextView)

Called when the specified text view receives the focus.

RemoveAdornments() RemoveAdornments() RemoveAdornments() RemoveAdornments() RemoveAdornments()

Called to remove any adornments on a text view that is being closed.

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to