CLIM mail archive

[Prev][Next][Index][Thread]

Questions on Pixmaps & Output Recordin



I'm working in Genera 8.3 on Symbolics, CLIM 2.0

I would like to be able to have an output record that displays a fancy pixmap. 
On my 1st attempt to do this I thick-headedly wrote:

  (with-output-to-output-record (...)
	(copy-from-pixmap ...))

This just produces an empty record of 0 area. I later noticed that the manual 
explicitly states (as Scott McKay would say) that pixmaps cannot be captured by output 
recording. This seems to be a rather severe limitation on the usefulness of pixmaps.
I decided to improvise my own solution, based on defining a
Standard-Sequence-Output-Record subclass, "Pixmap-Record", with a slot called "pixmap", 
and a Replay-Output-Record :AFTER method that simply copies the pixmap in the pixmpa slot 
to the window every time it is called. This worked to a limited extent. However, I found 
that the stream-replay method does not really replay all output records in the window, so
any time a function calls stream-replay or window-refresh,
or any time the user does a <function> <refresh>, the pixmaps disappear.

To get around this, I then wrote an :AFTER method on stream-replay that walks down 
the output history tree of an application pane calling Replay on output records. 
Since not all of my application panes will display pixmaps, I defined a subclass of 
CLIM:Application-Pane called "Pane-with-Pixmap-Records," as the method specializer so that
this class is only kind of pane that will incur the overhead of replaying each output record.
I also intend to define a subclass of CLIM:Standard-Presentation, say 
"Presentation-With-Pixmap-Records", to further restrict the tree walks to only those
presentation that are known to have Pixmap-Records. 

This appoach works, although there is still one hitch: the instances of 
Pane-with-Pixmap-Records created in the application frame definition by calling 
make-pane will not take the :SCROLL-BARS argument. Apparently, :SCROLL-BARS is not 
actually an CLOS initarg and it is only accepted by the built-in classes of CLIM panes.

Based on all this I have a three questions (in order of increasing generality):
(1) Is there any way to get scroll bars and other pane options for programmer-defined
pane subclasses such as my Pane-with-Pixmap-Records?
(2) Is there a better approach to integrating pixmaps with CLIM's output recording system
than the one I've outlined here?
(3) Are there any plans to extend CLIM to do this integration?

Since I was able to come up with a half-baked integration scheme in a few hours, it seems to 
me that it would be no great undertaking for CLIM's authors to do a fully-baked job and 
that a great many users would want such capabilities. 


		Land Fleming 
	        LESC, Houston

Follow-Ups:

Main Index | Thread Index