Class GesturePan

All Implemented Interfaces:
PointerInterface

public class GesturePan extends GestureDrag
`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.

https://docs.gtk.org/gtk4/class.GesturePan.html

  • Field Details

  • Constructor Details

    • GesturePan

      public GesturePan(PointerContainer pointer)
    • GesturePan

      public GesturePan(int orientation)
      Returns a newly created `GtkGesture` that recognizes pan gestures.
      Parameters:
      orientation - expected orientation
  • Method Details

    • getClassHandler

      public static ClassHandler 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

      public SignalHandler onPan(GesturePan.OnPan signal)
      Connect to signal "pan".
      See GesturePan.OnPan.onPan(int, double) for signal description.
      Field SIGNAL_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

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()