Class PanGestureDetector

    Definition

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

    This class emits a signals when a pan gesture occurs.

    public class PanGestureDetector : GestureDetector, IDynamicResourceHandler, INameScope, System.IDisposable
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    GestureDetector
    PanGestureDetector
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Constructors

    View Source

    PanGestureDetector()

    Creates an initialized PanGestureDetector.

    Declaration
    public PanGestureDetector()
    View Source

    PanGestureDetector(PanGestureDetector)

    The copy constructor.

    Declaration
    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
    public static Radian DefaultThreshold { get; }
    Property Value
    Type Description
    Radian
    View Source

    DirectionDown

    For a down pan (0.5 * PI Radians).

    Declaration
    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
    public static Radian DirectionHorizontal { get; }
    Property Value
    Type Description
    Radian
    View Source

    DirectionLeft

    For a left pan (-PI Radians).

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

    DirectionRight

    For a right pan (0 Radians).

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

    DirectionUp

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

    Declaration
    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
    public static Radian DirectionVertical { get; }
    Property Value
    Type Description
    Radian
    View Source

    LocalDisplacement

    Retrieves the local displacement

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

    LocalPosition

    Retrieves the local position.

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

    LocalVelocity

    Retrieves the local velocity.

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

    Panning

    Retrieves the panning flag.

    Declaration
    public bool Panning { get; }
    Property Value
    Type Description
    bool
    View Source

    ScreenDisplacement

    Retrieves the screen displacement.

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

    ScreenPosition

    Retrieves the screen position.

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

    ScreenVelocity

    Retrieves the screen velocity.

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

    Methods

    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
    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

    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
    public void AddAngle(Radian angle)
    Parameters
    Type Name Description
    Radian angle

    The angle that pan should be allowed

    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
    public void AddDirection(Radian direction, Radian threshold)
    Parameters
    Type Name Description
    Radian direction

    The direction of panning required

    Radian threshold

    The threshold

    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
    public void AddDirection(Radian direction)
    Parameters
    Type Name Description
    Radian direction

    The direction of panning required

    View Source

    ClearAngles()

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

    Declaration
    public void ClearAngles()
    View Source

    Dispose(DisposeTypes)

    override it to clean-up your own resources.

    Declaration
    protected override void Dispose(DisposeTypes type)
    Parameters
    Type Name Description
    DisposeTypes type
    Overrides
    BaseHandle.Dispose(DisposeTypes)
    View Source

    GetAngleCount()

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

    Declaration
    public uint GetAngleCount()
    Returns
    Type Description
    uint

    The gesture detector has been initialized.

    View Source

    GetMaximumMotionEventAge()

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

    Declaration
    public uint GetMaximumMotionEventAge()
    Returns
    Type Description
    uint

    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
    public uint GetMaximumTouchesRequired()
    Returns
    Type Description
    uint

    The maximum touches required

    View Source

    GetMinimumTouchesRequired()

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

    Declaration
    public uint GetMinimumTouchesRequired()
    Returns
    Type Description
    uint

    The minimum touches required

    View Source

    ReleaseSwigCPtr(HandleRef)

    Declaration
    protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
    Parameters
    Type Name Description
    System.Runtime.InteropServices.HandleRef swigCPtr
    Overrides
    GestureDetector.ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef)
    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
    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
    public void RemoveDirection(Radian direction)
    Parameters
    Type Name Description
    Radian direction

    The direction to remove

    View Source

    SetMaximumMotionEventAge(uint)

    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
    public void SetMaximumMotionEventAge(uint maximumAgeMilliSecond)
    Parameters
    Type Name Description
    uint maximumAgeMilliSecond

    Maximum age of motion events as milliseconds

    View Source

    SetMaximumTouchesRequired(uint)

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

    Declaration
    public void SetMaximumTouchesRequired(uint maximum)
    Parameters
    Type Name Description
    uint maximum

    Maximum touches required

    View Source

    SetMinimumTouchesRequired(uint)

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

    Declaration
    public void SetMinimumTouchesRequired(uint minimum)
    Parameters
    Type Name Description
    uint minimum

    Minimum touches required

    View Source

    SetPanGestureProperties(PanGesture)

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

    Declaration
    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
    public event DaliEventHandler<object, PanGestureDetector.DetectedEventArgs> Detected
    Event Type
    Type Description
    DaliEventHandler<object, PanGestureDetector.DetectedEventArgs>

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Extension Methods

    BindableObjectExtensions.SetBinding(BindableObject, BindableProperty, string, BindingMode, IValueConverter, string)
    NameScopeExtensions.FindByName<T>(Element, string)
    EXamlExtensions.LoadFromEXaml<T>(T, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    EXamlExtensions.LoadFromEXamlPath<TXaml>(TXaml, string)
    EXamlExtensions.LoadFromEXamlPath<T>(T, Type)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX