Generic FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1

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.

In the Windows operating system, menu-bars may be added only to top-level windows that have a title-bar.

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.


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page was not revised from the 6.1 page.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1