projects
/
platform
/
core
/
uifw
/
dali-demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes after TouchedSignal changes
[platform/core/uifw/dali-demo.git]
/
examples
/
gestures
/
gesture-example.cpp
diff --git
a/examples/gestures/gesture-example.cpp
b/examples/gestures/gesture-example.cpp
index
a3a927d
..
bd32658
100644
(file)
--- a/
examples/gestures/gesture-example.cpp
+++ b/
examples/gestures/gesture-example.cpp
@@
-18,9
+18,6
@@
// EXTERNAL INCLUDES
#include <dali-toolkit/dali-toolkit.h>
#include <string>
// EXTERNAL INCLUDES
#include <dali-toolkit/dali-toolkit.h>
#include <string>
-#include <dali/devel-api/actors/actor-devel.h>
-#include <dali/devel-api/events/rotation-gesture.h>
-#include <dali/devel-api/events/rotation-gesture-detector.h>
using namespace Dali;
using namespace Dali::Toolkit;
using namespace Dali;
using namespace Dali::Toolkit;
@@
-161,7
+158,7
@@
private:
background.Add( touchControl );
// Connect to the touch signal
background.Add( touchControl );
// Connect to the touch signal
- touchControl.TouchSignal().Connect( this, &GestureExample::OnTouch );
+ touchControl.Touch
ed
Signal().Connect( this, &GestureExample::OnTouch );
touchControl.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Create a long press gesture detector, attach the actor & connect
touchControl.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Create a long press gesture detector, attach the actor & connect
@@
-221,7
+218,7
@@
private:
* @param[in] actor The touched actor
* @param[in] touch The touch event
*/
* @param[in] actor The touched actor
* @param[in] touch The touch event
*/
- bool OnTouch( Actor actor, const Touch
Data
& touch )
+ bool OnTouch( Actor actor, const Touch
Event
& touch )
{
switch( touch.GetState( 0 ) )
{
{
switch( touch.GetState( 0 ) )
{
@@
-269,7
+266,7
@@
private:
*/
void OnLongPress( Actor actor, const LongPressGesture& longPress )
{
*/
void OnLongPress( Actor actor, const LongPressGesture& longPress )
{
- if( longPress.
state
== Gesture::Started )
+ if( longPress.
GetState()
== Gesture::Started )
{
// When we first receive a long press, attach the actor to the pan detector.
mPanDetector.Attach( actor );
{
// When we first receive a long press, attach the actor to the pan detector.
mPanDetector.Attach( actor );
@@
-297,7
+294,7
@@
private:
// As the displacement is in local actor coords, we will have to multiply the displacement by the
// actor's scale so that it moves the correct amount in the parent's coordinate system.
// As the displacement is in local actor coords, we will have to multiply the displacement by the
// actor's scale so that it moves the correct amount in the parent's coordinate system.
- Vector3 scaledDisplacement( pan.
displacement
);
+ Vector3 scaledDisplacement( pan.
GetDisplacement()
);
scaledDisplacement *= actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
Vector3 currentPosition;
scaledDisplacement *= actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
Vector3 currentPosition;
@@
-306,7
+303,7
@@
private:
Vector3 newPosition = currentPosition + scaledDisplacement;
actor.SetProperty( Actor::Property::POSITION, newPosition );
Vector3 newPosition = currentPosition + scaledDisplacement;
actor.SetProperty( Actor::Property::POSITION, newPosition );
- switch( pan.
state
)
+ switch( pan.
GetState()
)
{
case Gesture::Started:
{
{
case Gesture::Started:
{
@@
-372,7
+369,7
@@
private:
*/
void OnPinch( Actor actor, const PinchGesture& pinch )
{
*/
void OnPinch( Actor actor, const PinchGesture& pinch )
{
- switch( pinch.
state
)
+ switch( pinch.
GetState()
)
{
case Gesture::Started:
{
{
case Gesture::Started:
{
@@
-409,7
+406,7
@@
private:
}
}
}
}
- actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.
scale
);
+ actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.
GetScale()
);
}
/**
}
/**
@@
-420,7
+417,7
@@
private:
*/
void OnRotation( Actor actor, const RotationGesture& rotation )
{
*/
void OnRotation( Actor actor, const RotationGesture& rotation )
{
- switch( rotation.
state
)
+ switch( rotation.
GetState()
)
{
case Gesture::Started:
{
{
case Gesture::Started:
{
@@
-445,7
+442,7
@@
private:
}
}
}
}
- actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( mStartingOrientation * Quaternion( rotation.
rotation
, Vector3::ZAXIS ) ) );
+ actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( mStartingOrientation * Quaternion( rotation.
GetRotation()
, Vector3::ZAXIS ) ) );
}
/**
}
/**
@@
-456,7
+453,7
@@
private:
*/
void OnKeyEvent( const KeyEvent& event )
{
*/
void OnKeyEvent( const KeyEvent& event )
{
- if( event.
state == KeyEvent::Down
)
+ if( event.
GetState() == KeyEvent::DOWN
)
{
if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) )
{
{
if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) )
{