Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

menu

Arguments: frame-window

Returns the menu-bar of frame-window. The menu-bar is displayed along the top of the frame-window.

The setf of this function may be called to add a menu-bar to a window. The new value may be a menu-bar that was created by calling open-menu, or nil to remove the window's current menu-bar if there is one. A menu-bar should not exist on more than one window at the same time, though it may be removed from one window and then added to another.

A menu-bar is structured the same way as a pop-up menu, except that each of its menu-items denotes one of the pull-down menus of the menubar, with the title of the menu-item being a pull-down menu title that is displayed along the menu-bar, and the value of the menu-item being a menu containing the pull-down menu's items.

If you use the IDE, you can add a menubar to a form (and thus to the window associated to the form in the application) by clicking on the extended editor button of the menu property of the form. Doing so displays the menu editor.

Common Graphics does not automatically close a menu-bar when it is removed from a window, because in general menus may be reused on the same or other windows or parent menus, and so Common Graphics does not know whether you are done with a menu-bar when you remove it. Any menus that are not closed explicitly by an application are closed automatically when Lisp exits, and so there is ordinarily no need for an application to close its menus. But if so many menus are being created that the operating system runs out of related resources (leading to errors), the application may call close on each menu that will no longer be used. A menu-bar should be removed from its window before calling close on it. Closing a menu does not close its submenus, and so these must be closed individually (either before or after closing the parent menu) to close an entire menu hierarchy.

Limitations of child window menu bars on all platforms:

Menu-bar access keys and keyboard shortcuts will never be routed to a child window, and will go to the menu-bar of the top-level parent (or its owner window) instead, if it has a menu-bar.

Limitations of child window menu bars on MS Windows only


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

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version