X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-helper-functions.h;h=d7633182d19a3e3704240948dadb6015981253a8;hb=7027b808143d4f086636c21597336d37678ccb2b;hp=490e51fc3e9517ab825d0763b6f4666a131898e7;hpb=d0b0cfa4a44953be9af9128885eb6ef5d83a214e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/markup-processor-helper-functions.h b/dali-toolkit/internal/text/markup-processor-helper-functions.h index 490e51f..d763318 100644 --- a/dali-toolkit/internal/text/markup-processor-helper-functions.h +++ b/dali-toolkit/internal/text/markup-processor-helper-functions.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_HELPER_FUNCTIONS_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ // INTERNAL INCLUDES #include +#include namespace Dali { @@ -183,6 +184,35 @@ void StringToVector2(const char* const vectorStr, Length length, Vector2& vector */ void Vector2ToString(const Vector2& value, std::string& vector2Str); +/** + * @brief Converts a string into its value in the enum Text::Underline::Type. + * + * @param[in] typeStr The underline type value packed inside a string. + * @param[in] length The length of the string. + * @param[out] retType The Underline type. + */ +void UnderlineTypeStringToTypeValue(const char* const typeStr, Length length, Text::Underline::Type& retType); + +/** + * @brief Converts a string into a float value. + * + * @param[in] floatStr A float packed inside a string. + * + * @return The float value. + */ +float StringToFloat(const char* const floatStr); + +/** + * @brief Converts a string into its value in the enum Text::HorizontalAlignment::Type. + * + * @param[in] typeStr The horizontal-alignment type value packed inside a string. + * @param[in] length The length of the string. + * @param[out] retType The HorizontalAlignment type. + * + * @return Whether the value parsed or not. + */ +bool HorizontalAlignmentTypeStringToTypeValue(const char* const typeStr, Length length, Text::HorizontalAlignment::Type& retType); + } // namespace Text } // namespace Toolkit