Make cursor invisible when exceeds the boundaries of the Text Control.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / decorator / text-decorator.h
index f0bfd39..14e1212 100644 (file)
@@ -167,9 +167,15 @@ public:
    * @brief The decorator waits until a relayout before creating actors etc.
    *
    * @param[in] size The size of the parent control after size-negotiation.
-   * @param[in] scrollPosition The cursor, grab-handle positions etc. should be offset by this.
    */
-  void Relayout( const Dali::Vector2& size, const Vector2& scrollPosition );
+  void Relayout( const Dali::Vector2& size );
+
+  /**
+   * @brief Updates the decorator's actor positions after scrolling.
+   *
+   * @param[in] scrollOffset The scroll offset.
+   */
+  void UpdatePositions( const Vector2& scrollOffset );
 
   /**
    * @brief Sets which of the cursors are active.
@@ -192,19 +198,30 @@ public:
    * @param[in] cursor The cursor to set.
    * @param[in] x The x position relative to the top-left of the parent control.
    * @param[in] y The y position relative to the top-left of the parent control.
-   * @param[in] height The logical height of the cursor.
+   * @param[in] cursorHeight The logical height of the cursor.
+   * @param[in] lineHeight The logical height of the line.
    */
-  void SetPosition( Cursor cursor, float x, float y, float height );
+  void SetPosition( Cursor cursor, float x, float y, float cursorHeight, float lineHeight );
 
   /**
-   * @brief Retrieves the position of a cursor.
+   * @brief Retrieves the position, height and lineHeight of a cursor.
    *
    * @param[in] cursor The cursor to get.
    * @param[out] x The x position relative to the top-left of the parent control.
    * @param[out] y The y position relative to the top-left of the parent control.
-   * @param[out] height The logical height of the cursor.
+   * @param[out] cursorHeight The logical height of the cursor.
+   * @param[out] lineHeight The logical height of the line.
    */
-  void GetPosition( Cursor cursor, float& x, float& y, float& height ) const;
+  void GetPosition( Cursor cursor, float& x, float& y, float& cursorHeight, float& lineHeight ) const;
+
+  /**
+   * @brief Retrieves the position of a cursor.
+   *
+   * @param[in] cursor The cursor to get.
+   *
+   * @return The position.
+   */
+  const Vector2& GetPosition( Cursor cursor ) const;
 
   /**
    * @brief Sets the color for a cursor.
@@ -309,9 +326,9 @@ public:
    * @param[in] handle The handle to set.
    * @param[in] x The x position relative to the top-left of the parent control.
    * @param[in] y The y position relative to the top-left of the parent control.
-   * @param[in] cursorHeight The logical cursor height at this position.
+   * @param[in] lineHeight The logical line height at this position.
    */
-  void SetPosition( SelectionHandle handle, float x, float y, float cursorHeight );
+  void SetPosition( SelectionHandle handle, float x, float y, float lineHeight );
 
   /**
    * @brief Retrieves the position of a selection handle.
@@ -369,7 +386,6 @@ public:
    */
   bool IsPopupActive() const;
 
-
 protected:
 
   /**