#include <dali/devel-api/actors/layer-devel.h>
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/common/constants.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/math/vector2.h>
#include <dali/public-api/math/vector3.h>
#include <dali/public-api/math/radian.h>
// Signals
-const char* const SIGNAL_TOUCHED = "touched";
const char* const SIGNAL_HOVERED = "hovered";
const char* const SIGNAL_WHEEL_EVENT = "wheelEvent";
const char* const SIGNAL_ON_SCENE = "onScene";
TypeRegistration mType( typeid(Dali::Actor), typeid(Dali::Handle), CreateActor, ActorDefaultProperties );
-SignalConnectorType signalConnector1( mType, SIGNAL_TOUCHED, &Actor::DoConnectSignal );
SignalConnectorType signalConnector2( mType, SIGNAL_HOVERED, &Actor::DoConnectSignal );
SignalConnectorType signalConnector3( mType, SIGNAL_WHEEL_EVENT, &Actor::DoConnectSignal );
SignalConnectorType signalConnector4( mType, SIGNAL_ON_SCENE, &Actor::DoConnectSignal );
bool Actor::GetTouchRequired() const
{
- return !mTouchedSignal.Empty() || !mTouchSignal.Empty() || mDerivedRequiresTouch;
+ return !mTouchSignal.Empty() || mDerivedRequiresTouch;
}
bool Actor::GetHoverRequired() const
return *mGestureData;
}
-bool Actor::IsGestureRequred( DevelGesture::Type type ) const
+bool Actor::IsGestureRequred( Gesture::Type type ) const
{
return mGestureData && mGestureData->IsGestureRequred( type );
}
-bool Actor::EmitTouchEventSignal( const TouchEvent& event, const Dali::TouchData& touch )
+bool Actor::EmitTouchEventSignal( const Dali::TouchEvent& touch )
{
bool consumed = false;
consumed = mTouchSignal.Emit( handle, touch );
}
- if( !mTouchedSignal.Empty() )
- {
- Dali::Actor handle( this );
- consumed |= mTouchedSignal.Emit( handle, event );
- }
-
- if( !consumed )
- {
- // Notification for derived classes
- consumed = OnTouchEvent( event ); // TODO
- }
-
return consumed;
}
-bool Actor::EmitHoverEventSignal( const HoverEvent& event )
+bool Actor::EmitHoverEventSignal( const Dali::HoverEvent& event )
{
bool consumed = false;
return consumed;
}
-bool Actor::EmitWheelEventSignal( const WheelEvent& event )
+bool Actor::EmitWheelEventSignal( const Dali::WheelEvent& event )
{
bool consumed = false;
}
}
-Dali::Actor::TouchSignalType& Actor::TouchedSignal()
-{
- return mTouchedSignal;
-}
-
-Dali::Actor::TouchDataSignalType& Actor::TouchSignal()
+Dali::Actor::TouchEventSignalType& Actor::TouchSignal()
{
return mTouchSignal;
}
bool connected( true );
Actor* actor = static_cast< Actor* >( object ); // TypeRegistry guarantees that this is the correct type.
- if( 0 == signalName.compare( SIGNAL_TOUCHED ) )
- {
- actor->TouchedSignal().Connect( tracker, functor );
- }
- else if( 0 == signalName.compare( SIGNAL_HOVERED ) )
+ if( 0 == signalName.compare( SIGNAL_HOVERED ) )
{
actor->HoveredSignal().Connect( tracker, functor );
}
mAnchorPoint( NULL ),
mRelayoutData( NULL ),
mGestureData( NULL ),
- mTouchedSignal(),
mTouchSignal(),
mHoveredSignal(),
mWheelEventSignal(),
mPositionUsesAnchorPoint( true ),
mVisible( true ),
mInheritLayoutDirection( true ),
+ mCaptureAllTouchAfterStart( false ),
mLayoutDirection( LayoutDirection::LEFT_TO_RIGHT ),
mDrawMode( DrawMode::NORMAL ),
mColorMode( Node::DEFAULT_COLOR_MODE ),