Re: RFC: gestures






On Tue, Mar 4, 2014 at 4:58 AM, Carlos Garnacho <carlosg gnome org> wrote:
he child receives events again.

There could also be more complex cases, canvas-like widgets offering
multiple manipulable elements, depending on the complexity, that might
be be another case where selective event delivery through
gtk_event_controller_handle_event() could be handy.

as a user and now developer of such canvas-like widgets, i just wanted to mention something that has become obvious to me after a decade of canvas-related programming but was probably clear to you a long time ago:

   All button activity should really be considered as a potential drag.

a couple of years ago, one of the (then) active developers of ardour (ardour.org) started abstracting our canvas event handling code, and the key concept was that every gesture was fundamentally a drag. now, admittedly, there are many drags where no actual drag occurs, and we discover that at the end and treat the user interaction as if it was a button press/release.

but the steady development of this abstraction and its use to handle hundreds of different manipulable types (up to a dozen or so types) on a canvas has made it really clear to me that it is too easy to be led astray by X (and GDK's) model of press, release and motion events. once you start treating all user interaction as a drag, with defined start, first motion, continuing motion, abort and finish phases, many things fall into place.

i suspect you've already incorporated most if not all of this into the gestures branch, i just wanted to make it explicit.
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]