Class: Handy::SwipeTracker

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(swipeable) ⇒ Handy::SwipeTracker

Creates a new HdySwipeTracker object on widget.

Parameters:

Instance Method Details

#allow_long_swipesBoolean

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

If the value is FALSE, each swipe can only move to the adjacent snap points.

Returns:

  • (Boolean)

    whether long swipes are allowed

#allow_long_swipes=(allow_long_swipes) ⇒ Boolean

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

If the value is FALSE, each swipe can only move to the adjacent snap points.

Parameters:

  • allow_long_swipes (Boolean)

Returns:

  • (Boolean)

    allow-long-swipes

  • (Boolean)

    allow-long-swipes

#allow_long_swipes?Boolean

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

If the value is FALSE, each swipe can only move to the adjacent snap points.

Returns:

  • (Boolean)

    allow-long-swipes

#allow_mouse_dragBoolean

Get whether self can be dragged with mouse pointer.

Returns:

  • (Boolean)

    TRUE is mouse dragging is allowed

#allow_mouse_drag=(allow_mouse_drag) ⇒ Boolean

Whether to allow dragging with mouse pointer.

This should usually be FALSE.

Parameters:

  • allow_mouse_drag (Boolean)

Returns:

  • (Boolean)

    allow-mouse-drag

  • (Boolean)

    allow-mouse-drag

#allow_mouse_drag?Boolean

Whether to allow dragging with mouse pointer.

This should usually be FALSE.

Returns:

  • (Boolean)

    allow-mouse-drag

#enabledBoolean

Get whether self is enabled.

Returns:

  • (Boolean)

    TRUE if self is enabled

#enabled=(enabled) ⇒ Boolean

Whether the swipe tracker is enabled.

When it's not enabled, no events will be processed. Usually widgets will want to expose this via a property.

Parameters:

  • enabled (Boolean)

Returns:

  • (Boolean)

    enabled

  • (Boolean)

    enabled

#enabled?Boolean

Whether the swipe tracker is enabled.

When it's not enabled, no events will be processed. Usually widgets will want to expose this via a property.

Returns:

  • (Boolean)

    enabled

#reversedBoolean

Get whether self is reversing the swipe direction.

Returns:

  • (Boolean)

    TRUE is the direction is reversed

#reversed=(reversed) ⇒ Boolean

Whether to reverse the swipe direction.

If the swipe tracker is horizontal, it can be used for supporting RTL text direction.

Parameters:

  • reversed (Boolean)

Returns:

  • (Boolean)

    reversed

  • (Boolean)

    reversed

#reversed?Boolean

Whether to reverse the swipe direction.

If the swipe tracker is horizontal, it can be used for supporting RTL text direction.

Returns:

  • (Boolean)

    reversed

#shift_position(delta) ⇒ nil

Move the current progress value by delta.

This can be used to adjust the current position if snap points move during the gesture.

Parameters:

  • delta (Float)

    the position delta

Returns:

  • (nil)

#swipeableHandy::Swipeable

The widget the swipe tracker is attached to. Must not be NULL.

Returns:

#swipeable=(swipeable) ⇒ Handy::Swipeable

The widget the swipe tracker is attached to. Must not be NULL.

Parameters:

Returns: