Package org.gnome.gtk
Class GesturePan
- All Implemented Interfaces:
Proxy
Recognizes 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 setOrientation(org.gnome.gtk.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 Gtk.GesturePan::pan signal will be emitted as input
events are received, containing the offset in the given axis.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGesturePan.Builder<B extends GesturePan.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classstatic interfaceFunctional interface declaration of thePanCallbackcallback.Nested classes/interfaces inherited from class org.gnome.gtk.GestureDrag
GestureDrag.DragBeginCallback, GestureDrag.DragEndCallback, GestureDrag.DragUpdateCallback, GestureDrag.GestureDragClassNested classes/interfaces inherited from class org.gnome.gtk.GestureSingle
GestureSingle.GestureSingleClassNested classes/interfaces inherited from class org.gnome.gtk.Gesture
Gesture.BeginCallback, Gesture.CancelCallback, Gesture.EndCallback, Gesture.Gesture$Impl, Gesture.GestureClass, Gesture.SequenceStateChangedCallback, Gesture.UpdateCallbackNested classes/interfaces inherited from class org.gnome.gtk.EventController
EventController.EventController$Impl, EventController.EventControllerClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new GesturePan.GesturePan(MemorySegment address) Create a GesturePan proxy instance for the provided memory address.GesturePan(Orientation orientation) Returns a newly createdGtkGesturethat recognizes pan gestures. -
Method Summary
Modifier and TypeMethodDescriptionprotected GesturePanasParent()Returns this instance as if it were its parent type.static GesturePan.Builder<? extends GesturePan.Builder> builder()AGesturePan.Builderobject constructs aGesturePanwith the specified properties.voidemitPan(PanDirection direction, double offset) Emits the "pan" signal.Returns the orientation of the pan gestures that this this GesturePan expects.static @Nullable TypegetType()Get the GType of the GesturePan classonPan(GesturePan.PanCallback handler) Emitted once a panning gesture along the expected axis is detected.voidsetOrientation(Orientation orientation) Sets the orientation to be expected on pan gestures.Methods inherited from class org.gnome.gtk.GestureDrag
emitDragBegin, emitDragEnd, emitDragUpdate, getOffset, getStartPoint, onDragBegin, onDragEnd, onDragUpdateMethods inherited from class org.gnome.gtk.GestureSingle
getButton, getCurrentButton, getCurrentSequence, getExclusive, getTouchOnly, setButton, setExclusive, setTouchOnlyMethods inherited from class org.gnome.gtk.Gesture
emitBegin, emitCancel, emitEnd, emitSequenceStateChanged, emitUpdate, getBoundingBox, getBoundingBoxCenter, getDevice, getGroup, getLastEvent, getLastUpdatedSequence, getPoint, getSequences, getSequenceState, group, handlesSequence, isActive, isGroupedWith, isRecognized, onBegin, onCancel, onEnd, onSequenceStateChanged, onUpdate, setSequenceState, setState, ungroupMethods inherited from class org.gnome.gtk.EventController
getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getName, getPropagationLimit, getPropagationPhase, getWidget, reset, setName, setPropagationLimit, setPropagationPhase, setStaticNameMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
GesturePan
Create a GesturePan proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
GesturePan
Returns a newly createdGtkGesturethat recognizes pan gestures.- Parameters:
orientation- expected orientation
-
GesturePan
public GesturePan()Creates a new GesturePan.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type.- Overrides:
asParentin classGestureDrag
-
getOrientation
Returns the orientation of the pan gestures that this this GesturePan expects.- Returns:
- the expected orientation for pan gestures
-
setOrientation
Sets the orientation to be expected on pan gestures.- Parameters:
orientation- expected orientation
-
onPan
Emitted once a panning gesture along the expected axis is detected.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitPan
Emits the "pan" signal. SeeonPan(org.gnome.gtk.GesturePan.PanCallback). -
builder
AGesturePan.Builderobject constructs aGesturePanwith the specified properties. Use the variousset...()methods to set properties, and finish construction withGesturePan.Builder.build().- Returns:
- the builder object
-