CLIM mail archive
[Prev][Next][Index][Thread]
Highlighting
Date: Thu, 5 Nov 1992 18:25 EST
From: Randy Coulman <coulman@skdad.usask.ca>
[ CLIM 1.1; Allegro CL 4.1; Sun Sparc 1+]
Has anyone done anything interesting with highlighting presentations? I did
see a message from SWM 1.5-2 months ago which used define-presentation-method
on highlight-presentation (which I don't see documented anywhere) which
basically inverse-video's the presentation (assuming a rectangular output
record).
I have a presentation type that appears as text which may be broken across
lines. I would like only the text that belongs to the presentation to be
highlighted, not the entire bounding box. Has anybody done something like
this? Actually, the default stuff doesn't work properly. For example,
this is how the following is highlighted:
+-----------------------------+
|Here is some text. Only this|
|sentence is part of the prese|ntation.
+-----------------------------+
My two main problems with this are 1) the obvious visual ugliness, and 2)
If any part of the "Here is some text." is an applicable presentation, it
is "covered up" by the other presentation (although it just occurred to me
that I can use :single-box :highlighting when I present things to "uncover"
the other presentations. I haven't tested it, but it should work.
What I want is this:
+---------+
Here is some text. |Only this|
+--------------------+ +------+
|sentence is part of the presentation.|
+-------------------------------------+
This is exactly the highlighting I get in CLIM 2.0. I could have
sworn that this did the right thing in CLIM 1.1, too, but if you say
it doesn't work I certainly believe you. Here is the code I used to
test this:
(defun foo (&optional (stream *standard-output*))
(fresh-line stream)
(write-string "Here is some text. " stream)
(with-output-as-presentation (stream 'stuff 'expression)
(write-string "Only this" stream)
(terpri stream)
(write-string "sentence is part of the presentation." stream))
(terpri stream))
Has anybody done anything like this? If not, does anyone have any ideas
about how to get started? Documentation for the presentation method
highlight-presentation would be a good start. Should I wait for 2.0?
As an aside, what I eventually want to happen is to click on such an
outlined presentation to invoke some command and have the selected
presentation highlight in inverse video and stay highlighted until a
different one is selected. Currently, I do this by using a flag as a
presentation option and printing text in bold when the flag is set. Any
ideas here?
You could use the same presentation option to cause a rectangle to
be drawn using +FLIPPING-INK+ around (each line of) the text. I am
pretty sure that I have seen something like this floating around on
this mailing list, although I don't recall when.
0,,
Follow-Ups:
References:
Main Index |
Thread Index