Class PanGestureDetector
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
This class emits a signals when a pan gesture occurs.
C#Copypublic class PanGestureDetector : GestureDetector, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable
- Inheritance
- Implements
Constructors
Declaration
C#Copypublic PanGestureDetector()
Declaration
C#Copypublic PanGestureDetector(PanGestureDetector handle)
Parameters
Type | Name | Description |
---|---|---|
PanGestureDetector | handle | A reference to the copied handle |
Properties
Declaration
C#Copypublic static Radian DefaultThreshold { get; }
Property Value
Type | Description |
---|---|
Radian |
Declaration
C#Copypublic static Radian DirectionDown { get; }
Property Value
Type | Description |
---|---|
Radian |
Declaration
C#Copypublic static Radian DirectionHorizontal { get; }
Property Value
Type | Description |
---|---|
Radian |
Declaration
C#Copypublic static Radian DirectionLeft { get; }
Property Value
Type | Description |
---|---|
Radian |
Declaration
C#Copypublic static Radian DirectionRight { get; }
Property Value
Type | Description |
---|---|
Radian |
Declaration
C#Copypublic static Radian DirectionUp { get; }
Property Value
Type | Description |
---|---|
Radian |
DirectionVertical
For an up and down pan (-0.5 * PI Radians). Useful for AddDirection().
Declaration
C#Copypublic static Radian DirectionVertical { get; }
Property Value
Type | Description |
---|---|
Radian |
Declaration
C#Copypublic Vector2 LocalDisplacement { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 LocalPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 LocalVelocity { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic bool Panning { get; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copypublic Vector2 ScreenDisplacement { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 ScreenPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 ScreenVelocity { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Methods
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#Copypublic void AddAngle(Radian angle)
Parameters
Type | Name | Description |
---|---|---|
Radian | angle | The angle that pan should be allowed |
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#Copypublic 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 |
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#Copypublic void AddDirection(Radian direction)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The direction of panning required |
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#Copypublic void AddDirection(Radian direction, Radian threshold)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The direction of panning required |
Radian | threshold | The threshold |
Declaration
C#Copypublic void ClearAngles()
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type |
Overrides
GetAngleCount()
Returns the count of angles that this pan gesture detector emits a signal.
Declaration
C#Copypublic uint GetAngleCount()
Returns
Type | Description |
---|---|
UInt32 | The gesture detector has been initialized. |
GetMaximumMotionEventAge()
Retrieves the maximum age for the pan gesture motion as milliseconds.
Declaration
C#Copypublic uint GetMaximumMotionEventAge()
Returns
Type | Description |
---|---|
UInt32 | The maximum age of motion events as milliseconds |
GetMaximumTouchesRequired()
Retrieves the maximum number of touches required for the pan gesture to be detected.
Declaration
C#Copypublic uint GetMaximumTouchesRequired()
Returns
Type | Description |
---|---|
UInt32 | The maximum touches required |
GetMinimumTouchesRequired()
Retrieves the minimum number of touches required for the pan gesture to be detected.
Declaration
C#Copypublic uint GetMinimumTouchesRequired()
Returns
Type | Description |
---|---|
UInt32 | The minimum touches required |
Declaration
C#Copyprotected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type | Name | Description |
---|---|---|
Tizen.System.Runtime.InteropServices.HandleRef | swigCPtr |
Overrides
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#Copypublic void RemoveAngle(Radian angle)
Parameters
Type | Name | Description |
---|---|---|
Radian | angle | The angle to remove |
RemoveDirection(Radian)
Removes the two angles that make up the direction from the container.
Declaration
C#Copypublic void RemoveDirection(Radian direction)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The direction to remove |
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#Copypublic void SetMaximumMotionEventAge(uint maximumAgeMilliSecond)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | maximumAgeMilliSecond | Maximum age of motion events as milliseconds |
SetMaximumTouchesRequired(UInt32)
This is the maximum number of touches required for the pan gesture to be detected.
Declaration
C#Copypublic void SetMaximumTouchesRequired(uint maximum)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | maximum | Maximum touches required |
SetMinimumTouchesRequired(UInt32)
This is the minimum number of touches required for the pan gesture to be detected.
Declaration
C#Copypublic void SetMinimumTouchesRequired(uint minimum)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | minimum | Minimum touches required |
SetPanGestureProperties(PanGesture)
Allows setting of the pan properties that are returned in constraints.
Declaration
C#Copypublic static void SetPanGestureProperties(PanGesture pan)
Parameters
Type | Name | Description |
---|---|---|
PanGesture | pan | The pan gesture to set |
Events
Detected
This signal is emitted when the specified pan is detected on the attached view.
Declaration
C#Copypublic event DaliEventHandler<object, PanGestureDetector.DetectedEventArgs> Detected
Event Type
Type | Description |
---|---|
DaliEventHandler<Object, PanGestureDetector.DetectedEventArgs> |