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

a scrolled window class w/offscreen buffering?



I am looking for a window class which provides both scrollbars
(as in examples:scrolling-windows.lisp) and offscreen buffering.

My application does some lengthy drawing to a view, and it's possible
for the drawing to wander offscreen.  I'd like for the drawing to
go simultaneously to the onscreen view, and and offscreen gworld.
Then 'view-draw-contents' would simply copybits from the offscreen
to the onscreen window.

My application is inspired by 'The Algorithmic Beauty of Plants' --
sometimes the figures take a long time to draw, and sometimes it's
nice to see the figures as they 'grow' on screen.  So I'd like to have
each drawing command (mostly #_LineTo's) draw onscreen, so they
can be watched, and also drawn offscreen, for backup.

Another feature of the drawing is that sometimes the figure 'wanders'
offscreen:  a given algorithm may produce a figure that careens off
in an unexpected direction, beyond the limits of the current window.
I'd like it if the whole figure is drawn to a very large offscreen 
buffer, with scrollbars (or zooming) to display it onscreen.

I have been looking at examples:scrolling-windows.lisp, and a
gworld mixin from a helpful posting in this newsgroup last year
(from Laura, I believe).  A few things come to mind:

   1. it would be a lot of work for me to write the class I need,
      relative novice that I am
   2. I'd rather spend my time on the plant algorithms...
   3.  someone else may have written the class already

In the hopes that number 3 might be true, I turn to the readers
of this newsgroup.  Any advice?

Thanks.

 - Paul Shannon
   pshannon@nrao.edu
   National Radio Astronomy Observatory
   Charlottesville, Virginia