[plt-scheme] MrEd: capture-mouse method

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Apr 15 19:19:31 EDT 2007

Also, just in case it wasn't clear, if someone clicks the mouse and
moves it, your window gets all the events until they release the
mouse.

Robby

On 4/15/07, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sun, 15 Apr 2007 15:25:02 +0200, "Cyprien Nicolas" wrote:
> > I'am looking for a mean to capture and release mouse within a canvas%
> > object.
> > After looking at the doc, I saw that the mouse is captured when a button is
> > pressed, but I cant find a way to capture it manualy.
>
> There's currently no way to grab the mouse in the X11 sense, where all
> mouse events are redirected to the capturing window (even when the
> mouse is over a different application's Windows).
>
> You can, however, override a frame%'s `on-subwindow-event' to redirect
> all mouse events for a frame. By overriding `on-subwindow-event' for
> all windows in your application, you can implement Windows-style mouse
> capture (as I understand it); if the mouse moves outside of your
> application's frame without a button press, the events will still be
> delivered elsewhere.
>
> Matthew
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.