| Top |
GObject
╰── CtkEventController
╰── CtkGesture
╰── CtkGestureSingle
╰── CtkGestureDrag
╰── CtkGesturePan
CtkGesturePan is a CtkGesture implementation able to recognize
pan gestures, those are drags that are locked to happen along one
axis. The axis that a CtkGesturePan handles is defined at
construct time, and can be changed through
ctk_gesture_pan_set_orientation().
When the gesture starts to be recognized, CtkGesturePan will attempt to determine as early as possible whether the sequence is moving in the expected direction, and denying the sequence if this does not happen.
Once a panning gesture along the expected axis is recognized, the “pan” signal will be emitted as input events are received, containing the offset in the given axis.
CtkGesture * ctk_gesture_pan_new (CtkWidget *widget,CtkOrientation orientation);
Returns a newly created CtkGesture that recognizes pan gestures.
Since: 3.14
CtkOrientation
ctk_gesture_pan_get_orientation (CtkGesturePan *gesture);
Returns the orientation of the pan gestures that this gesture
expects.
Since: 3.14
void ctk_gesture_pan_set_orientation (CtkGesturePan *gesture,CtkOrientation orientation);
Sets the orientation to be expected on pan gestures.
Since: 3.14
“orientation” property“orientation” CtkOrientation
The expected orientation of pan gestures.
Owner: CtkGesturePan
Flags: Read / Write
Default value: CTK_ORIENTATION_HORIZONTAL
Since: 3.14
“pan” signalvoid user_function (CtkGesturePan *gesture, CtkPanDirection direction, double offset, gpointer user_data)
This signal is emitted once a panning gesture along the expected axis is detected.
gesture |
The object which received the signal |
|
direction |
current direction of the pan gesture |
|
offset |
Offset along the gesture orientation |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.14