Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## default-menu-on-click

Arguments: menu menu-item window-or-screen

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.)

When the menu is a `shortcut-menu`, the default on-click function is still default-menu-on-click, but a different method of this generic function is used. This method expects the menu-item's value to be one of the following things:

- A symbol naming a function, or a function object. In this case, the function will be called, passing window-or-screen as the only argument. (When the `shortcut-menu` is invoked by pop-up-shortcut-menu, as usual, window-or-screen will be the window that was passed to pop-up-shortcut-menu).
- A window. In this case, the window is selected by calling select-window.

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

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

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

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version