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

Gesture Event Processing: More...

#include <gesture-event-processor.h>

Collaboration diagram for Dali::Internal::GestureEventProcessor:
Collaboration graph
[legend]

Public Member Functions

 GestureEventProcessor (Stage &stage, Integration::GestureManager &gestureManager, Integration::RenderController &renderController)
 Create a gesture event processor. More...
 
 ~GestureEventProcessor ()
 Non-virtual destructor; GestureProcessor is not a base class. More...
 
void ProcessGestureEvent (const Integration::GestureEvent &event)
 This function is called by Core whenever a gesture event occurs. More...
 
void AddGestureDetector (GestureDetector *gestureDetector)
 This method adds the specified gesture detector to the relevant gesture processor. More...
 
void RemoveGestureDetector (GestureDetector *gestureDetector)
 This method removes the specified gesture detector from the relevant gesture processor. More...
 
void GestureDetectorUpdated (GestureDetector *gestureDetector)
 This method informs the appropriate processor that the gesture detector has been updated. More...
 
void SetUpdateRequired ()
 This method is called by GestureDetectors on Started or Continue state events. More...
 
void SetGestureProperties (const Gesture &gesture)
 Called by GestureDetectors to set the gesture properties in the update thread. More...
 
bool NeedsUpdate ()
 Returns true if any GestureDetector requires a Core::Update. More...
 
void EnablePanGestureProfiling ()
 Called to provide pan-gesture profiling information. More...
 
void SetPanGesturePredictionMode (int mode)
 Called to set how pan gestures predict input. More...
 
void SetPanGesturePredictionAmount (unsigned int amount)
 Sets the prediction amount of the pan gesture. More...
 
void SetPanGestureMaximumPredictionAmount (unsigned int amount)
 Sets the upper bound of the prediction amount for clamping. More...
 
void SetPanGestureMinimumPredictionAmount (unsigned int amount)
 Sets the lower bound of the prediction amount for clamping. More...
 
void SetPanGesturePredictionAmountAdjustment (unsigned int amount)
 Sets the prediction amount to adjust when the pan velocity is changed. More...
 
void SetPanGestureSmoothingMode (int mode)
 Called to set how pan gestures smooth input. More...
 
void SetPanGestureSmoothingAmount (float amount)
 Sets the prediction amount of the pan gesture. More...
 

Private Member Functions

 GestureEventProcessor (const GestureEventProcessor &)
 
GestureEventProcessoroperator= (const GestureEventProcessor &rhs)
 

Private Attributes

StagemStage
 
Integration::GestureManagermGestureManager
 
LongPressGestureProcessor mLongPressGestureProcessor
 
PanGestureProcessor mPanGestureProcessor
 
PinchGestureProcessor mPinchGestureProcessor
 
TapGestureProcessor mTapGestureProcessor
 
Integration::RenderControllermRenderController
 
bool mUpdateRequired
 set to true by gesture detectors if they require a Core::Update More...
 

Detailed Description

Gesture Event Processing:

The GestureEventProcessor determines what type of gesture event we have received and sends it to the appropriate gesture processor for processing.

Definition at line 52 of file gesture-event-processor.h.

Constructor & Destructor Documentation

Dali::Internal::GestureEventProcessor::GestureEventProcessor ( Stage stage,
Integration::GestureManager gestureManager,
Integration::RenderController renderController 
)

Create a gesture event processor.

Parameters
[in]stageThe stage.
[in]gestureManagerThe gesture manager
[in]renderControllerThe render controller

Definition at line 40 of file gesture-event-processor.cpp.

Dali::Internal::GestureEventProcessor::~GestureEventProcessor ( )

Non-virtual destructor; GestureProcessor is not a base class.

Definition at line 52 of file gesture-event-processor.cpp.

Dali::Internal::GestureEventProcessor::GestureEventProcessor ( const GestureEventProcessor )
private

Member Function Documentation

void Dali::Internal::GestureEventProcessor::AddGestureDetector ( GestureDetector gestureDetector)
void Dali::Internal::GestureEventProcessor::EnablePanGestureProfiling ( )

Called to provide pan-gesture profiling information.

Definition at line 228 of file gesture-event-processor.cpp.

References Dali::Internal::PanGestureProcessor::EnableProfiling(), and mPanGestureProcessor.

Referenced by Dali::Integration::EnableProfiling().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::GestureDetectorUpdated ( GestureDetector gestureDetector)
bool Dali::Internal::GestureEventProcessor::NeedsUpdate ( )

Returns true if any GestureDetector requires a Core::Update.

Clears the state flag after reading.

Returns
true if any GestureDetector requires a Core::Update

Definition at line 219 of file gesture-event-processor.cpp.

References mUpdateRequired.

GestureEventProcessor& Dali::Internal::GestureEventProcessor::operator= ( const GestureEventProcessor rhs)
private
void Dali::Internal::GestureEventProcessor::ProcessGestureEvent ( const Integration::GestureEvent &  event)
void Dali::Internal::GestureEventProcessor::RemoveGestureDetector ( GestureDetector gestureDetector)
void Dali::Internal::GestureEventProcessor::SetGestureProperties ( const Gesture gesture)

Called by GestureDetectors to set the gesture properties in the update thread.

Parameters
[in]gestureThe gesture whose values will be used in the Update object.
Note
If we are in the middle of processing the gesture being set, then this call is ignored.

Definition at line 190 of file gesture-event-processor.cpp.

References Dali::Gesture::Continuing, DALI_ASSERT_DEBUG, Dali::Gesture::LongPress, mPanGestureProcessor, mRenderController, Dali::Gesture::Pan, Dali::Gesture::Pinch, Dali::Integration::RenderController::RequestUpdate(), Dali::Internal::PanGestureProcessor::SetPanGestureProperties(), SetUpdateRequired(), Dali::Gesture::Started, Dali::Gesture::state, Dali::Gesture::Tap, and Dali::Gesture::type.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetPanGestureMaximumPredictionAmount ( unsigned int  amount)

Sets the upper bound of the prediction amount for clamping.

Parameters
[in]amountThe prediction amount in milliseconds

Definition at line 243 of file gesture-event-processor.cpp.

References mPanGestureProcessor, and Dali::Internal::PanGestureProcessor::SetMaximumPredictionAmount().

Referenced by Dali::Integration::SetPanGestureMaximumPredictionAmount().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetPanGestureMinimumPredictionAmount ( unsigned int  amount)

Sets the lower bound of the prediction amount for clamping.

Parameters
[in]amountThe prediction amount in milliseconds

Definition at line 248 of file gesture-event-processor.cpp.

References mPanGestureProcessor, and Dali::Internal::PanGestureProcessor::SetMinimumPredictionAmount().

Referenced by Dali::Integration::SetPanGestureMinimumPredictionAmount().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetPanGesturePredictionAmount ( unsigned int  amount)

Sets the prediction amount of the pan gesture.

Parameters
[in]amountThe prediction amount in milliseconds

Definition at line 238 of file gesture-event-processor.cpp.

References mPanGestureProcessor, and Dali::Internal::PanGestureProcessor::SetPredictionAmount().

Referenced by Dali::Integration::SetPanGesturePredictionAmount().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetPanGesturePredictionAmountAdjustment ( unsigned int  amount)

Sets the prediction amount to adjust when the pan velocity is changed.

If the pan velocity is accelerating, the prediction amount will be increased by the specified amount until it reaches the upper bound. If the pan velocity is decelerating, the prediction amount will be decreased by the specified amount until it reaches the lower bound.

Parameters
[in]amountThe prediction amount in milliseconds

Definition at line 253 of file gesture-event-processor.cpp.

References mPanGestureProcessor, and Dali::Internal::PanGestureProcessor::SetPredictionAmountAdjustment().

Referenced by Dali::Integration::SetPanGesturePredictionAmountAdjustment().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetPanGesturePredictionMode ( int  mode)

Called to set how pan gestures predict input.

Parameters
[in]modeThe prediction mode to use

Definition at line 233 of file gesture-event-processor.cpp.

References mPanGestureProcessor, and Dali::Internal::PanGestureProcessor::SetPredictionMode().

Referenced by Dali::Integration::SetPanGesturePredictionMode().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetPanGestureSmoothingAmount ( float  amount)

Sets the prediction amount of the pan gesture.

Parameters
[in]amountThe smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing

Definition at line 263 of file gesture-event-processor.cpp.

References mPanGestureProcessor, and Dali::Internal::PanGestureProcessor::SetSmoothingAmount().

Referenced by Dali::Integration::SetPanGestureSmoothingAmount().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetPanGestureSmoothingMode ( int  mode)

Called to set how pan gestures smooth input.

Parameters
[in]modeThe smoothing mode to use

Definition at line 258 of file gesture-event-processor.cpp.

References mPanGestureProcessor, and Dali::Internal::PanGestureProcessor::SetSmoothingMode().

Referenced by Dali::Integration::SetPanGestureSmoothingMode().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::GestureEventProcessor::SetUpdateRequired ( )

This method is called by GestureDetectors on Started or Continue state events.

Status is queried and reset by Core in ProcessEvents

Definition at line 185 of file gesture-event-processor.cpp.

References mUpdateRequired.

Referenced by ProcessGestureEvent(), and SetGestureProperties().

Here is the caller graph for this function:

Member Data Documentation

Integration::GestureManager& Dali::Internal::GestureEventProcessor::mGestureManager
private

Definition at line 187 of file gesture-event-processor.h.

LongPressGestureProcessor Dali::Internal::GestureEventProcessor::mLongPressGestureProcessor
private
PanGestureProcessor Dali::Internal::GestureEventProcessor::mPanGestureProcessor
private
PinchGestureProcessor Dali::Internal::GestureEventProcessor::mPinchGestureProcessor
private
Integration::RenderController& Dali::Internal::GestureEventProcessor::mRenderController
private

Definition at line 193 of file gesture-event-processor.h.

Referenced by SetGestureProperties().

Stage& Dali::Internal::GestureEventProcessor::mStage
private

Definition at line 186 of file gesture-event-processor.h.

TapGestureProcessor Dali::Internal::GestureEventProcessor::mTapGestureProcessor
private
bool Dali::Internal::GestureEventProcessor::mUpdateRequired
private

set to true by gesture detectors if they require a Core::Update

Definition at line 195 of file gesture-event-processor.h.

Referenced by NeedsUpdate(), and SetUpdateRequired().


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