Overridden by subclasses to return the default pop-up menu for instances of the receiving class.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
class var defaultMenu: NSMenu? { get }
Discussion
The default implementation returns nil
.
Overridden by subclasses to return the default pop-up menu for instances of the receiving class.
SDK
Framework
class var defaultMenu: NSMenu? { get }
The default implementation returns nil
.
func menu(for: NSEvent) -> NSMenu?
Overridden by subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
func will Open Menu(NSMenu, with: NSEvent)
Called just before a contextual menu for a view is opened on screen.
func did Close Menu(NSMenu, with: NSEvent?)
Called after a contextual menu that was displayed from the receiving view has been closed.