Prepare for Tizen 2.4 API freeze
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-impl.cpp
index 03dcf44..55d1823 100644 (file)
@@ -25,8 +25,8 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/text/layouts/layout-engine.h>
-#include <dali-toolkit/public-api/text/rendering/text-backend.h>
+#include <dali-toolkit/internal/text/layouts/layout-engine.h>
+#include <dali-toolkit/internal/text/rendering/text-backend.h>
 
 using namespace Dali::Toolkit::Text;
 
@@ -320,12 +320,9 @@ void TextField::OnInitialize()
   mController->EnableTextInput( mDecorator );
 
   // Forward input events to controller
-  EnableGestureDetection( Gesture::Tap );
-
-  // TODO - Fix TapGestureDetector to support single and double tap
   mDoubleTapDetector = TapGestureDetector::New();
-  mDoubleTapDetector.SetTapsRequired( 2 );
-  mDoubleTapDetector.DetectedSignal().Connect( this, &TextField::OnDoubleTap );
+  mDoubleTapDetector.SetMaximumTapsRequired( 2 );
+  mDoubleTapDetector.DetectedSignal().Connect( this, &TextField::OnTap );
   mDoubleTapDetector.Attach(Self());
 
   // Set BoundingBox to stage size if not already set.
@@ -336,6 +333,16 @@ void TextField::OnInitialize()
   }
 }
 
+Vector3 TextField::GetNaturalSize()
+{
+  return mController->GetNaturalSize();
+}
+
+float TextField::GetHeightForWidth( float width )
+{
+  return mController->GetHeightForWidth( width );
+}
+
 void TextField::OnRelayout( const Vector2& size, ActorSizeContainer& container )
 {
   if( mController->Relayout( size ) )
@@ -362,14 +369,9 @@ void TextField::OnRelayout( const Vector2& size, ActorSizeContainer& container )
   }
 }
 
-void TextField::OnTap( const TapGesture& tap )
-{
-  mController->TapEvent( tap.numberOfTaps, tap.localPoint.x, tap.localPoint.y );
-}
-
-void TextField::OnDoubleTap( Actor actor, const TapGesture& tap )
+void TextField::OnTap( Actor actor, const TapGesture& gesture )
 {
-  mController->TapEvent( tap.numberOfTaps, tap.localPoint.x, tap.localPoint.y );
+  mController->TapEvent( gesture.numberOfTaps, gesture.localPoint.x, gesture.localPoint.y );
 }
 
 void TextField::RequestTextRelayout()