SwipeTracker

class SwipeTracker(pointer: <Error class: unknown class><<Error class: unknown class>>)

A swipe tracker used in class@Carousel, class@NavigationView and class@OverlaySplitView.

The AdwSwipeTracker object can be used for implementing widgets with swipe gestures. It supports touch-based swipes, pointer dragging, and touchpad scrolling.

The widgets will probably want to expose the property@SwipeTracker:enabled property. If they expect to use horizontal orientation, property@SwipeTracker:reversed can be used for supporting RTL text direction.

Constructors

Link copied to clipboard
constructor(swipeable: Swipeable)

Creates a new AdwSwipeTracker for @widget.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val adwSwipeTrackerPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Whether to allow swiping for more than one snap point at a time.

Link copied to clipboard

Whether to allow dragging with mouse pointer.

Link copied to clipboard

Whether to allow touchscreen swiping from GtkWindowHandle.

Link copied to clipboard

Whether the swipe tracker is enabled.

Link copied to clipboard
open val gtkOrientablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Whether to allow swiping past the first available snap point.

Link copied to clipboard

Whether to reverse the swipe direction.

Link copied to clipboard

The widget the swipe tracker is attached to.

Link copied to clipboard

Whether to allow swiping past the last available snap point.

Functions

Link copied to clipboard
fun connectBeginSwipe(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

This signal is emitted right before a swipe will be started, after the drag threshold has been passed.

Link copied to clipboard
fun connectEndSwipe(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (velocity: Double, to: Double) -> Unit): <Error class: unknown class>

This signal is emitted as soon as the gesture has stopped.

Link copied to clipboard
fun connectPrepare(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (direction: NavigationDirection) -> Unit): <Error class: unknown class>

This signal is emitted when a possible swipe is detected.

Link copied to clipboard
fun connectUpdateSwipe(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (progress: Double) -> Unit): <Error class: unknown class>

This signal is emitted every time the progress value changes.

Link copied to clipboard

Gets whether to allow swiping for more than one snap point at a time.

Link copied to clipboard

Gets whether @self can be dragged with mouse pointer.

Link copied to clipboard

Gets whether to allow touchscreen swiping from GtkWindowHandle.

Link copied to clipboard

Gets whether @self is enabled.

Link copied to clipboard

Gets whether to allow swiping past the first available snap point.

Link copied to clipboard

Gets whether @self is reversing the swipe direction.

Link copied to clipboard

Get the widget @self is attached to.

Link copied to clipboard

Gets whether to allow swiping past the last available snap point.

Link copied to clipboard
fun setAllowLongSwipes(allowLongSwipes: Boolean)

Sets whether to allow swiping for more than one snap point at a time.

Link copied to clipboard
fun setAllowMouseDrag(allowMouseDrag: Boolean)

Sets whether @self can be dragged with mouse pointer.

Link copied to clipboard
fun setAllowWindowHandle(allowWindowHandle: Boolean)

Sets whether to allow touchscreen swiping from GtkWindowHandle.

Link copied to clipboard
fun setEnabled(enabled: Boolean)

Sets whether @self is enabled.

Link copied to clipboard
fun setLowerOvershoot(overshoot: Boolean)

Sets whether to allow swiping past the first available snap point.

Link copied to clipboard
fun setReversed(reversed: Boolean)

Sets whether to reverse the swipe direction.

Link copied to clipboard
fun setUpperOvershoot(overshoot: Boolean)

Sets whether to allow swiping past the last available snap point.

Link copied to clipboard
fun shiftPosition(delta: Double)

Moves the current progress value by @delta.