X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fcursor-helper-functions.h;h=ad17b3179f1e8fe33014bf83789ce80c3135c297;hp=34a5f7bdc0d883cabaa3037f8be53bc3038db9f5;hb=5177de187f2bb2736603cbd10f99e3a50084ebc7;hpb=45a1e034747d2eb32a39ad8cad00cf38500ab113 diff --git a/dali-toolkit/internal/text/cursor-helper-functions.h b/dali-toolkit/internal/text/cursor-helper-functions.h index 34a5f7b..ad17b31 100644 --- a/dali-toolkit/internal/text/cursor-helper-functions.h +++ b/dali-toolkit/internal/text/cursor-helper-functions.h @@ -71,6 +71,18 @@ struct CursorInfo }; /** + * @brief Parameters passed to the GetCursorPosition() function. + */ +struct GetCursorPositionParameters +{ + VisualModelPtr visualModel; ///< The visual model. + LogicalModelPtr logicalModel; ///< The logical model. + MetricsPtr metrics; ///< A wrapper around FontClient used to get metrics. + CharacterIndex logical; ///< The logical cursor position (in characters). 0 is just before the first character, a value equal to the number of characters is just after the last character. + bool isMultiline; ///< Whether the text control is multi-line. +}; + +/** * @brief Retrieves the closest line for a given touch point. * * It returns the first line if the touch point is above the text and the last line if the touch point is below. @@ -130,16 +142,10 @@ CharacterIndex GetClosestCursorIndex( VisualModelPtr visualModel, * It retrieves as well the line's height and the cursor's height and * if there is a valid alternative cursor, its position and height. * - * @param[in] visualModel The visual model. - * @param[in] logicalModel The logical model. - * @param[in] metrics A wrapper around FontClient used to get metrics. - * @param[in] logical The logical cursor position (in characters). 0 is just before the first character, a value equal to the number of characters is just after the last character. + * @param[in] parameters Parameters used to calculate the cursor's position. * @param[out] cursorInfo The line's height, the cursor's height, the cursor's position and whether there is an alternative cursor. */ -void GetCursorPosition( VisualModelPtr visualModel, - LogicalModelPtr logicalModel, - MetricsPtr metrics, - CharacterIndex logical, +void GetCursorPosition( GetCursorPositionParameters& parameters, CursorInfo& cursorInfo ); /**