Allows delegate to control the context menu returned by the text view.
Original signature is '- (NSMenu *)textView:(NSTextView *)view menu:(NSMenu *)menu forEvent:(NSEvent *)event atIndex:(NSUInteger)charIndex'
Available in Mac OS X v10.5 and later.

C# | Visual Basic | Visual C++ |
public delegate NSMenu TextViewMenuForEventAtIndexEventHandler( NSTextView view, NSMenu menu, NSEvent event, NSUInteger charIndex )
Public Delegate Function TextViewMenuForEventAtIndexEventHandler ( _ view As NSTextView, _ menu As NSMenu, _ event As NSEvent, _ charIndex As NSUInteger _ ) As NSMenu
public delegate NSMenu^ TextViewMenuForEventAtIndexEventHandler( NSTextView^ view, NSMenu^ menu, NSEvent^ event, NSUInteger charIndex )

- view (NSTextView)
- The text view sending the message.
- menu (NSMenu)
- The proposed contextual menu.
- event (NSEvent)
- The mouse-down event that initiated the contextual menu’s display.
- charIndex (NSUInteger)
- The character position where the mouse button was clicked.

A menu to use as the contextual menu. You can return menu unaltered, or you can return a customized menu.

- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)