Separate handling of events which modify the Model
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.h
index 46bf38f..82672e6 100644 (file)
@@ -215,11 +215,35 @@ public:
   bool Relayout( const Vector2& size );
 
   /**
-   * @brief Update the model with new text.
+   * @brief Process queued events which modify the model.
+   */
+  void ProcessModifyEvents();
+
+  /**
+   * @brief Used to process an event queued from SetText()
    *
-   * @param[in] operations The layout operations which need to be done.
+   * @param[in] newText The new text to store in the logical model.
+   */
+  void ReplaceTextEvent( const std::string& newText );
+
+  /**
+   * @brief Used to process an event queued from key events etc.
+   *
+   * @param[in] text The text to insert into the logical model.
    */
-  void ReplaceText( OperationsMask operations );
+  void InsertTextEvent( const std::string& text );
+
+  /**
+   * @brief Used to process an event queued from backspace key etc.
+   */
+  void DeleteTextEvent();
+
+  /**
+   * @brief Update the model following text replace/insert etc.
+   *
+   * @param[in] operationsRequired The layout operations which need to be done.
+   */
+  void UpdateModel( OperationsMask operationsRequired );
 
   /**
    * @brief Lays-out the text.
@@ -248,6 +272,8 @@ public:
    */
   View& GetView();
 
+  // Text-input Event Queuing
+
   /**
    * @brief Caller by editable UI controls when keyboard focus is gained.
    */