default-menu-on-click

Generic Function

Package: common-graphics

Arguments: menu menu-item stream

The symbol default-menu-on-click is the default value of the on-click event-handling property of a menu.

The default default-menu-on-click method simply returns the value of the chosen menu-item. Therefore, when pop-up-menu is called on a menu that uses this default on-click handler, the value of the chosen menu item is simply returned from pop-up-menu, and the calling function must decide what to do with the value. (Alternate on-click handlers, such as the built-in function funcall-menu-item, can be used instead to process any chosen item in some standard way before pop-up-menu returns. In fact, this must be done for pull-down menus, since they do not return values to the application.)

The default-menu-on-click method for shortcut-menu checks to see if the menu-item's value is a symbol that names a function, and if so calls the function, passing a single argument which is the window of the shortcut-menu, and returns the result of that funcall. (The window of a shortcut-menu may arbitrarily be set or retrieved using the window accessor.) Otherwise, if the menu-item's value is a window, it calls select-window on that window, and returns the window.

Otherwise, the menu-item's value is simply returned.

menu is the menu that contains the chosen menu-item.

menu-item is the menu-item that was chosen.

stream is either the window on which the menu was invoked with pop-up-menu, or else the window on which the menu was defined.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.