Compartilhar via


IVsMenuEditor Interface

Exposes the shared menu editor to form designers. You can get an instance of the interface from the IVsMenuEditorFactory interface.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
<GuidAttribute("6FBCB271-B391-4F80-B560-45E650DEF0A7")> _
<InterfaceTypeAttribute()> _
Public Interface IVsMenuEditor
[GuidAttribute("6FBCB271-B391-4F80-B560-45E650DEF0A7")]
[InterfaceTypeAttribute()]
public interface IVsMenuEditor
[GuidAttribute(L"6FBCB271-B391-4F80-B560-45E650DEF0A7")]
[InterfaceTypeAttribute()]
public interface class IVsMenuEditor
[<GuidAttribute("6FBCB271-B391-4F80-B560-45E650DEF0A7")>]
[<InterfaceTypeAttribute()>]
type IVsMenuEditor =  interface end
public interface IVsMenuEditor

The IVsMenuEditor type exposes the following members.

Methods

  Name Description
Public method AddMenuItem Adds a new menu item.
Public method DeleteMenuItem Deletes the specified menu item.
Public method Filter Allows the Menu designer to process a few selected messages that are required to correctly position, paint, and activate the menus.
Public method GetHeight Can be used by the site to change the size of the host when the user wants to remove the menu. This allows the site an easy way to determine how much to decrease the size of the host.
Public method GetItemRect Called to obtain the bounding rectangle for a specific menu item (pmi != NULL) or the bounding rectangle for all currently displayed menu windows (pmi == NULL).
Public method GetUIState Returns the current UI state of the Menu Editor, giving the site a mechanism to know if the Menu Editor has any UI operations in progress.
Public method IsActive Indicates whether the shared menu is displayed.
Public method OnChange Must be called by IMenuEditorSite if any property known by IVsMenuEditor changes on any menu item.
Public method SelectionChange Called whenever the selection changes. If pIMI is null, no menu item is selected. If it is not null, it points to the item to be selected. Only one item can be selected at a time from outside MenuDesigner. This method does not set focus to the item; see the SetFocus method for that behavior.
Public method SelectionChangeFocus Same as SelectionChange, except this method also sets focus to the selected item.
Public method TranslateAccelerator Allows the edit control to catch keystrokes just like an ActiveX control.

Top

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace