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

This class looks for pinching gestures involving two touches. More...

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

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

Public Member Functions

 PinchGestureDetector ()
 Construct a new GestureDetector. More...
 
void EmitPinchGestureSignal (Dali::Actor actor, const PinchGesture &pinch)
 Called by the PinchGestureProcessor when a pinch gesture event occurs within the bounds of our attached actor. More...
 
Dali::PinchGestureDetector::DetectedSignalTypeDetectedSignal ()
 This signal is emitted when the pinch 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 PinchGestureDetectorPtr 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...
 

Protected Member Functions

virtual ~PinchGestureDetector ()
 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

 PinchGestureDetector (const PinchGestureDetector &)
 
PinchGestureDetectoroperator= (const PinchGestureDetector &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...
 

Private Attributes

Dali::PinchGestureDetector::DetectedSignalType mDetectedSignal
 

Additional Inherited Members

- Public Types inherited from Dali::Internal::Object
typedef Dali::Handle::Capability Capability
 
- 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 pinching gestures involving two touches.

It tries to detect when the user moves two touch points towards or away from each other. Please see PinchGesture for more information.

The application programmer can use this gesture detector as follows:

detector.Attach(myActor);
detector.DetectedSignal().Connect(this, &MyApplication::OnPinch);

.0

See Also
PinchGesture

Signals

Signal Name Method
pinchDetected DetectedSignal()

Definition at line 41 of file pinch-gesture-detector-impl.h.

Constructor & Destructor Documentation

Dali::Internal::PinchGestureDetector::PinchGestureDetector ( )

Construct a new GestureDetector.

Definition at line 60 of file pinch-gesture-detector-impl.cpp.

Referenced by New().

Here is the caller graph for this function:

Dali::Internal::PinchGestureDetector::~PinchGestureDetector ( )
protectedvirtual

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

Definition at line 65 of file pinch-gesture-detector-impl.cpp.

Dali::Internal::PinchGestureDetector::PinchGestureDetector ( const PinchGestureDetector )
private

Member Function Documentation

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

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

A callback of the following type may be connected:

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

.0

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

Definition at line 71 of file pinch-gesture-detector-impl.h.

References mDetectedSignal.

Referenced by DoConnectSignal().

Here is the caller graph for this function:

bool Dali::Internal::PinchGestureDetector::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 77 of file pinch-gesture-detector-impl.cpp.

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

Here is the call graph for this function:

void Dali::Internal::PinchGestureDetector::EmitPinchGestureSignal ( Dali::Actor  actor,
const PinchGesture pinch 
)

Called by the PinchGestureProcessor when a pinch gesture event occurs within the bounds of our attached actor.

Parameters
[in]actorThe pinched actor.
[in]pinchThe pinch gesture.

Definition at line 69 of file pinch-gesture-detector-impl.cpp.

References mDetectedSignal.

Referenced by Dali::Internal::anonymous_namespace{pinch-gesture-processor.cpp}::EmitPinchSignal().

Here is the caller graph for this function:

PinchGestureDetectorPtr Dali::Internal::PinchGestureDetector::New ( )
static

Create a new gesture detector.

Returns
A smart-pointer to the newly allocated detector.

Definition at line 55 of file pinch-gesture-detector-impl.cpp.

References PinchGestureDetector().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PinchGestureDetector::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 95 of file pinch-gesture-detector-impl.cpp.

void Dali::Internal::PinchGestureDetector::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 105 of file pinch-gesture-detector-impl.cpp.

void Dali::Internal::PinchGestureDetector::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 100 of file pinch-gesture-detector-impl.cpp.

PinchGestureDetector& Dali::Internal::PinchGestureDetector::operator= ( const PinchGestureDetector rhs)
private

Member Data Documentation

Dali::PinchGestureDetector::DetectedSignalType Dali::Internal::PinchGestureDetector::mDetectedSignal
private

Definition at line 119 of file pinch-gesture-detector-impl.h.

Referenced by DetectedSignal(), and EmitPinchGestureSignal().


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