INSMenuDelegate
ConfinementRectForMenu(NSMenu, NSScreen)
HasKeyEquivalentForEvent(NSMenu, NSEvent, NSObject, Selector)
MenuDidClose(NSMenu)
MenuItemCount(NSMenu)
MenuWillHighlightItem(NSMenu, NSMenuItem)
MenuWillOpen(NSMenu)
NeedsUpdate(NSMenu)
UpdateItem(NSMenu, NSMenuItem, nint, Boolean)
ConfinementRectForMenu(INSMenuDelegate, NSMenu, NSScreen)
HasKeyEquivalentForEvent(INSMenuDelegate, NSMenu, NSEvent, NSObject, Selector)
MenuDidClose(INSMenuDelegate, NSMenu)
MenuItemCount(INSMenuDelegate, NSMenu)
MenuWillHighlightItem(INSMenuDelegate, NSMenu, NSMenuItem)
MenuWillOpen(INSMenuDelegate, NSMenu)
NeedsUpdate(INSMenuDelegate, NSMenu)
UpdateItem(INSMenuDelegate, NSMenu, NSMenuItem, nint, Boolean)
net10.0-macos14.2
namespace AppKit
{
[Protocol(Name = "NSMenuDelegate", WrapperType = typeof(NSMenuDelegateWrapper))]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "NeedsUpdate", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(NSMenu) }, Selector = "menuNeedsUpdate:")]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "MenuWillOpen", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(NSMenu) }, Selector = "menuWillOpen:")]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "MenuDidClose", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(NSMenu) }, Selector = "menuDidClose:")]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "MenuWillHighlightItem", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(NSMenu), typeof(NSMenuItem) }, Selector = "menu:willHighlightItem:")]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "MenuItemCount", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(NSMenu) }, ReturnType = typeof(IntPtr), Selector = "numberOfItemsInMenu:")]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "UpdateItem", ParameterByRef = new[] { false, false, false, false }, ParameterType = new[] { typeof(NSMenu), typeof(NSMenuItem), typeof(IntPtr), typeof(bool) }, ReturnType = typeof(bool), Selector = "menu:updateItem:atIndex:shouldCancel:")]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "HasKeyEquivalentForEvent", ParameterByRef = new[] { false, false, false, false }, ParameterType = new[] { typeof(NSMenu), typeof(NSEvent), typeof(NSObject), typeof(Selector) }, ReturnType = typeof(bool), Selector = "menuHasKeyEquivalent:forEvent:target:action:")]
[ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "ConfinementRectForMenu", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(NSMenu), typeof(NSScreen) }, ReturnType = typeof(CGRect), Selector = "confinementRectForMenu:onScreen:")]
[SupportedOSPlatform("macos")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("maccatalyst")]
public interface INSMenuDelegate : INativeObject, IDisposable
{
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[Export("numberOfItemsInMenu:")]
[OptionalMember]
virtual IntPtr MenuItemCount(NSMenu! menu);
}
}
| .NET | 10.0 |
|---|---|
Information specific to net10.0 | |
| Platforms | This API is only available when you target a specific platform: |
| macOS | 10.1410.1510.1611.011.111.211.312.012.112.313.013.113.314.014.2 |
Information specific to net10.0-macos14.2 | |
| Assembly | Microsoft.macOS , Version=15.5.0.0, PublicKeyToken=84e04ff9cfb79065 |
| Referencing | The API is automatically referenced. |
| Preview | The API is contained in a preview framework. |
| Platform Restrictions | This API is only supported on the following platforms:
|
- Built-in API
- Package-provided API