Page 230 Table of Contents Index Page 232
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

test-presentation-translator is responsible for matching type parameters and calling the
translator's tester. Under some circumstances, test-presentation-translator may also call
the body of the translator to ensure that its value matches to-type.

=> find-applicable-translators presentation input-context frame window x y &key event modifier-
state for-menu fastp
[Function]
Returns an object that describes the translators that definitely apply to the presentation pre-
sentation
in the input context input-context. The result is a list whose elements are each of the
form
(translator the-presentation context-type tag)
where translator is a presentation translator, the-presentation is the presentation that the trans-
lator applies to (and can be different from presentation due to nesting of presentations), context-
type
is the context type that in which the translator applies, and tag is a tag used internally by
CLIM. translator, the-presentation, and context-type can be passed to such functions as call-
presentation-translator
and document-presentation-translator.

Since input contexts can be nested, find-applicable-translators must iterate over all the
contexts in input-context. window, x, and y are as for test-presentation-translator. event
and modifier-state (which default to nil and the current modifier state for window, respectively)
are used to further restrict the set of applicable translators. (Only one of event or modifier-state
may be supplied; it is unspecified what will happen if both are supplied.)

When for-menu is non-nil, this matches the value of for-menu against the presentation's menu
specification, and returns only those translators that match. event and modifier-state are disre-
garded in this case. for-menu defaults to nil.

When the boolean fastp is true, find-applicable-translators will simply return true if there
are any translators. fastp defaults to false.

When fastp is false, the list of translators returned by find-applicable-translators must be
in order of their "desirability", that is, translators having more specific from-types and/or higher
priorities must precede translators having less specific from-types and lower priorities.

The rules used for ordering the translators returned by find-applicable-translators are as
follows (in order):
  1. Translators with a higher "high order" priority precede translators with a lower "high
    order" priority. This allows programmers to set the priority of a translator in such a way
    that it always precedes all other translators.

  2. Translators with a more specific "from type" precede translators with a less specific "from
    type".

  3. Translators with a higher "low order" priority precede translators with a lower "low order"
    priority. This allows programmers to break ties between translators that translate from
    the same type.

  4. Translators from the current command table precede translators inherited from superior
    command tables.


Page 230 Table of Contents Index Page 232
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