Class: Clutter::DragAction

Inherits:
Action show all
Defined in:
(unknown)

Overview

The Clutter::DragActionClass structure contains
only private data

Instance Method Summary collapse

Methods inherited from ActorMeta

#actor, #actor=, #enabled, #enabled=, #enabled?, #name, #name=

Constructor Details

#initializeClutter::Action

Creates a new Clutter::DragAction instance

Instance Method Details

#drag_areaClutter::Rect

Constains the dragging action (or in particular, the resulting
actor position) to the specified Clutter::Rect, in parent's
coordinates.

Returns:

  • (Clutter::Rect)

    drag-area

#drag_area=(drag_area) ⇒ Clutter::Rect

Constains the dragging action (or in particular, the resulting
actor position) to the specified Clutter::Rect, in parent's
coordinates.

Parameters:

  • drag_area (Clutter::Rect)

Returns:

  • (Clutter::Rect)

    drag-area

  • (Clutter::Rect)

    drag-area

#drag_area_set=(drag_area_set) ⇒ Boolean

Whether the Clutter::DragAction:drag-area property has been set.

Parameters:

  • drag_area_set (Boolean)

Returns:

  • (Boolean)

    drag-area-set

  • (Boolean)

    drag-area-set

#drag_area_set?Boolean

Whether the Clutter::DragAction:drag-area property has been set.

Returns:

  • (Boolean)

    drag-area-set

#drag_axisClutter::DragAxis

Constraints the dragging action to the specified axis

Returns:

#drag_axis=(drag_axis) ⇒ Clutter::DragAxis

Constraints the dragging action to the specified axis

Parameters:

Returns:

#drag_handleClutter::Actor

The Clutter::Actor that is effectively being dragged

A Clutter::DragAction will, be default, use the #ClutterActor that
has been attached to the action; it is possible to create a
separate Clutter::Actor and use it instead.

Setting this property has no effect on the Clutter::Actor argument
passed to the Clutter::DragAction signals

Returns:

#drag_handle=(drag_handle) ⇒ Clutter::Actor

The Clutter::Actor that is effectively being dragged

A Clutter::DragAction will, be default, use the #ClutterActor that
has been attached to the action; it is possible to create a
separate Clutter::Actor and use it instead.

Setting this property has no effect on the Clutter::Actor argument
passed to the Clutter::DragAction signals

Parameters:

Returns:

#get_drag_area(drag_area) ⇒ Boolean

Retrieves the "drag area" associated with action, that
is a Clutter::Rect that constrains the actor movements,
in parents coordinates.

Parameters:

  • drag_area (Clutter::Rect)

    a Clutter::Rect to be filled

Returns:

  • (Boolean)

    true if the actor is actually constrained (and thus
    drag_area is valid), false otherwise

#get_drag_threshold(x_threshold, y_threshold) ⇒ nil

Retrieves the values set by clutter_drag_action_set_drag_threshold().

If the Clutter::DragAction:x-drag-threshold property or the
Clutter::DragAction:y-drag-threshold property have been set to -1 then
this function will return the default drag threshold value as stored
by the Clutter::Settings:dnd-drag-threshold property of #ClutterSettings.

Parameters:

  • x_threshold (Integer)

    return location for the horizontal drag
    threshold value, in pixels

  • y_threshold (Integer)

    return location for the vertical drag
    threshold value, in pixels

Returns:

  • (nil)

#get_motion_coords(motion_x, motion_y) ⇒ nil

Retrieves the coordinates, in stage space, of the latest motion
event during the dragging

Parameters:

  • motion_x (Clutter::gfloat)

    return location for the latest motion
    event's X coordinate

  • motion_y (Clutter::gfloat)

    return location for the latest motion
    event's Y coordinate

Returns:

  • (nil)

#get_press_coords(press_x, press_y) ⇒ nil

Retrieves the coordinates, in stage space, of the press event
that started the dragging

Parameters:

  • press_x (Clutter::gfloat)

    return location for the press event's X coordinate

  • press_y (Clutter::gfloat)

    return location for the press event's Y coordinate

Returns:

  • (nil)

#set_drag_threshold(x_threshold, y_threshold) ⇒ nil

Sets the horizontal and vertical drag thresholds that must be
cleared by the pointer before action can begin the dragging.

If x_threshold or y_threshold are set to -1 then the default
drag threshold stored in the Clutter::Settings:dnd-drag-threshold
property of Clutter::Settings will be used.

Parameters:

  • x_threshold (Integer)

    a distance on the horizontal axis, in pixels, or
    -1 to use the default drag threshold from Clutter::Settings

  • y_threshold (Integer)

    a distance on the vertical axis, in pixels, or
    -1 to use the default drag threshold from Clutter::Settings

Returns:

  • (nil)

#x_drag_thresholdInteger

The horizontal threshold, in pixels, that the cursor must travel
in order to begin a drag action.

When set to a positive value, Clutter::DragAction will only emit
Clutter::DragAction::drag-begin if the pointer has moved
horizontally at least of the given amount of pixels since
the button press event.

When set to -1, Clutter::DragAction will use the default threshold
stored in the Clutter::Settings:dnd-drag-threshold property of
Clutter::Settings.

When read, this property will always return a valid drag
threshold, either as set or the default one.

Returns:

  • (Integer)

    x-drag-threshold

#x_drag_threshold=(x_drag_threshold) ⇒ Integer

The horizontal threshold, in pixels, that the cursor must travel
in order to begin a drag action.

When set to a positive value, Clutter::DragAction will only emit
Clutter::DragAction::drag-begin if the pointer has moved
horizontally at least of the given amount of pixels since
the button press event.

When set to -1, Clutter::DragAction will use the default threshold
stored in the Clutter::Settings:dnd-drag-threshold property of
Clutter::Settings.

When read, this property will always return a valid drag
threshold, either as set or the default one.

Parameters:

  • x_drag_threshold (Integer)

Returns:

  • (Integer)

    x-drag-threshold

  • (Integer)

    x-drag-threshold

#y_drag_thresholdInteger

The vertical threshold, in pixels, that the cursor must travel
in order to begin a drag action.

When set to a positive value, Clutter::DragAction will only emit
Clutter::DragAction::drag-begin if the pointer has moved
vertically at least of the given amount of pixels since
the button press event.

When set to -1, Clutter::DragAction will use the value stored
in the Clutter::Settings:dnd-drag-threshold property of
Clutter::Settings.

When read, this property will always return a valid drag
threshold, either as set or the default one.

Returns:

  • (Integer)

    y-drag-threshold

#y_drag_threshold=(y_drag_threshold) ⇒ Integer

The vertical threshold, in pixels, that the cursor must travel
in order to begin a drag action.

When set to a positive value, Clutter::DragAction will only emit
Clutter::DragAction::drag-begin if the pointer has moved
vertically at least of the given amount of pixels since
the button press event.

When set to -1, Clutter::DragAction will use the value stored
in the Clutter::Settings:dnd-drag-threshold property of
Clutter::Settings.

When read, this property will always return a valid drag
threshold, either as set or the default one.

Parameters:

  • y_drag_threshold (Integer)

Returns:

  • (Integer)

    y-drag-threshold

  • (Integer)

    y-drag-threshold