The following sections document the presentation types supplied by CLIM. Any presentation type with the same name as a Common Lisp type accepts the same parameters as the Common Lisp type (and additional parameters in a few cases). [annotate]
The type that represents "nothing". The single object associated with this type is nil, and its printed representation is "None". [annotate] |
The type that represents true or false. The printed representation is "Yes" or "No", respectively. [annotate] |
The type that represents a symbol. [annotate] |
The type that represents a symbol in the keyword package. It is a subtype of symbol. [annotate] |
The type that represents all the places in a window where there is no presentation that is applicable in the current input context. CLIM provides a single "null presentation" as the object associated with this type. [annotate] |
The null presentation, which occupies all parts of a window in which there are no applicable presentations. This will have a presentation type of blank-area. [annotate] |
The type that represents a general number. It is the supertype of all the number types. [annotate] |
The type that represents a complex number. It is a subtype of number. [annotate] The components of the complex number are of type type, which must be real or a subtype of real. [annotate] Note: Parameter name "type" is unfortunate, because DEFINE-PRESENTATION-METHOD mandates that "All presentation methods except presentation-subtypep have lexical access to the parameters from the presentation type specifier." In other words, this variable shadows the method argument named type in presentation methods. We rename this parameter to PART-TYPE (the symbol is now exported from the CLIM package). [edit]-- DK 2020-07-01 12:01Z |
The type that represents either a ratio, an integer, or a floating point number between low and high. low and high can be inclusive or exclusive, as in Common Lisp type specifiers. Options to this type are base (default 10) and radix (default nil). real is a subtype of number. [annotate] |
The type that represents either a ratio or an integer between low and high. Options to this type are base and radix. rational is a subtype of real. [annotate] |
The type that represents an integer between low and high. Options to this type are base and radix. integer is a subtype of rational. [annotate] |
The type that represents a ratio between low and high. Options to this type are base and radix. ratio is a subtype of rational. [annotate] |
The type that represents a floating point number between low and high. float is a subtype of number. [annotate] |
The type that represents a character object. [annotate] |
The type that represents a string. If length is supplied, the string must contain exactly that many characters. [annotate] |
The type that represents a pathname. The options are default-version, which defaults to :newest, default-type, which defaults to nil, and merge-default, which defaults to true. If merge-default is false, accept returns the exact pathname that was entered, otherwise accept merges against the default and default-version. If no default is supplied, it defaults to *default-pathname-defaults*. The pathname type should have a default preprocessor that merges the options into the default. [annotate] Note: DEFAULT-TYPE coincides with the ACCEPT keyword argument (and shadows it). We don't change its name, because this may be easily fixed in the method lambda list, i.e ((:default-type accept-default-type) type) [edit]-- DK 2020-07-01 12:00Z |
The type that selects one from a finite set of possibilities, with "completion" of partial inputs. The member types below, token-or-type, and null-or-type are implemented in terms of the completion type. [annotate] sequence is a list or vector whose elements are the possibilities. Each possibility has a printed representation, called its name, and an internal representation, called its value. accept reads a name and returns a value. present is given a value and outputs a name. [annotate] test is a function that compares two values for equality. The default is eql. [annotate] value-key is a function that returns a value given an element of sequence. The default is identity. [annotate] The following presentation type options are available: [annotate] name-key is a function that returns a name, as a string, given an element of sequence. The default is a function that behaves as follows:
documentation-key is a function that returns either nil or a descriptive string, given an element of sequence. The default always returns nil. [annotate] test, value-key, name-key, and documentation-key must have indefinite extent. [annotate] partial-completers is a possibly-empty list of characters that delimit portions of a name that can be completed separately. The default is a list of one character, [← 23.8.5 "One-of" and "Some-of" Presentation Types, subset-sequence] [← 23.8.5 "One-of" and "Some-of" Presentation Types, subset] [← 23.8.5 "One-of" and "Some-of" Presentation Types, subset-completion] [← 23.8.5 "One-of" and "Some-of" Presentation Types, member-alist] [← 23.8.5 "One-of" and "Some-of" Presentation Types, member-sequence] [← 23.8.5 "One-of" and "Some-of" Presentation Types, member] |
The type that specifies one of elements. The options are the same as for completion. [annotate] |
Like member, except that the set of possibilities is the sequence sequence. The parameter test and the options are the same as for completion. [annotate] |
Like member, except that the set of possibilities is the alist alist. Each element of alist is either an atom as in member-sequence or a list whose car is the name of that possibility and whose cdr is one of the following: [annotate]
The test parameter and the options are the same as for completion except that value-key and documentation-key default to functions that support the specified alist format. [annotate] |
The type that selects one or more from a finite set of possibilities, with "completion" of partial inputs. The parameters and options are the same as for completion, plus the additional options separator and echo-space, which are as for the sequence type. The subset types below are implemented in terms of the subset-completion type. [annotate] |
The type that specifies a subset of elements. Values of this type are lists of zero or more values chosen from the possibilities in elements. The printed representation is the names of the elements separated by commas. The options are the same as for completion. [annotate] |
Like subset, except that the set of possibilities is the sequence sequence. The parameter test and the options are the same as for completion. [annotate] |
Like subset, except that the set of possibilities, the parameters, and the options are as for member-alist. [annotate] |
The type that represents a sequence of elements of type type. type can be a presentation type abbreviation. The printed representation of a sequence type is the elements separated by commas. It is unspecified whether accept returns a list or a vector. [annotate] Note: Parameter name "type" is unfortunate, because DEFINE-PRESENTATION-METHOD mandates that "All presentation methods except presentation-subtypep have lexical access to the parameters from the presentation type specifier.". In other words, this variable shadows the method argument named type in presentation methods. We rename it after CLIM-TOS to ELEMENT-TYPE. [edit]-- DK 2020-07-01 11:58Z The options to this type are separator and echo-space. separator is used to specify a character that will act as the separator between elements of the sequence; the default is the comma character |
sequence-enumerated is like sequence, except that the type of each element in the sequence is individually specified. The elements of types can be presentation type abbreviations. It is unspecified whether accept returns a list or a vector. [annotate] The options to this type are separator and echo-space, which are as for the sequence type. [annotate] |
The type that is used to specify one of several types, for example, (or (member :all :none) integer). The elements of types can be presentation type abbreviations. accept returns one of the possible types as its second value, not the original or presentation type specifier. [annotate] The accept method for or could be implemented by iteratively calling accept on each of the presentation types in types. It would establish a condition handler for parse-error, call accept on one of the types and return the result if no condition was signalled. If a parse-error is signalled, the accept method for or would call accept on the next type. When there are no more types, the accept method for or would itself signal a parse-error. [annotate] |
The type that is used for "multiple inheritance". and is frequently used in conjunction with satisfies, for example, (and integer (satisfies oddp)). The elements of types can be presentation type abbreviations. [annotate] The and type has special syntax that supports the two "predicates", satisfies and not. satisfies and not cannot stand alone as presentation types and cannot be first in types. not can surround either satisfies or a presentation type. [annotate] The first type in types is the type whose methods will be used during calls to accept and present. [annotate] |
A compound type that is used to select one of a set of special tokens, or an object of type type. tokens is anything that can be used as the sequence parameter to member-alist; typically it is a list of symbols. [annotate] |
A compound type that is used to select nil, whose printed representation is the special token "None", or an object of type type. [annotate] |
A compound type that is used to select an object of type type or an arbitrary string, for example, (type-or-string integer). Any input that accept cannot parse as the representation of an object of type type is returned as a string. [annotate] |
The type used to represent any Lisp object. The standard print and read functions produce and accept the textual view of this type. [annotate] If a presentation history is maintained for the expression presentation type, it should be maintained separately for each instance of an application frame. [annotate] |
The type used to represent a Lisp form. This is a subtype of expression and is equivalent except that some presentation translators produce quote forms. [annotate] |