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

Holds gesture specific data for an Actor. More...

#include <actor-gesture-data.h>

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

Public Member Functions

 ActorGestureData ()
 Constructor. More...
 
 ~ActorGestureData ()
 Non-virtual Destructor. More...
 
void AddGestureDetector (GestureDetector &detector)
 Adds a gesture detector to the data so that the owning actor is aware that it requires this type of gesture. More...
 
void RemoveGestureDetector (GestureDetector &detector)
 Removes a previously added gesture detector from the data. More...
 
bool IsGestureRequred (Gesture::Type type) const
 Queries whether the actor requires the gesture type. More...
 
GestureDetectorContainerGetGestureDetectorContainer (Gesture::Type type)
 Retrieve a reference to the detectors for the given type. More...
 

Private Member Functions

GestureDetectorContainer *& GetContainerPtr (Gesture::Type type)
 Helper to retrieve the appropriate container type. More...
 

Private Attributes

Gesture::Type gesturesRequired
 Stores which gestures are required. More...
 
GestureDetectorContainerpanDetectors
 Pointer to a container of pan-detectors. More...
 
GestureDetectorContainerpinchDetectors
 Pointer to a container of pinch-detectors. More...
 
GestureDetectorContainerlongPressDetectors
 Pointer to a container of long-press-detectors. More...
 
GestureDetectorContainertapDetectors
 Pointer to a container of tap-detectors. More...
 

Detailed Description

Holds gesture specific data for an Actor.

Definition at line 33 of file actor-gesture-data.h.

Constructor & Destructor Documentation

Dali::Internal::ActorGestureData::ActorGestureData ( )

Constructor.

Definition at line 27 of file actor-gesture-data.cpp.

Dali::Internal::ActorGestureData::~ActorGestureData ( )

Non-virtual Destructor.

Definition at line 36 of file actor-gesture-data.cpp.

References longPressDetectors, panDetectors, pinchDetectors, and tapDetectors.

Member Function Documentation

void Dali::Internal::ActorGestureData::AddGestureDetector ( GestureDetector detector)

Adds a gesture detector to the data so that the owning actor is aware that it requires this type of gesture.

Parameters
[in]detectorThe detector being added.
Note
A raw pointer to the detector is stored, so the detector MUST remove itself when it is destroyed using RemoveGestureDetector()

Definition at line 44 of file actor-gesture-data.cpp.

References gesturesRequired, GetContainerPtr(), and Dali::Internal::GestureDetector::GetType().

Referenced by Dali::Internal::GestureDetector::Attach().

Here is the call graph for this function:

Here is the caller graph for this function:

GestureDetectorContainer *& Dali::Internal::ActorGestureData::GetContainerPtr ( Gesture::Type  type)
inlineprivate

Helper to retrieve the appropriate container type.

Parameters
[in]typeThe container type required.

Definition at line 83 of file actor-gesture-data.cpp.

References DALI_ASSERT_DEBUG, Dali::Gesture::LongPress, longPressDetectors, Dali::Gesture::Pan, panDetectors, Dali::Gesture::Pinch, pinchDetectors, Dali::Gesture::Tap, and tapDetectors.

Referenced by AddGestureDetector(), GetGestureDetectorContainer(), and RemoveGestureDetector().

Here is the caller graph for this function:

GestureDetectorContainer & Dali::Internal::ActorGestureData::GetGestureDetectorContainer ( Gesture::Type  type)

Retrieve a reference to the detectors for the given type.

Parameters
[in]typeThe container type required
Precondition
Ensure IsGestureRequired() is used to check if the container is actually available.

Definition at line 78 of file actor-gesture-data.cpp.

References GetContainerPtr().

Referenced by Dali::Internal::GestureProcessor::GetGesturedActor().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::ActorGestureData::IsGestureRequred ( Gesture::Type  type) const
inline

Queries whether the actor requires the gesture type.

Parameters
[in]typeThe gesture type.
Returns
true if the gesture is required, false otherwise.

Definition at line 69 of file actor-gesture-data.h.

References gesturesRequired.

Referenced by Dali::Internal::Actor::IsGestureRequred().

Here is the caller graph for this function:

void Dali::Internal::ActorGestureData::RemoveGestureDetector ( GestureDetector detector)

Removes a previously added gesture detector from the data.

If no more gesture detectors of this type are registered then the actor owning this data will no longer be hit-tested for that gesture.

Parameters
[in]detectorThe detector to remove.

Definition at line 58 of file actor-gesture-data.cpp.

References DALI_ASSERT_DEBUG, gesturesRequired, GetContainerPtr(), and Dali::Internal::GestureDetector::GetType().

Referenced by Dali::Internal::GestureDetector::Detach(), Dali::Internal::GestureDetector::DetachAll(), and Dali::Internal::GestureDetector::~GestureDetector().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Gesture::Type Dali::Internal::ActorGestureData::gesturesRequired
private

Stores which gestures are required.

Definition at line 91 of file actor-gesture-data.h.

Referenced by AddGestureDetector(), IsGestureRequred(), and RemoveGestureDetector().

GestureDetectorContainer* Dali::Internal::ActorGestureData::longPressDetectors
private

Pointer to a container of long-press-detectors.

Definition at line 95 of file actor-gesture-data.h.

Referenced by GetContainerPtr(), and ~ActorGestureData().

GestureDetectorContainer* Dali::Internal::ActorGestureData::panDetectors
private

Pointer to a container of pan-detectors.

Definition at line 93 of file actor-gesture-data.h.

Referenced by GetContainerPtr(), and ~ActorGestureData().

GestureDetectorContainer* Dali::Internal::ActorGestureData::pinchDetectors
private

Pointer to a container of pinch-detectors.

Definition at line 94 of file actor-gesture-data.h.

Referenced by GetContainerPtr(), and ~ActorGestureData().

GestureDetectorContainer* Dali::Internal::ActorGestureData::tapDetectors
private

Pointer to a container of tap-detectors.

Definition at line 96 of file actor-gesture-data.h.

Referenced by GetContainerPtr(), and ~ActorGestureData().


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