Compartir a través de


TypeAndMemberDropdownBars Class

Provides support for the combo boxes showing type and member information as offered by a language service.

This API is not CLS-compliant. 

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Package.TypeAndMemberDropdownBars

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public MustInherit Class TypeAndMemberDropdownBars _
    Implements IVsDropdownBarClient
[CLSCompliantAttribute(false)]
public abstract class TypeAndMemberDropdownBars : IVsDropdownBarClient
[CLSCompliantAttribute(false)]
public ref class TypeAndMemberDropdownBars abstract : IVsDropdownBarClient
[<AbstractClass>]
[<CLSCompliantAttribute(false)>]
type TypeAndMemberDropdownBars =  
    class 
        interface IVsDropdownBarClient 
    end
public abstract class TypeAndMemberDropdownBars implements IVsDropdownBarClient

The TypeAndMemberDropdownBars type exposes the following members.

Constructors

  Name Description
Protected method TypeAndMemberDropdownBars Initializes a new instance of the TypeAndMemberDropdownBars class.

Top

Methods

  Name Description
Public method Done Cleans up any allocated resources just before the TypeAndMemberDropdownBars object is destroyed.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetComboAttributes Returns information about the specified combo box.
Public method GetComboTipText Returns text to be shown in a tool tip when the cursor is held over the combo box.
Public method GetEntryAttributes Returns the font attributes for the specified entry on the specified combo box.
Public method GetEntryImage Returns the glyph index for the specified entry on the specified combo box.
Public method GetEntryText Returns the text to be displayed for the specified entry in the specified combo box.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetMember Returns the specified entry for the specified combo box.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method OnComboGetFocus Called when a combo box gets the focus.
Public method OnItemChosen Called when an item is chosen from the specified combo box.
Public method OnItemSelected Called when an entry is highlighted in one of the combo boxes.
Public method OnSynchronizeDropdowns Called to fill and synchronize all combo boxes.
Public method SetDropdownBar Called to specify the IVsDropdownBar object that controls the two combo boxes.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

This class is used to manage the combo boxes showing type and member information for a particular source file. These combo boxes appear in a drop-down bar (represented by an IVsDropdownBar interface) at the top of the editor view showing the source file. This class contains all the information required for Visual Studio to show and manage those combo boxes. In addition, this class contains event handlers that are called when the combo boxes are accessed by the user.

SynchronizeDropdowns

SynchronizeDropdowns is a method that is marked as internal and is called from the base CodeWindowManager class. This internal method is given an IVsTextView object when the base AddAdornments method on the CodeWindowManager class is called. The IVsTextView object is used to update the display when an item is chosen in a combo box. The SynchronizeDropdowns method is also called from the base method SynchronizeDropdowns in the LanguageService class.

Notes to Implementers

If you plan to support the type and member combo boxes, you must derive a class from the TypeAndMemberDropdownBars class and return an instance of your class from the CreateDropDownHelper method in your version of the LanguageService class. In addition, you must implement the OnSynchronizeDropdowns method which handles the task of filling the internal lists to be shown in the combo boxes.

Notes to Callers

An instance of your version of a TypeAndMemberDropdownBars object is returned from a call to CreateDropDownHelper in the LanguageService class. If CreateDropDownHelper returns a valid object, Visual Studio creates and manages the combo boxes for you, using information from your version of the TypeAndMemberDropdownBars class.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Package Namespace