SwipeTracker
Object Hierarchy:
Adw.SwipeTracker
Adw.SwipeTracker
Adw.SwipeTracker
GLib.Object
GLib.Object
GLib.Object->Adw.SwipeTracker
Gtk.Orientable
Gtk.Orientable
Gtk.Orientable->Adw.SwipeTracker
Description:
[ CCode ( type_id = "adw_swipe_tracker_get_type ()" ) ] [ Version ( since = "1.0" ) ]public sealed class SwipeTracker : Object , Orientable
A swipe tracker used in [class@Carousel], [class@Flap] and [class@Leaflet].
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.
Content:
Properties:
public bool allow_long_swipes { get ; set ; }
Whether to allow swiping for more than one snap point at a time.
public bool allow_mouse_drag { get ; set ; }
Whether to allow dragging with mouse pointer.
public bool enabled { get ; set ; }
Whether the swipe tracker is enabled.
public bool reversed { get ; set ; }
Whether to reverse the swipe direction.
public Swipeable swipeable { get ; construct ; }
The widget the swipe tracker is attached to.
Creation methods:
Methods:
public bool get_allow_long_swipes ()
Gets whether to allow swiping for more than one snap point at a time.
public bool get_allow_mouse_drag ()
Gets whether this can be dragged
with mouse pointer.
public bool get_enabled ()
Gets whether this is enabled.
public bool get_reversed ()
Gets whether this is reversing the
swipe direction.
public unowned Swipeable get_swipeable ()
Get the widget this is attached to.
public void set_allow_long_swipes (bool allow_long_swipes)
Sets whether to allow swiping for more than one snap point at a time.
public void set_allow_mouse_drag (bool allow_mouse_drag)
Sets whether this can be dragged
with mouse pointer.
public void set_enabled (bool enabled)
Sets whether this is enabled.
public void set_reversed (bool reversed)
Sets whether to reverse the swipe direction.
public void shift_position (double delta)
Moves the current progress value by delta
.
Signals:
public signal void begin_swipe ()
This signal is emitted right before a swipe will be started, after the
drag threshold has been passed.
public signal void end_swipe (double velocity, double to)
This signal is emitted as soon as the gesture has stopped.
public signal void prepare (NavigationDirection direction)
This signal is emitted when a possible swipe is detected.
public signal void update_swipe (double progress)
This signal is emitted every time the progress value changes.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Gtk.Orientable