Merge "Added missing newline chars to logging commands" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / cursor-helper-functions.h
index 08c21a3..5896b4d 100644 (file)
@@ -70,6 +70,19 @@ LineIndex GetClosestLine( VisualModelPtr visualModel,
                           float visualY );
 
 /**
+ * @brief Calculates the vertical line's offset for a given line.
+ *
+ * @pre @p lineIndex must be between 0 and the number of lines (both inclusive).
+ *
+ * @param[in] lines The laid-out lines.
+ * @param[in] lineIndex Index to the line.
+ *
+ * @return The vertical offset of the given line.
+ */
+float CalculateLineOffset( const Vector<LineRun>& lines,
+                           LineIndex lineIndex );
+
+/**
  * @brief Retrieves the cursor's logical position for a given touch point x,y
  *
  * @param[in] visualModel The visual model.
@@ -115,8 +128,10 @@ void GetCursorPosition( VisualModelPtr visualModel,
  * @param[in] visualY The touch point 'y' in text's coords.
  * @param[out] startIndex Index to the first character of the selected word.
  * @param[out] endIndex Index to the last character of the selected word.
+ *
+ * @return @e true if the indices are found.
  */
-void FindSelectionIndices( VisualModelPtr visualModel,
+bool FindSelectionIndices( VisualModelPtr visualModel,
                            LogicalModelPtr logicalModel,
                            MetricsPtr metrics,
                            float visualX,