The CAPI tries to display a popup menu for a pane when the
gesture is entered by the user (mouse-right-click or
on Microsoft Windows, GTK+ or Motif, control-click on Cocoa). See below for the special case of
It first tries to get a menu for the pane. There are two mechanisms by which it can get a menu: which is tried depends on the value of pane-menu .
:defaultin the call to
make-instance, then its value is used. If the value is a function or a fbound symbol, it is called with four arguments: the pane, data (this is the selected object if there is a selection), x, y. It should return a menu. If it is not a function or a fbound symbol, it should be a menu, which is used directly. The
:pane-menumechanism is useful when the menu needs to be dependent on the location of the mouse inside the pane, or when each pane requires a unique menu. In other cases, the other mechanism is more useful.
:default(this the default value), CAPI calls the generic function
make-pane-popup-menuwith two arguments: the pane and its interface. The result should be a menu.
If the chosen mechanism does not produce a menu, the CAPI does not do anything in response to
The system definition of
with the pane and the interface, and if this returns non-nil list, it calls
to make the menu. You can define
methods that specialize on your pane or interface classes, but in most cases it is more useful to add methods to
is used to generate the menu, and it makes the menu such that by default all setup callbacks are done on the pane itself, rather than on the interface.
is useful when the application needs a menu with the same items as the items on the popup menu, typically to add it to the menu bar.
, you control the input behavior using the
. By default, the system assigns
) to a callback that raises a menu as described above, but your code can override this in the
CAPI User Guide (Macintosh version) - 30 Aug 2011