[Albrecht:] Here's a new idea (untested): we
could first send an FL_SCROLL_GESTURE event and if
this is not handled by any widget, send an
FL_MOUSEWHEEL event. This way "new" programs can
handle the FL_SCROLL_GESTURE event and "old"
programs can still handle FL_MOUSEWHEEL events.
It's similar to FL_KEYBOARD events that are
converted to FL_SHORTCUT (if not handled) and
finally to FL_SHORTCUT with flipped case. Does
that sound sensible?
I hope it will. We have the precedent of FL_KEYBOARD and
FL_SHORTCUT, so I believe it should (a) be doable and
(b) work for users. It's a little overhead to send an
event that nobody uses (if both FL_SCROLL_GESTURE *and*
FL_MOUSEWHEEL are not used). But that's a small price.
Yes, this is tested and works. The overhead is not an
issue, considering the speed of the human motion in relation
to the speed of a modern CPU. I did implement that many moons
ago for a Wacom tablet pen input: at first, it would send a
FL_PEN_DOWN, and if that wasn't handled by any widget, an
FL_PUSH was sent with the same coordinates (followed by
FL_MOVE, FL_RELEASE, vs. FL_PEN_MOVE and FL_PEN_RELEASE).
Hi Matthias,
great to see you "back here" again.
Thanks for your confirmation. Unfortunately I've been too busy
lately to proceed with this on Windows (before I can see how this is
done best cross-platform) but I'll go ahead with this soon.
If you or anybody else have a good idea (and docs and/or code) how
to use multi touch gestures on Linux this would be appreciated as
well.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.