X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol.cpp;h=8652f1a0ec90110642ea4eea0c1905f7add99c5c;hb=a325ccf71f23f1f732cd79a8a5e2e35794f34b05;hp=2022ce59d4a672540f203ded3add801b2eebba29;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/control.cpp b/dali-toolkit/public-api/controls/control.cpp index 2022ce5..8652f1a 100644 --- a/dali-toolkit/public-api/controls/control.cpp +++ b/dali-toolkit/public-api/controls/control.cpp @@ -28,7 +28,17 @@ const char* const Control::SIGNAL_KEY_EVENT = "key-event"; Control Control::New() { - return ControlImpl::New(); + // Use TypeRegistry to create instance of control so that the type-info matches Control rather than ControlImpl + TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( typeid(Control) ); + DALI_ASSERT_ALWAYS( typeInfo && "TypeRegistry returning Invalid TypeInfo" ); + + BaseHandle handle = typeInfo.CreateInstance(); + DALI_ASSERT_ALWAYS( handle && "Unable to Create Control" ); + + Control control = DownCast( handle ); + DALI_ASSERT_ALWAYS( handle && "TypeRegistry did not create a Control" ); + + return control; } Control::Control() @@ -128,6 +138,51 @@ void Control::ClearKeyInputFocus() GetImplementation().ClearKeyInputFocus(); } +PinchGestureDetector Control::GetPinchGestureDetector() const +{ + return GetImplementation().GetPinchGestureDetector(); +} + +PanGestureDetector Control::GetPanGestureDetector() const +{ + return GetImplementation().GetPanGestureDetector(); +} + +TapGestureDetector Control::GetTapGestureDetector() const +{ + return GetImplementation().GetTapGestureDetector(); +} + +LongPressGestureDetector Control::GetLongPressGestureDetector() const +{ + return GetImplementation().GetLongPressGestureDetector(); +} + +void Control::SetBackgroundColor( const Vector4& color ) +{ + GetImplementation().SetBackgroundColor( color ); +} + +Vector4 Control::GetBackgroundColor() const +{ + return GetImplementation().GetBackgroundColor(); +} + +void Control::SetBackground( Image image ) +{ + GetImplementation().SetBackground( image ); +} + +void Control::ClearBackground() +{ + GetImplementation().ClearBackground(); +} + +Actor Control::GetBackgroundActor() const +{ + return GetImplementation().GetBackgroundActor(); +} + Control::KeyEventSignalV2& Control::KeyEventSignal() { return GetImplementation().KeyEventSignal();