SignalData()
: functorCalled(false),
voidFunctorCalled(false),
+ needGesturePropagation(false),
receivedGesture(),
pressedActor()
{
{
functorCalled = false;
voidFunctorCalled = false;
-
+ needGesturePropagation = false;
receivedGesture.Reset();
pressedActor.Reset();
bool functorCalled;
bool voidFunctorCalled;
+ bool needGesturePropagation;
LongPressGesture receivedGesture;
Actor pressedActor;
};
signalData.functorCalled = true;
signalData.receivedGesture = longPress;
signalData.pressedActor = actor;
+ if (signalData.needGesturePropagation)
+ {
+ Dali::DevelActor::SetNeedGesturePropagation(actor, true);
+ }
}
void operator()()
pData.Reset();
// If GesturePropargation is set, a gesture event is to pass over to the parent.
- Dali::DevelActor::SetNeedGesturePropagation(childActor, true);
+ cData.needGesturePropagation = true;
// So now the parent got the gesture event.
TestGenerateLongPress(application, 50.0f, 50.0f);
SignalData()
: functorCalled(false),
voidFunctorCalled(false),
+ needGesturePropagation(false),
receivedGesture()
{
}
{
functorCalled = false;
voidFunctorCalled = false;
-
+ needGesturePropagation = false;
receivedGesture.Reset();
pannedActor.Reset();
bool functorCalled;
bool voidFunctorCalled;
+ bool needGesturePropagation;
PanGesture receivedGesture;
Actor pannedActor;
};
signalData.functorCalled = true;
signalData.receivedGesture = pan;
signalData.pannedActor = actor;
+ if (signalData.needGesturePropagation)
+ {
+ Dali::DevelActor::SetNeedGesturePropagation(actor, true);
+ }
}
void operator()()
pData.Reset();
// If GesturePropargation is set, a gesture event is to pass over to the parent.
- Dali::DevelActor::SetNeedGesturePropagation(childActor, true);
+ cData.needGesturePropagation = true;
// So now the parent got the gesture event.
TestStartPan(application, Vector2(10.0f, 20.0f), Vector2(26.0f, 20.0f), time);
SignalData()
: functorCalled(false),
voidFunctorCalled(false),
+ needGesturePropagation(false),
receivedGesture()
{
}
{
functorCalled = false;
voidFunctorCalled = false;
-
+ needGesturePropagation = false;
receivedGesture.Reset();
pinchedActor.Reset();
bool functorCalled;
bool voidFunctorCalled;
+ bool needGesturePropagation;
PinchGesture receivedGesture;
Actor pinchedActor;
};
signalData.functorCalled = true;
signalData.receivedGesture = pinch;
signalData.pinchedActor = actor;
+ if (signalData.needGesturePropagation)
+ {
+ Dali::DevelActor::SetNeedGesturePropagation(actor, true);
+ }
}
void operator()()
pData.Reset();
// If GesturePropargation is set, a gesture event is to pass over to the parent.
- Dali::DevelActor::SetNeedGesturePropagation(childActor, true);
+ cData.needGesturePropagation = true;
// So now the parent got the gesture event.
TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 700);
SignalData()
: functorCalled(false),
voidFunctorCalled(false),
+ needGesturePropagation(false),
receivedGesture()
{
}
{
functorCalled = false;
voidFunctorCalled = false;
-
+ needGesturePropagation = false;
receivedGesture.Reset();
rotatedActor.Reset();
bool functorCalled;
bool voidFunctorCalled;
+ bool needGesturePropagation;
RotationGesture receivedGesture;
Actor rotatedActor;
};
signalData.functorCalled = true;
signalData.receivedGesture = rotation;
signalData.rotatedActor = actor;
+ if (signalData.needGesturePropagation)
+ {
+ Dali::DevelActor::SetNeedGesturePropagation(actor, true);
+ }
}
void operator()()
pData.Reset();
// If GesturePropargation is set, a gesture event is to pass over to the parent.
- Dali::DevelActor::SetNeedGesturePropagation(childActor, true);
+ cData.needGesturePropagation = true;
// So now the parent got the gesture event.
TestStartRotation(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 700);
{
SignalData()
: functorCalled(false),
- voidFunctorCalled(false)
+ voidFunctorCalled(false),
+ needGesturePropagation(false)
{
}
{
functorCalled = false;
voidFunctorCalled = false;
-
+ needGesturePropagation = false;
receivedGesture.Reset();
tappedActor.Reset();
bool functorCalled;
bool voidFunctorCalled;
+ bool needGesturePropagation;
TapGesture receivedGesture;
Actor tappedActor;
};
signalData.functorCalled = true;
signalData.receivedGesture = tap;
signalData.tappedActor = actor;
+ if (signalData.needGesturePropagation)
+ {
+ Dali::DevelActor::SetNeedGesturePropagation(actor, true);
+ }
}
void operator()()
pData.Reset();
// If GesturePropargation is set, a gesture event is delivered to the parent.
- Dali::DevelActor::SetNeedGesturePropagation(childActor, true);
+ cData.needGesturePropagation = true;
// So now the parent got the gesture event.
TestGenerateTap(application, 50.0f, 50.0f, 700);
if(actor == hitTestActor)
{
+ actor->SetNeedGesturePropagation(false);
// Our gesture detector's attached actor WAS the hit actor so we can can emit the signal.
EmitGestureSignal(actor, gestureDetectors, hitTestResults.actorCoordinates);
// If NeedGesturePropagation is true, it passes the gesture to the parent.
{
break; // We have found AND emitted a signal on the gestured actor, break out.
}
- actor->SetNeedGesturePropagation(false);
}
else
{
float distance(0.0f);
if(RayTest::ActorTest(*actor, hitTestResults.rayOrigin, hitTestResults.rayDirection, hitPointLocal, distance))
{
+ actor->SetNeedGesturePropagation(false);
// One of the parents was the gestured actor so we can emit the signal for that actor.
EmitGestureSignal(actor, gestureDetectors, hitPointLocal);
// If NeedGesturePropagation is true, it passes the gesture to the parent.
{
break; // We have found AND emitted a signal on the gestured actor, break out.
}
- actor->SetNeedGesturePropagation(false);
}
}
}