Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Dali::Internal::PanGestureDetector Class Reference

This class looks for panning (or dragging) gestures. More...

#include <pan-gesture-detector-impl.h>

Inheritance diagram for Dali::Internal::PanGestureDetector:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::PanGestureDetector:
Collaboration graph
[legend]

Public Types

typedef
Dali::PanGestureDetector::AngleThresholdPair 
AngleThresholdPair
 
typedef std::vector
< AngleThresholdPair
AngleContainer
 

Public Member Functions

 PanGestureDetector ()
 Construct a new PanGestureDetector. More...
 
void SetMinimumTouchesRequired (unsigned int minimum)
 This is the minimum number of touches required for the pan gesture to be detected. More...
 
void SetMaximumTouchesRequired (unsigned int maximum)
 This is the maximum number of touches required for the pan gesture to be detected. More...
 
unsigned int GetMinimumTouchesRequired () const
 Retrieves the minimum number of touches required for the pan gesture to be detected. More...
 
unsigned int GetMaximumTouchesRequired () const
 Retrieves the maximum number of touches required for the pan gesture to be detected. More...
 
void AddAngle (Radian angle, Radian threshold)
 The pan gesture is only emitted if the pan occurs in the direction specified by this method with a +/- threshold allowance. More...
 
void AddDirection (Radian direction, Radian threshold)
 A helper method for adding bi-directional angles where the pan should take place. More...
 
size_t GetAngleCount () const
 Returns the count of angles that this pan gesture detector emits a signal. More...
 
AngleThresholdPair GetAngle (size_t index) const
 Returns the angle by index that this pan gesture detector emits a signal. More...
 
void ClearAngles ()
 Clears any directional angles that are used by the gesture detector. More...
 
void RemoveAngle (Radian angle)
 Removes the angle specified from the container. More...
 
void RemoveDirection (Radian direction)
 Removes the two angles that make up the direction from the container. More...
 
bool RequiresDirectionalPan () const
 Checks whether the pan gesture detector requires a directional pan for emission. More...
 
bool CheckAngleAllowed (Radian angle) const
 Checks whether the given pan angle is allowed for this gesture detector. More...
 
void EmitPanGestureSignal (Dali::Actor actor, const PanGesture &pan)
 Called by the PanGestureProcessor when a pan gesture event occurs within the bounds of our attached actor. More...
 
void SetSceneObject (const SceneGraph::PanGesture *object)
 Called by the PanGestureProcessor to set the scene object. More...
 
Dali::PanGestureDetector::DetectedSignalTypeDetectedSignal ()
 This signal is emitted when the pan gesture is detected on the attached actor. More...
 
- Public Member Functions inherited from Dali::Internal::GestureDetector
void Attach (Actor &actor)
 Attaches an actor to the gesture. More...
 
void Detach (Actor &actor)
 Detaches the attached actor from the gesture detector. More...
 
void DetachAll ()
 Detaches all the actors that have been attached to the gesture detector. More...
 
size_t GetAttachedActorCount () const
 Returns the number of actors attached to the gesture detector. More...
 
Dali::Actor GetAttachedActor (size_t index) const
  More...
 
const
GestureDetectorActorContainer
GetAttachedActorPointers () const
 Returns a const reference to the container of attached actor pointers. More...
 
Gesture::Type GetType () const
 Retrieves the type of GestureDetector. More...
 
bool IsAttached (Actor &actor) const
 Checks if the specified actor is still attached. More...
 
- Public Member Functions inherited from Dali::Internal::Object
 Object ()
 Constructor. More...
 
virtual void AddObserver (Observer &observer)
 Add an observer to the object. More...
 
virtual void RemoveObserver (Observer &observer)
 Remove an observer from the object. More...
 
virtual bool Supports (Capability capability) const
 Query whether an handle supports a given capability. More...
 
virtual unsigned int GetPropertyCount () const
 Query how many properties are provided by an handle. More...
 
virtual std::string GetPropertyName (Property::Index index) const
 Query the name of a property. More...
 
virtual Property::Index GetPropertyIndex (const std::string &name) const
 Query the index of a property. More...
 
virtual bool IsPropertyWritable (Property::Index index) const
 Query whether a property can be set using SetProperty(). More...
 
virtual bool IsPropertyAnimatable (Property::Index index) const
 Query whether a writable property can be the target of an animation or constraint. More...
 
virtual bool IsPropertyAConstraintInput (Property::Index index) const
 Query whether a property can be used as in input to a constraint. More...
 
virtual Property::Type GetPropertyType (Property::Index index) const
 Query the type of a property. More...
 
virtual void SetProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of an existing property. More...
 
virtual Property::Value GetProperty (Property::Index index) const
 Retrieve a property value. More...
 
virtual void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the property indices for this object (including custom properties). More...
 
virtual Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue)
 Register a new animatable property. More...
 
virtual Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue, Property::AccessMode accessMode)
  More...
 
virtual Dali::PropertyNotification AddPropertyNotification (Property::Index index, int componentIndex, const Dali::PropertyCondition &condition)
 Add a property notification to this object. More...
 
virtual void RemovePropertyNotification (Dali::PropertyNotification propertyNotification)
 Remove a property notification from this object. More...
 
virtual void RemovePropertyNotifications ()
 Remove all property notifications from this object. More...
 
void AddUniformMapping (Property::Index propertyIndex, const std::string &uniformName) const
  More...
 
void RemoveUniformMapping (const std::string &uniformName)
  More...
 
void ApplyConstraint (ConstraintBase &constraint)
 Apply a constraint to an Object. More...
 
void RemoveConstraint (ConstraintBase &constraint)
 Remove one constraint from an Object. More...
 
void RemoveConstraints ()
 Remove all constraints from a Object. More...
 
void RemoveConstraints (unsigned int tag)
 Remove all constraints from a Object with a matching tag. More...
 
void SetTypeInfo (const TypeInfo *typeInfo)
 Called by TypeInfo to set the type-info that this object-impl is created by. More...
 
unsigned int CustomPropertyStartIndex ()
 
virtual int GetPropertyComponentIndex (Property::Index index) const
 Query whether the property is a component of a scene-graph property. More...
 
- Public Member Functions inherited from Dali::BaseObject
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
bool DoConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, FunctorDelegate *functorDelegate)
 Not intended for application developers. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Static Public Member Functions

static PanGestureDetectorPtr New ()
 Create a new gesture detector. More...
 
static bool DoConnectSignal (BaseObject *object, ConnectionTrackerInterface *tracker, const std::string &signalName, FunctorDelegate *functor)
 Connects a callback function with the object's signals. More...
 
static void SetPanGestureProperties (const PanGesture &pan)
 Allows setting of the pan properties that are returned in constraints. More...
 

Protected Member Functions

virtual ~PanGestureDetector ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::Internal::GestureDetector
 GestureDetector (Gesture::Type mType)
 Construct a new GestureDetector. More...
 
virtual ~GestureDetector ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::Internal::Object
virtual ~Object ()
 A reference counted object may only be deleted by calling Unreference() More...
 
void OnSceneObjectAdd ()
 Called immediately by derived classes, after the scene-object has been created & passed to the scene-graph. More...
 
void OnSceneObjectRemove ()
 Called by derived classes, shortly before send a message to remove the scene-object. More...
 
virtual void OnPropertySet (Property::Index index, Property::Value propertyValue)
 For use in derived classes. More...
 
const TypeInfoGetTypeInfo () const
 Retrieves the TypeInfo for this object. More...
 
CustomPropertyMetadataFindCustomProperty (Property::Index index) const
 Helper to find custom property. More...
 
AnimatablePropertyMetadataFindAnimatableProperty (Property::Index index) const
 Helper to find animatable property. More...
 
Property::Index RegisterSceneGraphProperty (const std::string &name, Property::Index index, const Property::Value &propertyValue) const
 Helper to register a scene-graph property. More...
 
AnimatablePropertyMetadataRegisterAnimatableProperty (Property::Index index) const
 Check whether the animatable property is registered already, if not then register one. More...
 
EventThreadServicesGetEventThreadServices ()
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread. More...
 
const EventThreadServicesGetEventThreadServices () const
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread This is intentionally inline for performance reasons. More...
 
- Protected Member Functions inherited from Dali::BaseObject
 BaseObject ()
 Default constructor. More...
 
virtual ~BaseObject ()
 A reference counted object may only be deleted by calling Unreference(). More...
 
void RegisterObject ()
 Registers the object as created with the Object registry. More...
 
void UnregisterObject ()
 Unregisters the object from Object registry. More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 
- Protected Member Functions inherited from Dali::Internal::Object::Observer
virtual ~Observer ()
 Virtual destructor. More...
 

Private Member Functions

 PanGestureDetector (const PanGestureDetector &)
 
PanGestureDetectoroperator= (const PanGestureDetector &rhs)
 
virtual void OnActorAttach (Actor &actor)
 For use in derived classes, called after an actor is attached. More...
 
virtual void OnActorDetach (Actor &actor)
 For use in derived classes, called after an actor is detached. More...
 
virtual void OnActorDestroyed (Object &object)
 For use in derived classes, called when an attached actor is destroyed. More...
 
virtual unsigned int GetDefaultPropertyCount () const
 Query how many default properties the derived class supports. More...
 
virtual void GetDefaultPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the indices that are associated with the default properties supported by the derived class. More...
 
virtual const char * GetDefaultPropertyName (Property::Index index) const
 Query how many default properties the derived class supports. More...
 
virtual Property::Index GetDefaultPropertyIndex (const std::string &name) const
 Query the index of a default property. More...
 
virtual bool IsDefaultPropertyWritable (Property::Index index) const
 Query whether a default property is writable. More...
 
virtual bool IsDefaultPropertyAnimatable (Property::Index index) const
 Query whether a default property is animatable. More...
 
virtual bool IsDefaultPropertyAConstraintInput (Property::Index index) const
 Query whether a default property can be used as an input to a constraint. More...
 
virtual Property::Type GetDefaultPropertyType (Property::Index index) const
 Query the type of a default property. More...
 
virtual void SetDefaultProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of a default property. More...
 
virtual Property::Value GetDefaultProperty (Property::Index index) const
 Retrieve a default property value. More...
 
virtual const
SceneGraph::PropertyOwner
GetSceneObject () const
 Retrieve the scene-graph object added by this object. More...
 
virtual const
SceneGraph::PropertyBase
GetSceneObjectAnimatableProperty (Property::Index index) const
 Retrieve an animatable property owned by the scene-graph object. More...
 
virtual const PropertyInputImplGetSceneObjectInputProperty (Property::Index index) const
 Retrieve a constraint input-property owned by the scene-graph object. More...
 

Private Attributes

Dali::PanGestureDetector::DetectedSignalType mDetectedSignal
 
unsigned int mMinimumTouches
 The minimum number of fingers required to be touching for pan. More...
 
unsigned int mMaximumTouches
 The maximum number of fingers required to be touching for pan. More...
 
AngleContainer mAngleContainer
 A container of all angles allowed for pan to occur. More...
 
const SceneGraph::PanGesturemSceneObject
 Not owned. More...
 

Additional Inherited Members

- Protected Attributes inherited from Dali::Internal::GestureDetector
Gesture::Type mType
 The gesture detector will detect this type of gesture. More...
 
GestureDetectorActorContainer mAttachedActors
 Object::Observer is used to provide weak-pointer behaviour. More...
 
GestureEventProcessormGestureEventProcessor
 A reference to the gesture event processor. More...
 

Detailed Description

This class looks for panning (or dragging) gestures.

The user will be pressing one or more fingers on an actor while they pan it.

The application programmer can use this gesture detector as follows:

detector.Attach(myActor);
detector.DetectedSignal().Connect(this, &MyApplication::OnPan);
// Detect pan gesture for single and double touch.
detector.SetMaximumTouchesRequired(2);

.0

See Also
PanGesture

Signals

Signal Name Method
panDetected DetectedSignal()

Definition at line 48 of file pan-gesture-detector-impl.h.

Member Typedef Documentation

Definition at line 53 of file pan-gesture-detector-impl.h.

Definition at line 52 of file pan-gesture-detector-impl.h.

Constructor & Destructor Documentation

Dali::Internal::PanGestureDetector::PanGestureDetector ( )

Construct a new PanGestureDetector.

Definition at line 100 of file pan-gesture-detector-impl.cpp.

Referenced by New().

Here is the caller graph for this function:

Dali::Internal::PanGestureDetector::~PanGestureDetector ( )
protectedvirtual

A reference counted object may only be deleted by calling Unreference()

Definition at line 108 of file pan-gesture-detector-impl.cpp.

Dali::Internal::PanGestureDetector::PanGestureDetector ( const PanGestureDetector )
private

Member Function Documentation

void Dali::Internal::PanGestureDetector::AddAngle ( Radian  angle,
Radian  threshold 
)

The pan gesture is only emitted if the pan occurs in the direction specified by this method with a +/- threshold allowance.

The angle is from -180 -> 0 -> 180 degrees (or -M_PI -> 0 -> M_PI in radians) i.e:

-90.0f ( -0.5f * PI )
|
|
180.0f ( PI ) ------------- 0.0f ( 0.0f )
|
|
90.0f ( 0.5f * PI )

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.

.0

Parameters
[in]angleThe angle that pan should be allowed.
[in]thresholdThe threshold around that angle.
Precondition
The gesture detector has been initialized.
Note
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.
If an angle outside the range above is given, then it is wrapped within the range, i.e. 190 degrees becomes -170 degrees and 370 degrees becomes 10 degrees.
As long as you specify the type, you can also pass in a Dali::Degree to this method.
If no threshold is provided, then the default threshold (PI * 0.25) is used.
If the threshold is greater than PI, then PI will be used as the threshold.

Definition at line 160 of file pan-gesture-detector-impl.cpp.

References DALI_LOG_INFO, mAngleContainer, Dali::Math::PI, and Dali::WrapInDomain().

Referenced by AddDirection().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PanGestureDetector::AddDirection ( Radian  direction,
Radian  threshold 
)

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.

.0

Parameters
[in]directionThe direction of panning required.
[in]thresholdThe threshold.
Precondition
The gesture detector has been initialized.
Note
If a direction outside the range above is given, then it is wrapped within the range, i.e. 190 degrees becomes -170 degrees and 370 degrees becomes 10 degrees.
If no threshold is provided, then the default threshold (PI * 0.25) is used.
If the threshold is greater than PI, then PI will be used as the threshold.
As long as you specify the type, you can also pass in a Dali::Degree to this method.
See Also
AddAngle

Definition at line 180 of file pan-gesture-detector-impl.cpp.

References AddAngle(), and Dali::Internal::anonymous_namespace{pan-gesture-detector-impl.cpp}::GetOppositeAngle().

Here is the call graph for this function:

bool Dali::Internal::PanGestureDetector::CheckAngleAllowed ( Radian  angle) const

Checks whether the given pan angle is allowed for this gesture detector.

Parameters
[in]angleThe angle to check.

Definition at line 243 of file pan-gesture-detector-impl.cpp.

References DALI_LOG_INFO, mAngleContainer, Dali::Math::PI, and Dali::WrapInDomain().

Referenced by Dali::Internal::PanGestureProcessor::CheckGestureDetector().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PanGestureDetector::ClearAngles ( )

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

After this, the pan gesture will be emitted for a pan in ANY direction. .0

Precondition
The gesture detector has been initialized.

Definition at line 208 of file pan-gesture-detector-impl.cpp.

References mAngleContainer.

Dali::PanGestureDetector::DetectedSignalType& Dali::Internal::PanGestureDetector::DetectedSignal ( )
inline

This signal is emitted when the pan gesture is detected on the attached actor.

A callback of the following type may be connected:

void YourCallbackName( Actor actor, const PanGesture& gesture );

.0

Returns
The signal to connect to.
Precondition
The gesture detector has been initialized.

Definition at line 158 of file pan-gesture-detector-impl.h.

References mDetectedSignal.

Referenced by DoConnectSignal().

Here is the caller graph for this function:

bool Dali::Internal::PanGestureDetector::DoConnectSignal ( BaseObject object,
ConnectionTrackerInterface tracker,
const std::string &  signalName,
FunctorDelegate functor 
)
static

Connects a callback function with the object's signals.

Parameters
[in]objectThe object providing the signal.
[in]trackerUsed to disconnect the signal.
[in]signalNameThe signal to connect to.
[in]functorA newly allocated FunctorDelegate.
Returns
True if the signal was connected.
Postcondition
If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.

Definition at line 291 of file pan-gesture-detector-impl.cpp.

References DetectedSignal(), and Dali::Internal::anonymous_namespace{pan-gesture-detector-impl.cpp}::SIGNAL_PAN_DETECTED.

Here is the call graph for this function:

void Dali::Internal::PanGestureDetector::EmitPanGestureSignal ( Dali::Actor  actor,
const PanGesture pan 
)

Called by the PanGestureProcessor when a pan gesture event occurs within the bounds of our attached actor.

Parameters
[in]actorThe panned actor.
[in]panThe pan gesture.

Definition at line 273 of file pan-gesture-detector-impl.cpp.

References DALI_LOG_INFO, and mDetectedSignal.

Referenced by Dali::Internal::PanGestureProcessor::EmitPanSignal().

Here is the caller graph for this function:

PanGestureDetector::AngleThresholdPair Dali::Internal::PanGestureDetector::GetAngle ( size_t  index) const

Returns the angle by index that this pan gesture detector emits a signal.

.0

Returns
An angle threshold pair, or a zero valued angle pair when index is invalid.
Precondition
The gesture detector has been initialized.
The index is less than GetAngleCount()

Definition at line 195 of file pan-gesture-detector-impl.cpp.

References mAngleContainer.

size_t Dali::Internal::PanGestureDetector::GetAngleCount ( ) const

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

.0

Returns
The count.
Precondition
The gesture detector has been initialized.

Definition at line 190 of file pan-gesture-detector-impl.cpp.

References mAngleContainer.

Property::Value Dali::Internal::PanGestureDetector::GetDefaultProperty ( Property::Index  index) const
privatevirtual
unsigned int Dali::Internal::PanGestureDetector::GetDefaultPropertyCount ( ) const
privatevirtual

Query how many default properties the derived class supports.

Returns
The number of default properties.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 329 of file pan-gesture-detector-impl.cpp.

Property::Index Dali::Internal::PanGestureDetector::GetDefaultPropertyIndex ( const std::string &  name) const
privatevirtual

Query the index of a default property.

Parameters
[in]nameThe name of the property.
Returns
The index of the property, or Property::INVALID_INDEX if no default property exists with the given name.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 356 of file pan-gesture-detector-impl.cpp.

References Dali::Property::INVALID_INDEX.

void Dali::Internal::PanGestureDetector::GetDefaultPropertyIndices ( Property::IndexContainer indices) const
privatevirtual

Retrieve all the indices that are associated with the default properties supported by the derived class.

Returns
A container of default property indices.
Note
The deriving class must not modify the existing elements in the container.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 334 of file pan-gesture-detector-impl.cpp.

References Dali::DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX, Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Vector< T, IsTrivialType >::Reserve().

Here is the call graph for this function:

const char * Dali::Internal::PanGestureDetector::GetDefaultPropertyName ( Property::Index  index) const
privatevirtual

Query how many default properties the derived class supports.

Returns
The number of default properties.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 345 of file pan-gesture-detector-impl.cpp.

References Dali::DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX.

Property::Type Dali::Internal::PanGestureDetector::GetDefaultPropertyType ( Property::Index  index) const
privatevirtual

Query the type of a default property.

Parameters
[in]indexThe index of the property.
Returns
The type of the property.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 391 of file pan-gesture-detector-impl.cpp.

References Dali::DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX, and Dali::Property::NONE.

unsigned int Dali::Internal::PanGestureDetector::GetMaximumTouchesRequired ( ) const

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

.0

Returns
The maximum touches required.
Precondition
The gesture detector has been initialized.

Definition at line 155 of file pan-gesture-detector-impl.cpp.

References mMaximumTouches.

Referenced by Dali::Internal::PanGestureProcessor::AddGestureDetector(), Dali::Internal::PanGestureProcessor::CheckGestureDetector(), Dali::Internal::anonymous_namespace{pan-gesture-processor.cpp}::IsNotAttachedAndOutsideTouchesRangeFunctor::operator()(), and Dali::Internal::PanGestureProcessor::UpdateDetection().

Here is the caller graph for this function:

unsigned int Dali::Internal::PanGestureDetector::GetMinimumTouchesRequired ( ) const

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

.0

Returns
The minimum touches required.
Precondition
The gesture detector has been initialized.

Definition at line 150 of file pan-gesture-detector-impl.cpp.

References mMinimumTouches.

Referenced by Dali::Internal::PanGestureProcessor::AddGestureDetector(), Dali::Internal::PanGestureProcessor::CheckGestureDetector(), and Dali::Internal::PanGestureProcessor::UpdateDetection().

Here is the caller graph for this function:

const SceneGraph::PropertyOwner * Dali::Internal::PanGestureDetector::GetSceneObject ( ) const
privatevirtual

Retrieve the scene-graph object added by this object.

Returns
A pointer to the object, or NULL if no object has been added to the scene-graph.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 517 of file pan-gesture-detector-impl.cpp.

References mSceneObject.

const SceneGraph::PropertyBase * Dali::Internal::PanGestureDetector::GetSceneObjectAnimatableProperty ( Property::Index  index) const
privatevirtual

Retrieve an animatable property owned by the scene-graph object.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
A dereferenceable pointer to a property, or NULL if a scene-object does not exist with this property.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 523 of file pan-gesture-detector-impl.cpp.

References DALI_ASSERT_ALWAYS, and Dali::Internal::Object::IsPropertyAnimatable().

Here is the call graph for this function:

const PropertyInputImpl * Dali::Internal::PanGestureDetector::GetSceneObjectInputProperty ( Property::Index  index) const
privatevirtual
bool Dali::Internal::PanGestureDetector::IsDefaultPropertyAConstraintInput ( Property::Index  index) const
privatevirtual

Query whether a default property can be used as an input to a constraint.

Parameters
[in]indexThe index of the property.
Returns
True if the property can be used as an input to a constraint.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 385 of file pan-gesture-detector-impl.cpp.

References Dali::DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX.

bool Dali::Internal::PanGestureDetector::IsDefaultPropertyAnimatable ( Property::Index  index) const
privatevirtual

Query whether a default property is animatable.

This determines whether the property can be the target of an animation or constraint.

Parameters
[in]indexThe index of the property.
Returns
True if the property is animatable.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 379 of file pan-gesture-detector-impl.cpp.

References Dali::DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX.

bool Dali::Internal::PanGestureDetector::IsDefaultPropertyWritable ( Property::Index  index) const
privatevirtual

Query whether a default property is writable.

Parameters
[in]indexThe index of the property.
Returns
True if the property is animatable.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 373 of file pan-gesture-detector-impl.cpp.

References Dali::DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX.

PanGestureDetectorPtr Dali::Internal::PanGestureDetector::New ( )
static

Create a new gesture detector.

Returns
A smart-pointer to the newly allocated detector.

Definition at line 95 of file pan-gesture-detector-impl.cpp.

References PanGestureDetector().

Referenced by Dali::PanGestureDetector::New().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PanGestureDetector::OnActorAttach ( Actor actor)
privatevirtual

For use in derived classes, called after an actor is attached.

Parameters
[in]actorThe actor that is being attached.

Implements Dali::Internal::GestureDetector.

Definition at line 314 of file pan-gesture-detector-impl.cpp.

void Dali::Internal::PanGestureDetector::OnActorDestroyed ( Object object)
privatevirtual

For use in derived classes, called when an attached actor is destroyed.

Parameters
[in]objectThe object (Actor's base class) that has been destroyed.
Note
Derived classes should not call any Actor specific APIs in this method as the Actor's destructor would have already been called.

Implements Dali::Internal::GestureDetector.

Definition at line 324 of file pan-gesture-detector-impl.cpp.

void Dali::Internal::PanGestureDetector::OnActorDetach ( Actor actor)
privatevirtual

For use in derived classes, called after an actor is detached.

Parameters
[in]actorThe actor that is being detached.

Implements Dali::Internal::GestureDetector.

Definition at line 319 of file pan-gesture-detector-impl.cpp.

PanGestureDetector& Dali::Internal::PanGestureDetector::operator= ( const PanGestureDetector rhs)
private
void Dali::Internal::PanGestureDetector::RemoveAngle ( Radian  angle)

Removes the angle specified from the container.

.0

Parameters
[in]angleThe angle to remove.
Precondition
The gesture detector has been initialized.
Note
This will only remove the first instance of the angle found from the container.
If an angle outside the range in AddAngle() is given, then the value is wrapped within the range and that is removed.

Definition at line 213 of file pan-gesture-detector-impl.cpp.

References mAngleContainer, Dali::Math::PI, and Dali::WrapInDomain().

Referenced by RemoveDirection().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PanGestureDetector::RemoveDirection ( Radian  direction)

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

.0

Parameters
[in]directionThe direction to remove.
Precondition
The gesture detector has been initialized.
Note
If a direction outside the range in AddAngle() is given, then the value is wrapped within the range and that is removed.

Definition at line 227 of file pan-gesture-detector-impl.cpp.

References Dali::Internal::anonymous_namespace{pan-gesture-detector-impl.cpp}::GetOppositeAngle(), and RemoveAngle().

Here is the call graph for this function:

bool Dali::Internal::PanGestureDetector::RequiresDirectionalPan ( ) const

Checks whether the pan gesture detector requires a directional pan for emission.

Returns
true, if directional panning required, false otherwise.

Definition at line 237 of file pan-gesture-detector-impl.cpp.

References mAngleContainer.

Referenced by Dali::Internal::PanGestureProcessor::CheckGestureDetector().

Here is the caller graph for this function:

void Dali::Internal::PanGestureDetector::SetDefaultProperty ( Property::Index  index,
const Property::Value propertyValue 
)
privatevirtual

Set the value of a default property.

Precondition
The property types match i.e. propertyValue.GetType() is equal to GetPropertyType(index).
Parameters
[in]indexThe index of the property.
[in]propertyValueThe new value of the property.

Reimplemented from Dali::Internal::GestureDetector.

Definition at line 405 of file pan-gesture-detector-impl.cpp.

void Dali::Internal::PanGestureDetector::SetMaximumTouchesRequired ( unsigned int  maximum)

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

.0

Parameters
[in]maximumMaximum touches required.
Precondition
The gesture detector has been initialized.
Note
The default maximum is '1'.

Definition at line 131 of file pan-gesture-detector-impl.cpp.

References DALI_ASSERT_ALWAYS, DALI_LOG_INFO, Dali::Internal::GestureEventProcessor::GestureDetectorUpdated(), Dali::Internal::GestureDetector::mAttachedActors, Dali::Internal::GestureDetector::mGestureEventProcessor, and mMaximumTouches.

Here is the call graph for this function:

void Dali::Internal::PanGestureDetector::SetMinimumTouchesRequired ( unsigned int  minimum)

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

.0

Parameters
[in]minimumMinimum touches required.
Precondition
The gesture detector has been initialized.
Note
The default minimum is '1'.

Definition at line 112 of file pan-gesture-detector-impl.cpp.

References DALI_ASSERT_ALWAYS, DALI_LOG_INFO, Dali::Internal::GestureEventProcessor::GestureDetectorUpdated(), Dali::Internal::GestureDetector::mAttachedActors, Dali::Internal::GestureDetector::mGestureEventProcessor, and mMinimumTouches.

Here is the call graph for this function:

void Dali::Internal::PanGestureDetector::SetPanGestureProperties ( const PanGesture pan)
static

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

.0

Parameters
[in]panThe pan gesture to set.
Note
If a normal pan is taking place, then any value set is ignored.

Definition at line 309 of file pan-gesture-detector-impl.cpp.

References Dali::Internal::ThreadLocalStorage::Get(), Dali::Internal::ThreadLocalStorage::GetGestureEventProcessor(), and Dali::Internal::GestureEventProcessor::SetGestureProperties().

Referenced by Dali::PanGestureDetector::SetPanGestureProperties().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PanGestureDetector::SetSceneObject ( const SceneGraph::PanGesture object)

Called by the PanGestureProcessor to set the scene object.

Parameters
[in]objectThe scene object.

Definition at line 286 of file pan-gesture-detector-impl.cpp.

References mSceneObject.

Referenced by Dali::Internal::PanGestureProcessor::AddGestureDetector().

Here is the caller graph for this function:

Member Data Documentation

AngleContainer Dali::Internal::PanGestureDetector::mAngleContainer
private

A container of all angles allowed for pan to occur.

Definition at line 288 of file pan-gesture-detector-impl.h.

Referenced by AddAngle(), CheckAngleAllowed(), ClearAngles(), GetAngle(), GetAngleCount(), RemoveAngle(), and RequiresDirectionalPan().

Dali::PanGestureDetector::DetectedSignalType Dali::Internal::PanGestureDetector::mDetectedSignal
private

Definition at line 283 of file pan-gesture-detector-impl.h.

Referenced by DetectedSignal(), and EmitPanGestureSignal().

unsigned int Dali::Internal::PanGestureDetector::mMaximumTouches
private

The maximum number of fingers required to be touching for pan.

Definition at line 286 of file pan-gesture-detector-impl.h.

Referenced by GetMaximumTouchesRequired(), and SetMaximumTouchesRequired().

unsigned int Dali::Internal::PanGestureDetector::mMinimumTouches
private

The minimum number of fingers required to be touching for pan.

Definition at line 285 of file pan-gesture-detector-impl.h.

Referenced by GetMinimumTouchesRequired(), and SetMinimumTouchesRequired().

const SceneGraph::PanGesture* Dali::Internal::PanGestureDetector::mSceneObject
private

The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali