Package ch.bailu.gtk.gtk
Class GesturePan
- All Implemented Interfaces:
PointerInterface
`GtkGesturePan` is a `GtkGesture` for pan gestures.
These are drags that are locked to happen along one axis. The axis
that a `GtkGesturePan` handles is defined at construct time, and
can be changed through [method@Gtk.GesturePan.set_orientation].
When the gesture starts to be recognized, `GtkGesturePan` 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 [signal@Gtk.GesturePan::pan] signal will be emitted as input
events are received, containing the offset in the given axis.
These are drags that are locked to happen along one axis. The axis
that a `GtkGesturePan` handles is defined at construct time, and
can be changed through [method@Gtk.GesturePan.set_orientation].
When the gesture starts to be recognized, `GtkGesturePan` 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 [signal@Gtk.GesturePan::pan] signal will be emitted as input
events are received, containing the offset in the given axis.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gtk.GestureDrag
GestureDrag.OnDragBegin, GestureDrag.OnDragEnd, GestureDrag.OnDragUpdate
Nested classes/interfaces inherited from class ch.bailu.gtk.gtk.Gesture
Gesture.OnBegin, Gesture.OnCancel, Gesture.OnEnd, Gesture.OnSequenceStateChanged, Gesture.OnUpdate
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gtk.GestureDrag
SIGNAL_ON_DRAG_BEGIN, SIGNAL_ON_DRAG_END, SIGNAL_ON_DRAG_UPDATE
Fields inherited from class ch.bailu.gtk.gtk.Gesture
SIGNAL_ON_BEGIN, SIGNAL_ON_CANCEL, SIGNAL_ON_END, SIGNAL_ON_SEQUENCE_STATE_CHANGED, SIGNAL_ON_UPDATE
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionGesturePan
(int orientation) Returns a newly created `GtkGesture` that recognizes pan gestures.GesturePan
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
static int
int
Returns the orientation of the pan gestures that this @gesture expects.static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
onPan
(GesturePan.OnPan signal) Connect to signal "pan".void
setOrientation
(int orientation) Sets the orientation to be expected on pan gestures.Methods inherited from class ch.bailu.gtk.gtk.GestureDrag
onDragBegin, onDragEnd, onDragUpdate
Methods inherited from class ch.bailu.gtk.gtk.GestureSingle
getButton, getCurrentButton, getCurrentSequence, getExclusive, getTouchOnly, setButton, setExclusive, setTouchOnly
Methods inherited from class ch.bailu.gtk.gtk.Gesture
getBoundingBox, getDevice, getGroup, getLastEvent, getLastUpdatedSequence, getSequences, getSequenceState, group, handlesSequence, isActive, isGroupedWith, isRecognized, onBegin, onCancel, onEnd, onSequenceStateChanged, onUpdate, setSequenceState, setState, ungroup
Methods inherited from class ch.bailu.gtk.gtk.EventController
getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getName, getPropagationLimit, getPropagationPhase, getWidget, reset, setName, setName, setPropagationLimit, setPropagationPhase, setStaticName, setStaticName
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_PAN
- See Also:
-
-
Constructor Details
-
GesturePan
-
GesturePan
public GesturePan(int orientation) Returns a newly created `GtkGesture` that recognizes pan gestures.- Parameters:
orientation
- expected orientation
-
-
Method Details
-
getClassHandler
-
getOrientation
public int getOrientation()Returns the orientation of the pan gestures that this @gesture expects.- Returns:
- the expected orientation for pan gestures
-
setOrientation
public void setOrientation(int orientation) Sets the orientation to be expected on pan gestures.- Parameters:
orientation
- expected orientation
-
onPan
Connect to signal "pan".
SeeGesturePan.OnPan.onPan(int, double)
for signal description.
FieldSIGNAL_ON_PAN
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-