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

Implementation of the Integration::GestureManager. More...

#include <gesture-manager.h>

Inheritance diagram for Dali::Internal::Adaptor::GestureManager:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::Adaptor::GestureManager:
Collaboration graph
[legend]

Public Member Functions

 GestureManager (CoreEventInterface &coreEventInterface, Vector2 screenSize, CallbackManager *callbackManager, EnvironmentOptions &environmentOptions)
 Constructor. More...
 
virtual ~GestureManager ()
 The destructor. More...
 
void SendEvent (const Integration::TouchEvent &event)
 Used by the event handler to send touch events to the Gesture Manager. More...
 
void Stop ()
 Used by the event handler to stop the GestureManager detection. More...
 
void SetMinimumPinchDistance (float distance)
 Sets minimum distance in pixels that the fingers must move towards/away from each other in order to trigger a pinch gesture. More...
 
virtual void Register (const Integration::GestureRequest &request)
 copydoc Dali::Integration::GestureManager::Register(const Integration::GestureRequest&) More...
 
virtual void Unregister (const Integration::GestureRequest &request)
 copydoc Dali::Integration::GestureManager::Unregister(const Integration::GestureRequest&) More...
 
virtual void Update (const Integration::GestureRequest &request)
 copydoc Dali::Integration::GestureManager::Unregister(const Integration::GestureRequest&) More...
 
- Public Member Functions inherited from Dali::Integration::GestureManager
virtual void Register (const GestureRequest &request)=0
 Called by Dali to enable the adaptor to start detecting the required gesture type. More...
 
virtual void Unregister (const GestureRequest &request)=0
 Called by Dali to inform the adaptor that it no longer requires a GestureEvent when the state gesture type is detected. More...
 
virtual void Update (const GestureRequest &request)=0
 Called by Dali to inform the adaptor that the detection parameters of a previously requested gesture have now changed. More...
 

Private Types

typedef std::vector
< GestureDetectorPtr
GestureDetectorContainer
 

Private Member Functions

void DeleteGestureDetector (Gesture::Type type)
 Used to delete the gesture detector of the given type. More...
 

Private Attributes

CoreEventInterfacemCoreEventInterface
 
GestureDetectorContainer mGestureDetectors
 
Vector2 mScreenSize
 
CallbackManagermCallbackManager
 
EnvironmentOptionsmEnvironmentOptions
 
float mMinimumDistanceDelta
 The minimum distance before a pinch is applicable. (-1.0f means pinch detector uses default value) More...
 
bool mRunning
 States whether the GestureManager is running or not. More...
 

Detailed Description

Implementation of the Integration::GestureManager.

Contains a list of adaptor gesture detectors. It passes touch events to each required detector which in turn process them to determine if their corresponding gesture has occurred.

Definition at line 53 of file gesture-manager.h.

Member Typedef Documentation

Definition at line 118 of file gesture-manager.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::GestureManager::GestureManager ( CoreEventInterface coreEventInterface,
Vector2  screenSize,
CallbackManager callbackManager,
EnvironmentOptions environmentOptions 
)

Constructor.

Parameters
[in]coreEventInterfaceUsed to send events to Core.
[in]screenSizeThe size of the screen.
[in]callbackManagerused to install callbacks
[in]environmentOptionsEnvironment Options

Definition at line 98 of file gesture-manager.cpp.

References DALI_LOG_INFO.

Dali::Internal::Adaptor::GestureManager::~GestureManager ( )
virtual

The destructor.

Definition at line 109 of file gesture-manager.cpp.

References DALI_LOG_INFO.

Member Function Documentation

void Dali::Internal::Adaptor::GestureManager::DeleteGestureDetector ( Gesture::Type  type)
private

Used to delete the gesture detector of the given type.

Definition at line 228 of file gesture-manager.cpp.

References DALI_LOG_INFO, and mGestureDetectors.

Referenced by Unregister().

Here is the caller graph for this function:

void Dali::Internal::Adaptor::GestureManager::Register ( const Integration::GestureRequest &  request)
virtual
void Dali::Internal::Adaptor::GestureManager::SendEvent ( const Integration::TouchEvent &  event)

Used by the event handler to send touch events to the Gesture Manager.

Parameters
[in]eventThe latest touch event.

Definition at line 114 of file gesture-manager.cpp.

References DALI_LOG_INFO, mGestureDetectors, and mRunning.

void Dali::Internal::Adaptor::GestureManager::SetMinimumPinchDistance ( float  distance)

Sets minimum distance in pixels that the fingers must move towards/away from each other in order to trigger a pinch gesture.

Parameters
[in]distanceThe minimum pinch distance in pixels

Definition at line 145 of file gesture-manager.cpp.

References DALI_LOG_INFO, mGestureDetectors, mMinimumDistanceDelta, Dali::Gesture::Pinch, and Dali::Internal::Adaptor::PinchGestureDetector::SetMinimumPinchDistance().

Referenced by Dali::Internal::Adaptor::Adaptor::SetMinimumPinchDistance().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::GestureManager::Stop ( )

Used by the event handler to stop the GestureManager detection.

Definition at line 134 of file gesture-manager.cpp.

References DALI_LOG_INFO, mGestureDetectors, and mRunning.

void Dali::Internal::Adaptor::GestureManager::Unregister ( const Integration::GestureRequest &  request)
virtual

copydoc Dali::Integration::GestureManager::Unregister(const Integration::GestureRequest&)

Definition at line 204 of file gesture-manager.cpp.

References DALI_LOG_INFO, DeleteGestureDetector(), and mRunning.

Here is the call graph for this function:

void Dali::Internal::Adaptor::GestureManager::Update ( const Integration::GestureRequest &  request)
virtual

copydoc Dali::Integration::GestureManager::Unregister(const Integration::GestureRequest&)

Definition at line 215 of file gesture-manager.cpp.

References DALI_LOG_INFO, and mGestureDetectors.

Member Data Documentation

CallbackManager* Dali::Internal::Adaptor::GestureManager::mCallbackManager
private

Definition at line 123 of file gesture-manager.h.

CoreEventInterface& Dali::Internal::Adaptor::GestureManager::mCoreEventInterface
private

Definition at line 120 of file gesture-manager.h.

Referenced by Register().

EnvironmentOptions& Dali::Internal::Adaptor::GestureManager::mEnvironmentOptions
private

Definition at line 124 of file gesture-manager.h.

Referenced by Register().

GestureDetectorContainer Dali::Internal::Adaptor::GestureManager::mGestureDetectors
private
float Dali::Internal::Adaptor::GestureManager::mMinimumDistanceDelta
private

The minimum distance before a pinch is applicable. (-1.0f means pinch detector uses default value)

Definition at line 125 of file gesture-manager.h.

Referenced by Register(), and SetMinimumPinchDistance().

bool Dali::Internal::Adaptor::GestureManager::mRunning
private

States whether the GestureManager is running or not.

Definition at line 126 of file gesture-manager.h.

Referenced by Register(), SendEvent(), Stop(), and Unregister().

Vector2 Dali::Internal::Adaptor::GestureManager::mScreenSize
private

Definition at line 122 of file gesture-manager.h.

Referenced by Register().


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