Class: Gtk::GestureDrag

Inherits:
GestureSingle show all
Defined in:
(unknown)

Direct Known Subclasses

GesturePan

Instance Method Summary collapse

Methods inherited from GestureSingle

#button, #button=, #current_button, #current_sequence, #exclusive, #exclusive=, #exclusive?, #touch_only, #touch_only=, #touch_only?

Methods inherited from Gesture

#device, #get_bounding_box, #get_bounding_box_center, #get_last_event, #get_point, #get_sequence_state, #group, #handles_sequence, #is_active, #is_grouped_with, #is_recognized, #last_updated_sequence, #n_points, #n_points=, #sequences, #set_sequence_state, #state=, #ungroup

Methods inherited from EventController

#current_event, #current_event_device, #current_event_state, #current_event_time, #name, #name=, #propagation_limit, #propagation_limit=, #propagation_phase, #propagation_phase=, #reset, #static_name=, #widget, #widget=

Constructor Details

#initializeGtk::Gesture

Returns a newly created GtkGesture that recognizes drags.

Instance Method Details

#get_offset(x, y) ⇒ Boolean

Gets the offset from the start point.

If the gesture is active, this function returns true and fills in x and y with the coordinates of the current point, as an offset to the starting drag point.

Parameters:

  • x (Float)

    X offset for the current point

  • y (Float)

    Y offset for the current point

Returns:

  • (Boolean)

    true if the gesture is active

#get_start_point(x, y) ⇒ Boolean

Gets the point where the drag started.

If the gesture is active, this function returns true and fills in x and y with the drag start coordinates, in widget-relative coordinates.

Parameters:

  • x (Float)

    X coordinate for the drag start point

  • y (Float)

    Y coordinate for the drag start point

Returns:

  • (Boolean)

    true if the gesture is active