add-to-menu

Generic Function

Package: common-graphics

Arguments: menu menu-item &key position after (at-end t)

Adds menu-item to menu at a specified position among the current menu-items or after a menu-item given as the value if after. at-end is obsolete (use :position :end).

Returns the menu-item that was passed in after adding it to menu.

The arguments are:

The position of the menu-item is determined by the after argument if it specifies a menu-item that is present in menu, and otherwise by the position argument. Note that a menu-item should only be added to one menu. If a similar menu-item must appear in more than one menu, create copies (by calling (make-instance 'menu-item) with identical arguments or with copy-menu-item) as necessary.

See also open-menu.

Backward compatibility note: All releases after 5.0 replace the at-end argument with the position and after arguments, but at-end will still work for backward compatibility. If at-end is true (and position and after are unspecified), then the menu-item is placed at the bottom of the menu, and otherwise at the top. at-end should not be specified simultaneously with either position or after; an error will be signaled if this is done.

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.