Class PanGestureDetector

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll

This class emits a signals when a pan gesture occurs.

C#
Copy
public class PanGestureDetector : GestureDetector, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable
Inheritance
Implements

Constructors

View Source

PanGestureDetector()

Creates an initialized PanGestureDetector.

Declaration
C#
Copy
public PanGestureDetector()
View Source

PanGestureDetector(PanGestureDetector)

The copy constructor.

Declaration
C#
Copy
public PanGestureDetector(PanGestureDetector handle)
Parameters
Type Name Description
PanGestureDetector handle

A reference to the copied handle

Properties

View Source

DefaultThreshold

The default threshold is PI * 0.25 radians (or 45 degrees).

Declaration
C#
Copy
public static Radian DefaultThreshold { get; }
Property Value
Type Description
Radian
View Source

DirectionDown

For a down pan (0.5 * PI Radians).

Declaration
C#
Copy
public static Radian DirectionDown { get; }
Property Value
Type Description
Radian
View Source

DirectionHorizontal

For a left and right pan (PI Radians). Useful for AddDirection().

Declaration
C#
Copy
public static Radian DirectionHorizontal { get; }
Property Value
Type Description
Radian
View Source

DirectionLeft

For a left pan (-PI Radians).

Declaration
C#
Copy
public static Radian DirectionLeft { get; }
Property Value
Type Description
Radian
View Source

DirectionRight

For a right pan (0 Radians).

Declaration
C#
Copy
public static Radian DirectionRight { get; }
Property Value
Type Description
Radian
View Source

DirectionUp

For an up pan (-0.5 * PI Radians).

Declaration
C#
Copy
public static Radian DirectionUp { get; }
Property Value
Type Description
Radian
View Source

DirectionVertical

For an up and down pan (-0.5 * PI Radians). Useful for AddDirection().

Declaration
C#
Copy
public static Radian DirectionVertical { get; }
Property Value
Type Description
Radian
View Source

LocalDisplacement

Retrieves the local displacement

Declaration
C#
Copy
public Vector2 LocalDisplacement { get; }
Property Value
Type Description
Vector2
View Source

LocalPosition

Retrieves the local position.

Declaration
C#
Copy
public Vector2 LocalPosition { get; }
Property Value
Type Description
Vector2
View Source

LocalVelocity

Retrieves the local velocity.

Declaration
C#
Copy
public Vector2 LocalVelocity { get; }
Property Value
Type Description
Vector2
View Source

Panning

Retrieves the panning flag.

Declaration
C#
Copy
public bool Panning { get; }
Property Value
Type Description
Boolean
View Source

ScreenDisplacement

Retrieves the screen displacement.

Declaration
C#
Copy
public Vector2 ScreenDisplacement { get; }
Property Value
Type Description
Vector2
View Source

ScreenPosition

Retrieves the screen position.

Declaration
C#
Copy
public Vector2 ScreenPosition { get; }
Property Value
Type Description
Vector2
View Source

ScreenVelocity

Retrieves the screen velocity.

Declaration
C#
Copy
public Vector2 ScreenVelocity { get; }
Property Value
Type Description
Vector2

Methods

View Source

AddAngle(Radian)

The pan gesture is only emitted if the pan occurs in the direction specified by this method with a +/- threshold allowance. The default threshold (PI * 0.25) is used.
The angle added using this API is only checked when the gesture first starts, after that, this detector will emit the gesture regardless of what angle the pan is moving.
The user can add as many angles as they require.

Declaration
C#
Copy
public void AddAngle(Radian angle)
Parameters
Type Name Description
Radian angle

The angle that pan should be allowed

View Source

AddAngle(Radian, Radian)

The pan gesture is only emitted if the pan occurs in the direction specified by this method with a +/- threshold allowance.
If an angle of 0.0 degrees is specified and the threshold is 45 degrees then the acceptable direction range is from -45 to 45 degrees.
The angle added using this API is only checked when the gesture first starts, after that, this detector will emit the gesture regardless of what angle the pan is moving. The user can add as many angles as they require.

Declaration
C#
Copy
public void AddAngle(Radian angle, Radian threshold)
Parameters
Type Name Description
Radian angle

The angle that pan should be allowed

Radian threshold

The threshold around that angle

View Source

AddDirection(Radian)

A helper method for adding bi-directional angles where the pan should take place. In other words, if 0 is requested, then PI will also be added so that we have both left and right scrolling.
The default threshold (PI * 0.25) is used.

Declaration
C#
Copy
public void AddDirection(Radian direction)
Parameters
Type Name Description
Radian direction

The direction of panning required

View Source

AddDirection(Radian, Radian)

A helper method for adding bi-directional angles where the pan should take place.
In other words, if 0 is requested, then PI will also be added so that we have both left and right scrolling.

Declaration
C#
Copy
public void AddDirection(Radian direction, Radian threshold)
Parameters
Type Name Description
Radian direction

The direction of panning required

Radian threshold

The threshold

View Source

ClearAngles()

Clears any directional angles that are used by the gesture detector.

Declaration
C#
Copy
public void ClearAngles()
View Source

Dispose(DisposeTypes)

override it to clean-up your own resources.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type
Overrides
View Source

GetAngleCount()

Returns the count of angles that this pan gesture detector emits a signal.

Declaration
C#
Copy
public uint GetAngleCount()
Returns
Type Description
UInt32

The gesture detector has been initialized.

View Source

GetMaximumMotionEventAge()

Retrieves the maximum age for the pan gesture motion as milliseconds.

Declaration
C#
Copy
public uint GetMaximumMotionEventAge()
Returns
Type Description
UInt32

The maximum age of motion events as milliseconds

View Source

GetMaximumTouchesRequired()

Retrieves the maximum number of touches required for the pan gesture to be detected.

Declaration
C#
Copy
public uint GetMaximumTouchesRequired()
Returns
Type Description
UInt32

The maximum touches required

View Source

GetMinimumTouchesRequired()

Retrieves the minimum number of touches required for the pan gesture to be detected.

Declaration
C#
Copy
public uint GetMinimumTouchesRequired()
Returns
Type Description
UInt32

The minimum touches required

View Source

ReleaseSwigCPtr(Runtime.InteropServices.HandleRef)

Declaration
C#
Copy
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type Name Description
Tizen.System.Runtime.InteropServices.HandleRef swigCPtr
Overrides
View Source

RemoveAngle(Radian)

Removes the angle specified from the container. This will only remove the first instance of the angle found from the container.

Declaration
C#
Copy
public void RemoveAngle(Radian angle)
Parameters
Type Name Description
Radian angle

The angle to remove

View Source

RemoveDirection(Radian)

Removes the two angles that make up the direction from the container.

Declaration
C#
Copy
public void RemoveDirection(Radian direction)
Parameters
Type Name Description
Radian direction

The direction to remove

View Source

SetMaximumMotionEventAge(UInt32)

Set a maximum duration of motion event that is able to live on the pan gesture event queue. If duration exceed it, the motion event is discarded.

Declaration
C#
Copy
public void SetMaximumMotionEventAge(uint maximumAgeMilliSecond)
Parameters
Type Name Description
UInt32 maximumAgeMilliSecond

Maximum age of motion events as milliseconds

View Source

SetMaximumTouchesRequired(UInt32)

This is the maximum number of touches required for the pan gesture to be detected.

Declaration
C#
Copy
public void SetMaximumTouchesRequired(uint maximum)
Parameters
Type Name Description
UInt32 maximum

Maximum touches required

View Source

SetMinimumTouchesRequired(UInt32)

This is the minimum number of touches required for the pan gesture to be detected.

Declaration
C#
Copy
public void SetMinimumTouchesRequired(uint minimum)
Parameters
Type Name Description
UInt32 minimum

Minimum touches required

View Source

SetPanGestureProperties(PanGesture)

Allows setting of the pan properties that are returned in constraints.

Declaration
C#
Copy
public static void SetPanGestureProperties(PanGesture pan)
Parameters
Type Name Description
PanGesture pan

The pan gesture to set

Events

View Source

Detected

This signal is emitted when the specified pan is detected on the attached view.

Declaration
C#
Copy
public event DaliEventHandler<object, PanGestureDetector.DetectedEventArgs> Detected
Event Type
Type Description
DaliEventHandler<Object, PanGestureDetector.DetectedEventArgs>

Implements

Extension Methods