Re: System contextual menus
Re: System contextual menus
- Subject: Re: System contextual menus
- From: Eric Schlegel <email@hidden>
- Date: Thu, 31 Jan 2002 07:27:39 -0800
On Thursday, January 31, 2002, at 07:03 AM, Ondra Cada wrote:
RB> it's still the standard. I have published two old-style contextual
menu
RB> plugins and need to support them in my Cocoa applications; there
seems to
RB> be no way to do that.
Now, this is and will ever be utterly impossible!
The thing is that there is *NO* system-level API related to this; there
perhaps is a *FINDER* API which supports that, but that's all.
Actually, that's not true. There is a well-documented interface to the
Contextual Menu modules that is described in HIToolbox/Menus.h. The
Carbon Menu Manager implements code which looks in the standard
locations for Contextual Menu plugins, uses CFPlugin to load them, and
calls the plugin using the documented interface. It would be non-trivial
but certainly possible to do the same in a Cocoa application in order to
get the standard modules to add their commands to a specified NSMenu.
This is not a Finder-specific API.
-eric