[dali_2.3.22] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / text-controls / text-field.cpp
index 397f6a5..7a1c064 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
-const std::string TextField::RENDERING_BACKEND_PROPERTY_NAME("rendering-backend");
-const std::string TextField::PLACEHOLDER_TEXT_PROPERTY_NAME("placeholder-text");
-const std::string TextField::TEXT_PROPERTY_NAME("text");
-const std::string TextField::CURSOR_IMAGE_PROPERTY_NAME("cursor-image");
-const std::string TextField::PRIMARY_CURSOR_COLOR_PROPERTY_NAME("primary-cursor-color");
-const std::string TextField::SECONDARY_CURSOR_COLOR_PROPERTY_NAME("secondary-cursor-color");
-const std::string TextField::ENABLE_CURSOR_BLINK_PROPERTY_NAME("enable-cursor-blink");
-const std::string TextField::CURSOR_BLINK_INTERVAL_PROPERTY_NAME("cursor-blink-interval");
-const std::string TextField::CURSOR_BLINK_DURATION_PROPERTY_NAME("cursor-blink-duration");
-const std::string TextField::GRAB_HANDLE_IMAGE_PROPERTY_NAME("grab-handle-image");
-const std::string TextField::DECORATION_BOUNDING_BOX("decoration-bounding-box");
-
 TextField TextField::New()
 {
   return Internal::TextField::New();
 }
 
+TextField TextField::New(ControlBehaviour additionalBehaviour)
+{
+  return Internal::TextField::New(static_cast<Toolkit::Internal::Control::ControlBehaviour>(additionalBehaviour));
+}
+
 TextField::TextField()
 {
 }
 
-TextField::TextField( const TextField& handle )
-: Control( handle )
+TextField::TextField(const TextField& handle) = default;
+
+TextField::TextField(TextField&& rhs) noexcept = default;
+
+TextField& TextField::operator=(const TextField& handle) = default;
+
+TextField& TextField::operator=(TextField&& rhs) noexcept = default;
+
+TextField::~TextField()
 {
 }
 
-TextField& TextField::operator=( const TextField& handle )
+TextField TextField::DownCast(BaseHandle handle)
 {
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
+  return Control::DownCast<TextField, Internal::TextField>(handle);
 }
 
-TextField::~TextField()
+TextField::TextChangedSignalType& TextField::TextChangedSignal()
 {
+  return Dali::Toolkit::GetImpl(*this).TextChangedSignal();
 }
 
-TextField TextField::DownCast( BaseHandle handle )
+TextField::MaxLengthReachedSignalType& TextField::MaxLengthReachedSignal()
 {
-  return Control::DownCast<TextField, Internal::TextField>(handle);
+  return Dali::Toolkit::GetImpl(*this).MaxLengthReachedSignal();
+}
+
+TextField::InputStyleChangedSignalType& TextField::InputStyleChangedSignal()
+{
+  return Dali::Toolkit::GetImpl(*this).InputStyleChangedSignal();
 }
 
-TextField::TextField( Internal::TextField& implementation )
+TextField::TextField(Internal::TextField& implementation)
 : Control(implementation)
 {
 }
 
-TextField::TextField( Dali::Internal::CustomActor* internal )
-: Control( internal )
+TextField::TextField(Dali::Internal::CustomActor* internal)
+: Control(internal)
 {
-  VerifyCustomActorPointer<Internal::TextField>( internal );
+  VerifyCustomActorPointer<Internal::TextField>(internal);
 }
 
 } // namespace Toolkit