[plt-scheme] on-paint event overriding ?!
At Wed, 27 Nov 2002 23:25:49 -0500, Jean-Daniel Rondeau wrote:
> I am trying to draw some lines on a table (make-table). The fact is
> that when I lose the focus of the window (the table here...) all my
> lines disapear and only the cards (from the "cards.ss" library) are
> left on the table.
I don't think the interface to the library currently lets you add
drawing to the table, but that would be a good addition.
I've added a new kind of region --- a "background region" --- that
doesn't repond to clicks, but that supports a background-painting
callback.
The changed files for plt/collects/games/cards are committed in CVS,
and also here:
http://www.cs.utah.edu/~mflatt/tmp/cards.ss
http://www.cs.utah.edu/~mflatt/tmp/classes.ss
http://www.cs.utah.edu/~mflatt/tmp/region.ss
http://www.cs.utah.edu/~mflatt/tmp/doc.txt
> My question is : How can I "add" my code to the on-paint event for
> the "table". I know that I can override the event. But can I keep the
> default code and add my code to it ?!? How ?!?
Actually, I'm not sure how you'd override event handling in the current
interface. `make-table' gives you an instance without any control over
the instantiated class. In any case, maybe the above change willtake
care of things.
Matthew