CLIM mail archive
[Prev][Next][Index][Thread]
Presn Questions
Date: Thu, 2 Jul 1992 03:23+0100
From: Rahul Bhatt <unido!quasimodo.intel.com!rbhatt>
Hi!
<Env: CLIM version 27 on SMBX x400, Genera 8.1>
I am creating about 1600 rectangular presentation items
(all uniform) on the screen to represent certain objects.
The user may request changing the size of the objects (all
objects simulataneously), in which case I have to erase the
previous presentations (window-clear) redraw the new
presentations. WHICH TAKES A WHILE. Furthermore, this is annoying
especially so because there is other non-presentation graphics in
the window (which is easy to draw but no-good aesthetically).
Q1: Is there an easy way to change the shape of a
presentation? CLIM manual says not to mess with size/shape of
presentations.
To my knowledge, there is NO way to change a presentation at all,
once it is created, using documented CLIM functions.
What you've got to do is to erase presentations with the
function CLIM:ERASE-OUTPUT-RECORD (note that presentations are
output records) and represent your objects using CLIM:PRESENT
again with the new (rectangle) size.
These presentations are also "flipped" (like in a bitmap
editor) and when refreshing the window, it replays all
the previous output. I tried not recording, (using
with-output-recording-options with :record-p nil) and
that had its problems when scrolling the window and such (I don't
remeber exactly since I had tried this a while ago but I
can reproduce and explain it if its necessary).
Q2: Is there a way to not replay output.
I guess the solution I am looking for is to draw these
presentations in the background (in a process maybe) and
write to an output record. Then replay the output record on my
window. This way, I have the output record I want. But
it still takes a long time to draw these presentations.
Ideally, I should just change the size of each and be done with
it. (That way, I also retain those that are selected.)
Your problem is (probably) that you don't erase old presentations,
either "highlighted" or "non-highlighted". Replaying the window's
history then results in replaying all flippings, which looks
quite funny. Solution: Erase old, overwritten presentations.
You can store them e.g. in a hash table, mapped on
your application objects.
Finally, the same program goes into a phase where the
presentations are not mouse sensitive. Currently they
are drawn inside a with output as presentation and used via
a presentation to command traslator.
Q3: Is there a way to remove (and add) a translator at
run time (is this recommended by CLIM?).
Why don't you use the :TESTER option to CLIM:DEFINE-PRESENTATION-
TO-COMMAND-TRANSLATOR? You can test e.g. a special, boolean variable.
Look up the doc for more info on testers.
I am writing portable code and dont want to mess with
low level stuff. If something is inthe"standard" (or not
recommended) than I want to stay away from it for fear
it wont be supported on all CLIMs. Should I be so (overly)
cautious?
We at Symbolics Systemhaus GmbH are writing large applications
using CLIM. The portion of non-documented CLIM functions is quite near 0.
like 0+.
Markus Fischer, MF@SGER.UUCP Mergenthaler Allee 77-81
Consulting Services W-6236 Eschborn, Germany
Symbolics Systemhaus GmbH Phone: +49 6196 47220, Fax 481116
References:
Main Index |
Thread Index