Add a TextEditor property to limit input to maximum characters
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-editor-devel.h
index 23f21e8..fe8bc2e 100755 (executable)
@@ -123,6 +123,12 @@ namespace Property
        * @details Name "renderingBackend", type Property::INTEGER.
        */
       RENDERING_BACKEND,
        * @details Name "renderingBackend", type Property::INTEGER.
        */
       RENDERING_BACKEND,
+
+      /**
+       * @brief The maximum number of characters that can be inserted.
+       * @details Name "maxLength", type Property::INTEGER.
+       */
+      MAX_LENGTH,
   };
 
 } // namespace Property
   };
 
 } // namespace Property
@@ -135,6 +141,23 @@ namespace Property
  */
 DALI_TOOLKIT_API InputMethodContext GetInputMethodContext( TextEditor textEditor );
 
  */
 DALI_TOOLKIT_API InputMethodContext GetInputMethodContext( TextEditor textEditor );
 
+/**
+ * @brief Max Characters Exceed signal type.
+  */
+using MaxLengthReachedSignalType = Signal< void ( TextEditor ) >;
+
+/**
+ * @brief This signal is emitted when inserted text exceeds the maximum character limit.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( TextEditor textEditor );
+ * @endcode
+ * @param[in] textEditor The instance of TextEditor.
+ * @return The signal to connect to
+ */
+DALI_TOOLKIT_API MaxLengthReachedSignalType& MaxLengthReachedSignal( TextEditor textEditor );
+
 } // namespace DevelTextEditor
 
 } // namespace Toolkit
 } // namespace DevelTextEditor
 
 } // namespace Toolkit