Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / text-controls / text-field.h
index 7f7fd86..61bab1c 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_TEXT_FIELD_H__
-#define __DALI_TOOLKIT_TEXT_FIELD_H__
+#ifndef DALI_TOOLKIT_TEXT_FIELD_H
+#define DALI_TOOLKIT_TEXT_FIELD_H
 
 /*
- * Copyright (c) 2017 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
 {
-
 namespace Internal DALI_INTERNAL
 {
 class TextField;
@@ -46,10 +44,9 @@ class TextField;
  * | maxLengthReached     | @ref MaxLengthReachedSignal()  | @SINCE_1_0.0       |
  * | inputStyleChanged    | @ref InputStyleChangedSignal() | @SINCE_1_2_2       |
  */
-class DALI_IMPORT_API TextField : public Control
+class DALI_TOOLKIT_API TextField : public Control
 {
 public:
-
   /**
    * @brief The start and end property ranges for this control.
    * @SINCE_1_0.0
@@ -57,7 +54,7 @@ public:
   enum PropertyRange
   {
     PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0
-    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices @SINCE_1_0.0
+    PROPERTY_END_INDEX   = PROPERTY_START_INDEX + 1000              ///< Reserve property indices @SINCE_1_0.0
   };
 
   /**
@@ -73,18 +70,11 @@ public:
     enum
     {
       /**
-       * @brief The type or rendering e.g. bitmap-based.
-       * @details Name "renderingBackend", type Property::INTEGER.
-       * @SINCE_1_0.0
-       */
-      RENDERING_BACKEND = PROPERTY_START_INDEX,
-
-      /**
        * @brief The text to display in UTF-8 format.
        * @details Name "text", type Property::STRING.
        * @SINCE_1_0.0
        */
-      TEXT,
+      TEXT = PROPERTY_START_INDEX,
 
       /**
        * @brief The text to display when the TextField is empty and inactive.
@@ -169,22 +159,6 @@ public:
       PLACEHOLDER_TEXT_COLOR,
 
       /**
-       * @DEPRECATED_1_1.37 Use SHADOW instead.
-       * @brief The drop shadow offset 0 indicates no shadow.
-       * @details Name "shadowOffset", type Property::VECTOR2.
-       * @SINCE_1_0.0
-       */
-      SHADOW_OFFSET,
-
-      /**
-       * @DEPRECATED_1_1.37 Use SHADOW instead.
-       * @brief The color of a drop shadow.
-       * @details Name "shadowColor", type Property::VECTOR4.
-       * @SINCE_1_0.0
-       */
-      SHADOW_COLOR,
-
-      /**
        * @brief The color to apply to the primary cursor.
        * @details Name "primaryCursorColor", type Property::VECTOR4.
        * @SINCE_1_0.0
@@ -478,7 +452,7 @@ public:
        * @SINCE_1_2.60
        * @note PLACEHOLDER map is used to add ellipsis to placeholder text.
        */
-      ELLIPSIS,
+      ELLIPSIS
     };
   };
 
@@ -490,8 +464,8 @@ public:
    */
   enum ExceedPolicy
   {
-    EXCEED_POLICY_ORIGINAL,        ///< The text will be display at original size, and may exceed the TextField boundary. @SINCE_1_0.0
-    EXCEED_POLICY_CLIP             ///< The end of text will be clipped to fit within the TextField. @SINCE_1_0.0
+    EXCEED_POLICY_ORIGINAL, ///< The text will be display at original size, and may exceed the TextField boundary. @SINCE_1_0.0
+    EXCEED_POLICY_CLIP      ///< The end of text will be clipped to fit within the TextField. @SINCE_1_0.0
   };
 
   /**
@@ -501,22 +475,22 @@ public:
    */
   struct InputStyle
   {
-  /**
+    /**
    * @brief Mask used by the signal InputStyleChangedSignal().
    *
    * @SINCE_1_2_2
    */
     enum Mask
     {
-      NONE         = 0x0000, ///< @SINCE_1_2_2
-      COLOR        = 0x0001, ///< @SINCE_1_2_2
-      FONT_FAMILY  = 0x0002, ///< @SINCE_1_2_2
-      POINT_SIZE   = 0x0004, ///< @SINCE_1_2_2
-      FONT_STYLE   = 0x0008, ///< @SINCE_1_2_2
-      UNDERLINE    = 0x0010, ///< @SINCE_1_2_2
-      SHADOW       = 0x0020, ///< @SINCE_1_2_2
-      EMBOSS       = 0x0040, ///< @SINCE_1_2_2
-      OUTLINE      = 0x0080  ///< @SINCE_1_2_2
+      NONE        = 0x0000, ///< @SINCE_1_2_2
+      COLOR       = 0x0001, ///< @SINCE_1_2_2
+      FONT_FAMILY = 0x0002, ///< @SINCE_1_2_2
+      POINT_SIZE  = 0x0004, ///< @SINCE_1_2_2
+      FONT_STYLE  = 0x0008, ///< @SINCE_1_2_2
+      UNDERLINE   = 0x0010, ///< @SINCE_1_2_2
+      SHADOW      = 0x0020, ///< @SINCE_1_2_2
+      EMBOSS      = 0x0040, ///< @SINCE_1_2_2
+      OUTLINE     = 0x0080  ///< @SINCE_1_2_2
     };
   };
 
@@ -526,19 +500,19 @@ public:
    * @brief Text changed signal type.
    * @SINCE_1_0.0
    */
-  typedef Signal<void ( TextField ) > TextChangedSignalType;
+  typedef Signal<void(TextField)> TextChangedSignalType;
 
   /**
    * @brief Max Characters Exceed signal type.
    * @SINCE_1_0.0
    */
-  typedef Signal<void ( TextField ) > MaxLengthReachedSignalType;
+  typedef Signal<void(TextField)> MaxLengthReachedSignalType;
 
   /**
    * @brief Input Style changed signal type.
    * @SINCE_1_2_2
    */
-  typedef Signal<void ( TextField, InputStyle::Mask ) > InputStyleChangedSignalType;
+  typedef Signal<void(TextField, InputStyle::Mask)> InputStyleChangedSignalType;
 
   /**
    * @brief Creates the TextField control.
@@ -559,7 +533,15 @@ public:
    * @SINCE_1_0.0
    * @param[in] handle The handle to copy from
    */
-  TextField( const TextField& handle );
+  TextField(const TextField& handle);
+
+  /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  TextField(TextField&& rhs);
 
   /**
    * @brief Assignment operator.
@@ -568,7 +550,16 @@ public:
    * @param[in] handle The handle to copy from
    * @return A reference to this
    */
-  TextField& operator=( const TextField& handle );
+  TextField& operator=(const TextField& handle);
+
+  /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  TextField& operator=(TextField&& rhs);
 
   /**
    * @brief Destructor.
@@ -588,7 +579,7 @@ public:
    * @param[in] handle Handle to an object
    * @return Handle to a TextField or an empty handle
    */
-  static TextField DownCast( BaseHandle handle );
+  static TextField DownCast(BaseHandle handle);
 
   // Signals
 
@@ -631,14 +622,13 @@ public:
   InputStyleChangedSignalType& InputStyleChangedSignal();
 
 public: // Not intended for application developers
-
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
    * @param[in] implementation The Control implementation
    */
-  DALI_INTERNAL TextField( Internal::TextField& implementation );
+  DALI_INTERNAL TextField(Internal::TextField& implementation);
 
   /**
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
@@ -646,7 +636,7 @@ public: // Not intended for application developers
    * @SINCE_1_0.0
    * @param[in] internal A pointer to the internal CustomActor
    */
-  explicit DALI_INTERNAL TextField( Dali::Internal::CustomActor* internal );
+  explicit DALI_INTERNAL TextField(Dali::Internal::CustomActor* internal);
 };
 
 /**
@@ -656,4 +646,4 @@ public: // Not intended for application developers
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_TEXT_FIELD_H__
+#endif // DALI_TOOLKIT_TEXT_FIELD_H