CLIM mail archive
[Prev][Next][Index][Thread]
RE: presentation type question
Date: Fri, 21 Jun 1991 10:37 EDT
From: Jeff Morrill <jmorrill@BBN.COM>
I have a situation in which I present a lot of objects to a CLIM pane as one
presentation-type. It's likely that there will be more that one of these frames
enabled at one time, all of which use the same presentation-type. Inside a
command, I use ACCEPT to have the user select one of the items. How can I cause
only the objects in a specified frame to be mouse-sensitive? (i.e. I don't want
objects of the same presentation-type in any other frame to highlight when the
mouse pointer is over it.)
Second, you can set up a second presentation-type that acts as a "filter".
Suppose you only wanted STRINGs from a certain window. Then you may define
a presentation translator to go from STRING to WINDOW-STRING as follows:
(defvar *currently-interesting-window* (some-window))
(define-presentation-translator string-to-window-string
(string window-string
:gesture :left
:tester ((window) (eq *currently-interesting-window* window)))
(object)
object)
This is obviously DW code, but the general idea is the right one. If
you are really trying to restrict sensitivity on a per-frame basis,
using a tester is a good way to do it.
(accept 'frame-string)
If the tester returns T, then the presentation is acceptable, else it is
not acceptable.
0,,
References:
Main Index |
Thread Index