These are some general-purpose functions that operate on CLIM presentation types.
describe-presentation-type[Function]
Arguments: type
&optional
stream plural-count
Summary: Describes the presentation type type on the stream, which defaults to *standard-output* . If stream is nil , a string containing the description is returned. plural-count is either nil (that is, the description should be the singular form of the name), t (meaning that the description should the plural form of the name), or an integer greater than zero (the number of items to be described). The default is 1 .
type can be a presentation type abbreviation.
presentation-type-name [Function]
Summary: Returns the presentation type name of the presentation type specifier type . This function is provided as a convenience. It could be implemented as follows:
(defun presentation-type-name (
type
)
(with-presentation-type-decoded (
name
)
type
name
))
presentation-type-parameters [Function]
Arguments: type-name
&optional
env
Summary: Returns a lambda-list of the parameters specified when the presentation type or presentation type abbreviation whose name is type-name was defined. type-name is a symbol or a class. env is a macro-expansion environment, as in find-class .
presentation-type-options [Function]
Arguments: type-name
&optional
env
Summary: Returns the list of options specified when the presentation type or presentation type abbreviation whose name is type-name was defined. This does not include the standard options unless the presentation-type definition mentioned them explicitly. type-name is a symbol or a class. env is a macro-expansion environment, as in find-class .
presentation-typep[Function]
Summary: Returns t if object is of the type specified by type, otherwise returns nil . type may not be a presentation type abbreviation. This is analogous to the Common Lisp typep function.
with-presentation-type-decoded[Macro]
Arguments: (name-var
&optional
parameters-var options-var) type
&body
body
Summary: The specified variables are bound to the components of the presentation type specifier, the forms in body are executed, and the values of the last form are returned. name-var , if non- nil , is bound to the presentation type name. parameters-var , if non- nil , is bound to a list of the parameters. options-var , if non- nil , is bound to a list of the options. When supplied, name-var , parameters-var , and options-var must be symbols.
The name-var , parameters-var , and options-var arguments are not evaluated. body may have zero or more declarations as its first forms.
with-presentation-type-options[Macro]
Arguments: (type-name type)
&body
body
Summary: Variables with the same name as each option in the definition of the presentation type are bound to the option values in type , if present, or else to the defaults specified in the definition of the presentation type. The forms in body are executed in the scope of these variables and the values of the last form are returned.
The value of the form type must be a presentation type specifier whose name is type-name . The type-name and type arguments are not evaluated. body may have zero or more declarations as its first forms.
with-presentation-type-parameters[Macro]
Arguments: (type-name type)
&body
body
Summary: Variables with the same name as each parameter in the definition of the presentation type are bound to the parameter values in type, if present, or else to the defaults specified in the definition of the presentation type. The forms in body are executed in the scope of these variables and the values of the last form are returned.
The value of the form type must be a presentation type specifier whose name is type-name . The type-name and type arguments are not evaluated. body may have zero or more declarations as its first forms.
presentation-type-specifier-p [Function]
Summary: Returns t if object is a valid presentation type specifier; otherwise, it returns nil .
presentation-type-of [Function]
Summary: Returns a presentation type of which object is a member, in particular the most specific presentation type that can be conveniently computed and is likely to be useful to the programmer. This is often the class name of the class of the object.
presentation-type-of returns an expression when possible and t otherwise.
This is analogous to the Common Lisp type-of function.
presentation-subtypep [Function]
Arguments: type putative-supertype
Summary: Answers the question "is the type specified by the presentation type specifier type a subtype of the type specified by the presentation type specifier putative-supertype ?" presentation-subtypep returns two values, subtypep and known-p . When known-p is t , subtypep can be either t (meaning that type is definitely a subtype of putative-supertype ) or nil (meaning that type is definitely not a subtype of putative-supertype ). When known-p is nil , then subtypep must also be nil ; this means that the answer cannot reliably be determined.
type may not be a presentation type abbreviation.
This is analogous to the Common Lisp subtypep function.
map-over-presentation-type-supertypes [Function]
Summary: Calls the function function on the presentation type specifier type and each of its supertypes. function is called with two arguments, the name of a type and a presentation type specifier for that type with the parameters and options filled in. function has dynamic extent; its two arguments are permitted to have dynamic extent. The traversal of the type lattice is done in the order specified by the CLOS class precedence rules, and visits each type in the lattice exactly once.
presentation-type-direct-supertypes [Function]
Summary: Returns a sequence of the names of all the presentation types that are direct supertypes of the presentation type specifier type , or nil if type has no supertypes. The consequences of modifying the returned sequence are unspecified.
find-presentation-type-class [Function]
Arguments: name
&optional
(errorp
t
) environment
Summary: Returns the class corresponding to the presentation type named name , which must be a symbol or a class object. errorp and environment are as for find-class .
class-presentation-type-name [Function]
Arguments: class
&optional
environment
Summary: Returns the presentation type name corresponding to the class class . This is the inverse of find-presentation-type-class . environment is as for find-class .
default-describe-presentation-type [Function]
Arguments: description stream plural-count
Summary: Performs the default actions for describe-presentation-type , notably pluralization and prepending an indefinite article if appropriate. description is a string or a symbol, typically the :description presentation type option or the :description option to define-presentation-type . plural-count is as for describe-presentation-type .
make-presentation-type-specifier [Function]
Arguments: type-name-and-parameters
&rest
options
Summary: A convenient way to assemble a presentation type specifier with only non-default options included. For a full description of this function, see the end of 7.2.1, Presentation Methods in CLIM
Common Lisp Interface Manager 2.0 User's Guide - 20 Sep 2011