TextField to consume TouchEvents
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-impl.cpp
index f272a26..2d07c1e 100644 (file)
@@ -117,6 +117,7 @@ DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-handle-pressed-image-
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-handle-pressed-image-right", STRING,    SELECTION_HANDLE_PRESSED_IMAGE_RIGHT )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-highlight-color",            STRING,    SELECTION_HIGHLIGHT_COLOR            )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "decoration-bounding-box",              RECTANGLE, DECORATION_BOUNDING_BOX              )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "input-method-settings",                MAP,       INPUT_METHOD_SETTINGS                )
 
 DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "max-length-reached", SIGNAL_MAX_LENGTH_REACHED )
 
@@ -520,6 +521,13 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
+      case Toolkit::TextField::Property::INPUT_METHOD_SETTINGS:
+      {
+        // Empty implementation for now.
+        Property::Map map = value.Get<Property::Map>();
+        VirtualKeyboard::ApplySettings( map );
+        break;
+      }
     } // switch
   } // textfield
 }
@@ -778,6 +786,10 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
+      case Toolkit::TextField::Property::INPUT_METHOD_SETTINGS:
+      {
+        break;
+      }
     } //switch
   }
 
@@ -826,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() )
   {
@@ -1089,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 ),