1
0
Fork 0
Commit graph

9 commits

Author SHA1 Message Date
Gustavo Noronha Silva
0c75e17814 Add PanAxis mode that automatically pins scroll based on initial movement
This code is inspired by the implementation of the same feature for the
Mx toolkit's MxKineticScrollView. See commit 4d08771.

https://bugzilla.gnome.org/show_bug.cgi?id=707982
2015-06-11 15:47:48 -03:00
Bastien Nocera
54e2657cb0 GestureActions: Set threshold-trigger-edge at right time
It was set during the _init(), and swiftly overridden with the
default value in construct. Do it in constructed() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=724242
2014-02-13 18:53:24 +01:00
Emmanuele Bassi
8cb326dc54 Explicitly set the trigger edge in GestureAction subclasses
Each GestureAction subclass has its own trigger edge handling, so we
want to be resilient in case of changes in the super-class.

https://bugzilla.gnome.org/show_bug.cgi?id=710227
2013-12-05 15:20:39 +00:00
Emmanuele Bassi
41bb03da2d Use the new macros for adding private data 2013-07-03 18:04:32 +01:00
Emmanuele Bassi
57956461dc docs: Fix ClutterPanAction signal annotation
Signals are defined as <ClassName>::<signal-name>; a single colon is
used for properties.
2012-12-15 18:43:56 +00:00
Jasper St. Pierre
75b521de6e pan-action: Add a simple convenience function to retrieve delta/coords
This is a simple helper designed to ease the implementation of alternate
implementations of the "pan" signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=689061
2012-11-30 17:19:14 -05:00
Jasper St. Pierre
90a2401299 pan-action, zoom-action: Fix documentation for signals
The documentation said that you should return TRUE to mark
that the action was handled, but the code did the reverse.
Change the documentation to reflect what all the other gestures
do.

https://bugzilla.gnome.org/show_bug.cgi?id=689061
2012-11-29 16:55:58 -05:00
Emanuele Aina
3b298ddfa3 pan-action: emit ::pan-stopped before ::gesture-begin
When starting a new gesture before the momentum of the previous one
has finished the ::pan-stopped was counter-intuitively emitted
after the new ::gesture-begin.

Make use of gesture_prepare() to reset the state of the action
right before emitting ::gesture-begin.

https://bugzilla.gnome.org/show_bug.cgi?id=683431
2012-09-06 12:16:09 +01:00
Emanuele Aina
9ca06d2895 pan-action: add PanAction, to handle panning in scrollable actors
PanAction is a GestureAction-subclass that implements the panning
concept for scrollable actors, with the ability to emit interpolated
signals to emulate the kinetic inertia of the panning. PanAction provides:

• pan signal, notifying users of the panning gesture status;

• pan-stopped signal, emitted at the end of the interpolated phase
  of the panning gesture, if enabled;

• pan-axis property, to allow constraining the dragging to a specific
  axis;

• interpolated property, to enable or disable the inertial behaviour;

• deceleration property, to customize the rate at which the momentum
  of the panning will be slowed down;

• acceleration-factor property, applied to the inertial momentum when
  starting the interpolated sequence.

An interactive test is also provided.

https://bugzilla.gnome.org/show_bug.cgi?id=681648
2012-08-28 10:11:16 -03:00