Page 274 Table of Contents Index Page 276
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 27. COMMAND PROCESSING

text-style is either a text style spec or nil. It is used to indicate that the command menu item
should be drawn with the supplied text style in command menus.

after must be either :start (meaning to add the new item to the beginning of the menu), :end
or nil (meaning to add the new item to the end of the menu), or a string naming an existing
entry (meaning to add the new item after that entry). If after is :sort, then the item is inserted
in such as way as to maintain the menu in alphabetical order.

If keystroke is supplied, the item will be added to the command table's keystroke accelerator
table. The value of keystroke must be a keyboard gesture name. This is exactly equivalent to
calling add-keystroke-to-command-table with the arguments command-table, keystroke, type
and value. When keystroke is supplied and type is :command or :function, typing a key on the
keyboard that matches to the keystroke accelerator gesture will invoke the command specified by
value. When type is :menu, the command will continue to be read from the sub-menu indicated
by value in a window system specific manner.

If the item named by string is already present in the command table's menu and errorp is true,
then the command-already-present error will be signalled. When the item is already present in
the command table's menu and errorp is false, the old item will first be removed from the menu.
Note that the character case of string is ignored when searching the command table's menu.

=> remove-menu-item-from-command-table command-table string &key (errorp t) [Function]
Removes the item named by string from command-table's menu. command-table is a command
table designator
.

If the item is not present in the command table's menu and errorp is true, then the command-
not-present
error will be signalled. Note that the character case of string is ignored when
searching the command table's menu.

=> map-over-command-table-menu-items function command-table [Function]
Applies function to all of the items in command-table's menu. function must be a function of
three arguments, the menu name, the keystroke accelerator gesture (which will be nil if there
is none), and the command menu item; it has dynamic extent. The command menu items are
mapped over in the order specified by add-menu-item-to-command-table. command-table is a
command table designator.

map-over-command-table-menu-items does not descend into sub-menus. If the programmer
requires this behavior, he should examine the type of the command menu item to see if it is
:menu.

=> find-menu-item menu-name command-table &key (errorp t) [Function]
Given a menu name and a command table, returns two values, the command menu item and the
command table in which it was found. (Since menus are not inherited, the second returned value
will always be command-table.) command-table is a command table designator. This function
returns objects that reveal CLIM's internal state; do not modify those objects.

If there is no command menu item corresponding to menu-name present in command-table and


Page 274 Table of Contents Index Page 276
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E