Re: [racket-users] big-bang + right click?
Cool! I was able to get it working with Lux. Thanks! On Saturday, February 17, 2018 at 9:34:19 AM UTC-8, Jay McCarthy wrote: > > FWIW Stephen, I have another package called `lux` that tries to be a > "professional" big-bang and it supports stuff like this. > > The documentation is here: http://docs.racket-lang.org/lux/index.html > > But I suggest checking out the two examples first. > > val-demo --- > https://github.com/jeapostrophe/lux/blob/master/examples/val-demo.rkt > --- Shows how you can use 2htdp/image or pict to make your scenes and > it shows how the generic event-handler receives key events from > racket/gui. > > spin --- https://github.com/jeapostrophe/lux/blob/master/examples/spin.rkt > --- is a little more complicated and shows how you get mouse event > structures as well as demonstrating that lux can be used recursively. > [For comparison, if you call big-bang inside a big-bang handler, then > a new window opens up. In lux, the same window is taken over and the > result from the inner call is returned to the call site. This can be > used to make things like pause screens, menus, and so on fairly > nicely.] > > Jay > > -- > -=[ Jay McCarthy http://jeapostrophe.github.io]=- > -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=- > -=[ Moses 1:33: And worlds without number have I created; ]=- > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] big-bang + right click?
FWIW Stephen, I have another package called `lux` that tries to be a "professional" big-bang and it supports stuff like this. The documentation is here: http://docs.racket-lang.org/lux/index.html But I suggest checking out the two examples first. val-demo --- https://github.com/jeapostrophe/lux/blob/master/examples/val-demo.rkt --- Shows how you can use 2htdp/image or pict to make your scenes and it shows how the generic event-handler receives key events from racket/gui. spin --- https://github.com/jeapostrophe/lux/blob/master/examples/spin.rkt --- is a little more complicated and shows how you get mouse event structures as well as demonstrating that lux can be used recursively. [For comparison, if you call big-bang inside a big-bang handler, then a new window opens up. In lux, the same window is taken over and the result from the inner call is returned to the call site. This can be used to make things like pause screens, menus, and so on fairly nicely.] Jay -- -=[ Jay McCarthy http://jeapostrophe.github.io]=- -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=- -=[ Moses 1:33: And worlds without number have I created; ]=- -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] big-bang + right click?
Okay, cool. Thanks! On Thursday, February 15, 2018 at 4:28:44 PM UTC-8, Matthias Felleisen wrote: > > > No. > > I checked the code and providing the extra information easily would be > backwards incompatible. > I may introduce another mouse handler that also delivers the mouse event > as an fourth argument. > > If you need this today, you will need to use Racket’s GUI toolbox > directly. > > > > On Feb 15, 2018, at 6:54 PM, Stephen Foster> wrote: > > Is there a way to differentiate between left and right click with a > big-bang on-mouse handler? Or if not, is there some workaround I can use > to detect right clicks? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users...@googlegroups.com . > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] big-bang + right click?
Is there a way to differentiate between left and right click with a big-bang on-mouse handler? Or if not, is there some workaround I can use to detect right clicks? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.