TextField to consume TouchEvents 85/40085/1
authorAgnelo Vaz <agnelo.vaz@samsung.com>
Thu, 28 May 2015 15:19:38 +0000 (16:19 +0100)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Thu, 28 May 2015 16:17:40 +0000 (17:17 +0100)
Change-Id: I907b8ff67a49e60304a938bba64e77c0b8a936c8
Signed-off-by: Agnelo Vaz <agnelo.vaz@samsung.com>
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h

index da4a593..2d07c1e 100644 (file)
@@ -838,6 +838,8 @@ void TextField::OnInitialize()
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
   EnableGestureDetection(Gesture::Pan);
 
+  self.TouchedSignal().Connect( this, &TextField::OnTouched );
+
   // Set BoundingBox to stage size if not already set.
   if ( mDecorator->GetBoundingBox().IsEmpty() )
   {
@@ -1101,6 +1103,11 @@ void TextField::KeyboardStatusChanged(bool keyboardShown)
   }
 }
 
+bool TextField::OnTouched( Actor actor, const TouchEvent& event )
+{
+  return true;
+}
+
 TextField::TextField()
 : Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
   mRenderingBackend( DEFAULT_RENDERING_BACKEND ),
index 6e9525d..32a0d67 100644 (file)
@@ -176,6 +176,14 @@ private: // Implementation
   void KeyboardStatusChanged( bool keyboardShown );
 
   /**
+   * @brief Callback when Textfield is touched
+   *
+   * @param[in] actor TextField touched
+   * @param[in] event TouchEvent information
+   */
+  bool OnTouched( Actor actor, const TouchEvent& event );
+
+  /**
    * Construct a new TextField.
    */
   TextField();