Generic function
Adds a command to the specified command table.
add-command command-table command #key name menu image accelerator mnemonic error? => ()
<command-table>.
type-union(<command>, <function>).
false-or(<string>).
false-or(<menu>).
false-or(<image>).
false-or(<gesture>).
false-or(<gesture>).
<boolean>. Default value: #t.
None
duim-frames
duim-frames
You can supply a keyboard accelerator or a mnemonic using the accelerator and mnemonic arguments respectively.
Adds command to command-table.
The argument name is the command-line name for the command.
#f, the command is not available via command-line interactions.
For the purposes of command-line name lookup, the character case of name is ignored.
The argument menu is a menu for command.
#f, command is not available via menus.
#t and name is a string, then name is used as the menu name.
#t and name is not a string, a menu name is automatically generated.
(string, menu-options), string is the menu name and menu-options consists of a list of keyword-value pairs. Each keyword-value pair is itself a list. The valid keywords are after:, documentation:, and text-style:, which are interpreted as for add-command-table-menu-item.
You can supply an image that will appear on the menu next to the command name using the image argument. When supplying an image, bear in mind the size of the menu: you should only supply a small icon-sized image for a menu command. There may also be other interface guidelines that you wish to follow when using images in menu items.
The value for accelerator is either keyboard gesture or #f. When it is a gesture, this gesture represents the keystroke accelerator for the command; otherwise the command is not available via keystroke accelerators. Similarly, if mnemonic is supplied, this gesture is used as a mnemonic for the command.
If command is already present in the command table and error? is #t, an error is signalled. When command is already present in the command table and error? is #f}, then the old command-line name, menu, and keystroke accelerator are removed from the command table before creating the new one.