NextPrevUpTopContentsIndex

11.8 Command-Related Presentation Types

CLIM provides several presentation types pertaining to commands:

command 

Arguments: &key command-table

Summary: The presentation type used to represent a command and its arguments; the command must be accessible in command-table and enabled in *application-frame* . command-table is a command table designator. If command-table is not supplied, it defaults to the command table for the current application frame.

The object returned by the accept presentation method for command must be a command object, that is, a cons of the command name and the list of the command's arguments.

The accept presentation method for the command type must call the command parser stored in *command-parser* to read the command. The parser will recursively call accept to read a command-name and all of the command's arguments. The parsers themselves must be implemented by accepting objects whose presentation type is command .

If the command parser returns a partial command, the accept presentation method for the command type must call the partial command parser stored in *partial-command-parser* .

The present presentation method for the command type must call the command unparser stored in *command-unparser* .

If a presentation history is maintained for the command presentation type, it should be maintained separately for each instance of an application frame.

command-name 

Arguments: &key command-table

Summary: The presentation type used to represent the name of a command that is both accessible in the command table command-table and enabled in *application-frame* . command-table is a command table designator. If command-table is not supplied, it defaults to the command table for the current application frame, (frame-command-table *application-frame*) .

The textual representation of a command-name object is the command-line name of the command, while the internal representation is the command name.

command-or-form 

Arguments: &key command-table

Summary: The presentation type used to represent an object that is either a Lisp form or a command and its arguments. The command must be accessible in command-table and enabled in *application-frame* . command-table is a command table designator. If command-table is not supplied, it defaults to the command table for the current application frame, (frame-command-table *application-frame*) .

The accept presentation method for this type reads a Lisp form, except that if the first character in the user's input is one of the characters in *command-dispatchers* , it will read a command. The two returned values from the accept presentation method will be the command or form object and a presentation type specifier that is either command or form .

A presentation history is maintained separately for the command-or-form presentation type for each instance of an application frame.

*command-dispatchers* 

Summary: This is a list of the characters that indicates that CLIM reads a command when it is accepting a command-or-form . The standard set of command argument delimiters includes the colon character, #\: .


Common Lisp Interface Manager 2.0 User's Guide - 27 Feb 2008

NextPrevUpTopContentsIndex