Page 221 Table of Contents Index Page 223
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 23. PRESENTATION TYPES

is bound to its presentation type (the second returned value from the translator), and event-var
is bound to the pointer button event that was used. options-var is bound to any options that
a presentation translator might have returned (the third value from the translator), and will be
either nil or a list of keyword-value pairs. object-var, type-var, event-var, and options-var must
all be symbols.

type, stream, and override are evaluated, the others are not.

For example,

 (with-input-context ('pathname)
                     (path)
     (read)
   (pathname
     (format t "~&The pathname ~A was clicked on." path)))

=> accept type &key stream view default default-type provide-default insert-default replace-input
history prompt prompt-mode display-default query-identifier activation-gestures additional-activation-
gestures delimiter-gestures additional-delimiter-gestures
[Function]
Requests input of type type from the stream stream, which defaults to *query-io*. accept
returns two values, the object representing the input and its presentation type. type is a presen-
tation type specifier, and can be an abbreviation. The other arguments and overall behavior of
accept are as for accept-1.

accept must be implemented by first expanding any presentation type abbreviations (type,
default-type, and history), handling the interactions between the default, default type, and pre-
sentation history, prompting the user by calling prompt-for-accept, and then calling stream-
accept
on stream, type, and the remaining keyword arguments.

=> stream-accept stream type &key view default default-type provide-default insert-default replace-
input history prompt prompt-mode display-default query-identifier activation-gestures additional-
activation-gestures delimiter-gestures additional-delimiter-gestures
[Generic Function]
stream-accept is the per-stream implementation of accept, analogous to the relationship be-
tween read-char and stream-read-char. All extended input streams must implement a method
for stream-accept. The default method (on standard-extended-input-stream) simply calls
accept-1.

The arguments and overall behavior of stream-accept are as for accept-1.

Rationale: the reason accept is specified as a three-function "trampoline" is to allow close
tailoring of the behavior of accept. accept itself is the function that should be called by
application programmers. CLIM implementors will specialize stream-accept on a per-stream
basis. (For example, the behavior of accepting-values can be implemented by creating a
special class of stream that turns calls to accept into fields of a dialog.) accept-1 is provided
as a convenient function for the stream-accept methods to call when they require the default


Page 221 Table of Contents Index Page 223
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