[plt-scheme] Mouse and Canvas Object

From: The Computer Man (thecomputerman at wanadoo.fr)
Date: Sun Apr 13 03:35:42 EDT 2003

I'm define this for on-paint fonction
(define $bitmap-canvas%
  (class* canvas% ()
    (inherit get-dc)
    (define/override on-paint
      (lambda () (send (get-dc) draw-bitmap $bitmap 0 0)))
    (define/override (on-event e)
        (send e button-down? 'left))

I'm add your define for the event, but i don't understand hom i can use it,
for example i'm click with the left button, how can call the function
(on-event e) ? I'm define (define mouse (make-object mouse-event%
'left-down)) ? I'm not understand how catch and use the mouse event when i'm
use it, the function not run

thanks you by advance for your answers
----- Original Message -----
From: "Katsmall the Wise" <kela_bit at netvision.net.il>
To: "The Computer Man" <thecomputerman at wanadoo.fr>
Cc: <plt-scheme at qua.cs.brown.edu>
Sent: Sunday, April 13, 2003 9:23 AM
Subject: Re: [plt-scheme] Mouse and Canvas Object

> You should use
> (define my-canvas%
>   (class canvas%
>     (define/override (on-event e)
>       ; here you should check what event-type e is, what the buttons
> are, and such...
>       )))
> e is of type mouse-event%.
> Look for it n the Help Desk.
> Good luck!
> Katsmall the Wise
> The Computer Man wrote:
> >  For list-related administrative tasks:
> >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> >Hello,
> >
> >I have a problem with the management of the mouse into object, I would
> >to know if there is a documentation, or if somebody could explain me the
> >operation of the mouse into object, how it is known that there were a
> >clic...?
> >
> >Thank you by advance for your answers
> >
> >
> >
> >

Posted on the users mailing list.