X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Ftext-controls%2Ftext-label-devel.h;h=d60c205a7855055eabb27ed14936b122c232527b;hp=9b3e4db29493b0afe61cb47824141ab22c981c9c;hb=a70d28d882e56f123f8eec322b4ca9594b2307cd;hpb=b05a852e155e887cb0e9e1018205c57bfbbfa334 diff --git a/dali-toolkit/devel-api/controls/text-controls/text-label-devel.h b/dali-toolkit/devel-api/controls/text-controls/text-label-devel.h index 9b3e4db..d60c205 100644 --- a/dali-toolkit/devel-api/controls/text-controls/text-label-devel.h +++ b/dali-toolkit/devel-api/controls/text-controls/text-label-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_LABEL_DEVEL_H /* - * Copyright (c) 2020 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. @@ -95,7 +95,7 @@ enum Type /** * @brief Modifies the default text alignment to match the direction of the system language. * @details Name "matchSystemLanguageDirection", type (Property::BOLEAN), Read/Write - * @note The default value is false + * @note The default value is true * * If MATCH_SYSTEM_LANGUAGE_DIRECTION property set true, the default text alignment to match the direction of the system language. * @@ -105,10 +105,10 @@ enum Type * * | TextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION | * |----------------------------------------------------------------------- - * | false (default) | true | + * | false | true (default) | * |-----------------------------------|----------------------------------| * | Hello world | Hello world | - * | ﻡﺮﺤﺑﺍ. | ﻡﺮﺤﺑﺍ. | + * | ﻡﺮﺤﺑﺍ. | ﻡﺮﺤﺑﺍ. | * */ MATCH_SYSTEM_LANGUAGE_DIRECTION, @@ -154,10 +154,88 @@ enum Type * - fontSize: 10pt, fontSizeScale: 1.5 */ FONT_SIZE_SCALE, + + /** + * @brief True to enable the font size scale or false to disable. + * @details Name "enableFontSizeScale", type Property::BOOLEAN. + * @note The default value is true. + * If false, font size scale is not apppied. + */ + ENABLE_FONT_SIZE_SCALE, + + /** + * @brief The enumerations used to specify whether to position the ellipsis at the END, START or MIDDLE of the text. + * @details Name "EllipsisPosition", type [Type](@ref Dali::Toolkit::DevelText::EllipsisPosition::Type) (Property::INTEGER), or Property::STRING. Read/Write + * @note Default is EllipsisPosition::END. + * @see DevelText::EllipsisPosition + */ + ELLIPSIS_POSITION, }; } // namespace Property +/** + * @brief Get the rendered size of a specific text range. + * if the requested text is at multilines, multiple sizes will be returned for each text located in a separate line. + * if a line contains characters with different directions, multiple sizes will be returned for each block of contiguous characters with the same direction. + * + * @param[in] textLabel The instance of TextLabel. + * @param[in] startIndex start index of the text requested to calculate size for. + * @param[in] endIndex end index(included) of the text requested to calculate size for. + * @return list of sizes of the reuested text. + */ +DALI_TOOLKIT_API Vector GetTextSize(TextLabel textLabel, const uint32_t startIndex, const uint32_t endIndex); + +/** + * @brief Get the top/left rendered position of a specific text range. + * if the requested text is at multilines, multiple positions will be returned for each text located in a separate line. + * if a line contains characters with different directions, multiple positions will be returned for each block of contiguous characters with the same direction. + * + * @param[in] textLabel The instance of TextLabel. + * @param[in] startIndex start index of the text requested to get position to. + * @param[in] endIndex end index(included) of the text requested to get position to. + * @return list of positions of the requested text. + */ +DALI_TOOLKIT_API Vector GetTextPosition(TextLabel textLabel, const uint32_t startIndex, const uint32_t endIndex); + +/** + * @brief Anchor clicked signal type. + * + * @note Signal + * - const char* : href of clicked anchor. + * - uint32_t : length of href. + */ +using AnchorClickedSignalType = Signal; + +/** + * @brief TextFit property changed signal type. + */ +using TextFitChangedSignalType = Signal; + +/** + * @brief This signal is emitted when the anchor is clicked. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName(TextLabel textLabel, const char* href, uint32_t hrefLength); + * @endcode + * @param[in] textLabel The instance of TextLabel. + * @return The signal to connect to. + */ +DALI_TOOLKIT_API AnchorClickedSignalType& AnchorClickedSignal(TextLabel textLabel); + +/** + * @brief This signal is emitted when the textfit property is changed. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName(TextLabel textLabel); + * @endcode + * @param[in] textLabel The instance of TextLabel. + * @return The signal to connect to. + */ +DALI_TOOLKIT_API TextFitChangedSignalType& TextFitChangedSignal(TextLabel textLabel); + } // namespace DevelTextLabel } // namespace Toolkit