[plt-scheme] MrEd: capture-mouse method
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