X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Ftext-controls%2Ftext-label.h;h=2d91933ea9b5f89538400bd6270526488dd0d666;hb=HEAD;hp=653674672ebbb10e454488fecfd4f9e7af7b8262;hpb=410125f32fcd135226a2a0a668b2855ea9e17a69;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/text-controls/text-label.h b/dali-toolkit/public-api/controls/text-controls/text-label.h index 6536746..2d91933 100644 --- a/dali-toolkit/public-api/controls/text-controls/text-label.h +++ b/dali-toolkit/public-api/controls/text-controls/text-label.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_LABEL_H__ -#define __DALI_TOOLKIT_TEXT_LABEL_H__ +#ifndef DALI_TOOLKIT_TEXT_LABEL_H +#define DALI_TOOLKIT_TEXT_LABEL_H /* - * Copyright (c) 2017 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. @@ -23,10 +23,8 @@ namespace Dali { - namespace Toolkit { - namespace Internal DALI_INTERNAL { class TextLabel; @@ -44,7 +42,6 @@ class TextLabel; * @section TextLabelProperties Properties * |%Property enum |String name |Type |Writable|Animatable| * |----------------------------------|---------------------|----------------|--------|----------| - * | Property::RENDERING_BACKEND | renderingBackend | INTEGER | O | X | * | Property::TEXT | text | STRING | O | X | * | Property::FONT_FAMILY | fontFamily | STRING | O | X | * | Property::FONT_STYLE | fontStyle | STRING or MAP | O | X | @@ -63,10 +60,9 @@ class TextLabel; * * @SINCE_1_0.0 */ -class DALI_IMPORT_API TextLabel : public Control +class DALI_TOOLKIT_API TextLabel : public Control { public: - /** * @brief Enumeration for the start and end property ranges for this control. * @SINCE_1_0.0 @@ -74,10 +70,10 @@ public: enum PropertyRange { PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0 - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_0.0 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_0.0 - ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ///< @SINCE_1_2.60 - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_2.60 + ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ///< @SINCE_1_2.60 + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_2.60 }; /** @@ -97,19 +93,11 @@ public: /////////////////////////////////////////////////////////////////////////////// /** - * @DEPRECATED_1_2.53 No longer be supported and will be ignored. - * @brief The type of rendering e.g. bitmap-based. - * @details Name "renderingBackend", type Property::INT. - * @SINCE_1_0.0 - */ - RENDERING_BACKEND = PROPERTY_START_INDEX, - - /** * @brief The text to display in UTF-8 format. * @details Name "text", type Property::STRING. * @SINCE_1_0.0 */ - TEXT, + TEXT = PROPERTY_START_INDEX, /** * @brief The requested font family to use. @@ -161,49 +149,6 @@ public: VERTICAL_ALIGNMENT, /** - * @DEPRECATED_1_2.60 Use the new enum value of TEXT_COLOR instead. - * @brief The color of the text. - * @details Name "unusedPropertyTextColor", type Property::VECTOR4. - * @SINCE_1_0.0 - */ - UNUSED_PROPERTY_TEXT_COLOR, - - /** - * @DEPRECATED_1_1.37 Use SHADOW instead - * @brief The drop shadow offset 0 indicates no shadow. - * @details Name "shadowOffset", type Property::VECTOR2. - */ - SHADOW_OFFSET, - - /** - * @DEPRECATED_1_1.37 Use SHADOW instead - * @brief The color of a drop shadow. - * @details Name "shadowColor", type Property::VECTOR4 - */ - SHADOW_COLOR, - - /** - * @DEPRECATED_1_1.37 Use UNDERLINE instead - * @brief The underline enabled flag. - * @details Name "underlineEnabled", type Property::BOOLEAN. - */ - UNDERLINE_ENABLED, - - /** - * @DEPRECATED_1_1.37 Use UNDERLINE instead - * @brief The color of the underline. - * @details Name "underlineColor", type Property::VECTOR4. - */ - UNDERLINE_COLOR, - - /** - * @DEPRECATED_1_1.37 Use UNDERLINE instead - * @brief Overrides the underline height from font metrics. - * @details Name "underlineHeight", type Property::FLOAT. - */ - UNDERLINE_HEIGHT, - - /** * @brief Whether the mark-up processing is enabled. * @details Name "enableMarkup", type Property::BOOLEAN. * @SINCE_1_0.0 @@ -240,6 +185,7 @@ public: * @details Name "autoScrollGap", type Property::INT. * @SINCE_1_1.35 * @note Default in style sheet but can be overridden to prevent same text being shown at start and end. + * @note Displayed gap size is not guaranteed if the text length plus gap exceeds the maximum texture size (i.e. GL_MAX_TEXTURE_SIZE). */ AUTO_SCROLL_GAP, @@ -253,6 +199,15 @@ public: /** * @brief The default underline parameters. * @details Name "underline", type Property::MAP. + * + * The underline map contains the following keys: + * + * | %Property Name | Type | Required | Description | + * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------| + * | enable | BOOLEAN | No | True to enable the underline or false to disable (the default value is false) | + * | color | VECTOR4 | No | The color of the underline (the default value is Color::BLACK) | + * | height | FLOAT | No | The height of the underline (the default value is 0) | + * * @SINCE_1_2.13 */ UNDERLINE, @@ -260,6 +215,15 @@ public: /** * @brief The default shadow parameters. * @details Name "shadow", type Property::MAP. + * + * The shadow map contains the following keys: + * + * | %Property Name | Type | Required | Description | + * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------| + * | color | VECTOR4 | No | The color of the shadow (the default value is Color::BLACK) | + * | offset | VECTOR2 | No | The offset from the text to draw the shadow in the X and Y axes (the default value is 0 which means no shadow) | + * | blurRadius | FLOAT | No | The radius of blur to be applied to the shadow (the default value is 0 which means no blur) | + * * @SINCE_1_2.13 */ SHADOW, @@ -274,6 +238,14 @@ public: /** * @brief The default outline parameters. * @details Name "outline", type Property::MAP. + * + * The outline map contains the following keys: + * + * | %Property Name | Type | Required | Description | + * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------| + * | color | VECTOR4 | No | The color of the outline (the default value is Color::WHITE) | + * | width | INTEGER | No | The width of the outline (the default value is 0 which means no outline) | + * * @SINCE_1_2.13 */ OUTLINE, @@ -310,7 +282,7 @@ public: */ AUTO_SCROLL_STOP_MODE, - /* + /** * @brief The line count of text. * @details name "lineCount", type Property::INTEGER. * @SINCE_1_2.60 @@ -387,8 +359,8 @@ public: */ enum Type { - FINISH_LOOP = 0, ///< Stop animation after current loop finishes. @SINCE_1_2.60 - IMMEDIATE ///< Stop animation immediately and reset position. @SINCE_1_2.60 + FINISH_LOOP = 0, ///< Stop animation after current loop finishes. @SINCE_1_2.60 + IMMEDIATE ///< Stop animation immediately and reset position. @SINCE_1_2.60 }; }; @@ -407,7 +379,26 @@ public: * @param[in] text The text to display * @return A handle to the TextLabel control */ - static TextLabel New( const std::string& text ); + static TextLabel New(const std::string& text); + + /** + * @brief Creates the TextLabel control with additional behaviour. + * + * @SINCE_2_1.8 + * @param[in] additionalBehaviour Additional control behaviour + * @return A handle to the TextLabel control + */ + static TextLabel New(ControlBehaviour additionalBehaviour); + + /** + * @brief Creates the TextLabel control with additional behaviour. + * + * @SINCE_2_1.8 + * @param[in] additionalBehaviour Additional control behaviour + * @param[in] text The text to display + * @return A handle to the TextLabel control + */ + static TextLabel New(ControlBehaviour additionalBehaviour, const std::string& text); /** * @brief Creates an empty handle. @@ -421,7 +412,15 @@ public: * @SINCE_1_0.0 * @param[in] handle The handle to copy from */ - TextLabel( const TextLabel& handle ); + TextLabel(const TextLabel& handle); + + /** + * @brief Move constructor + * @SINCE_1_9.23 + * + * @param[in] rhs A reference to the moved handle + */ + TextLabel(TextLabel&& rhs) noexcept; /** * @brief Assignment operator. @@ -430,7 +429,16 @@ public: * @param[in] handle The handle to copy from * @return A reference to this */ - TextLabel& operator=( const TextLabel& handle ); + TextLabel& operator=(const TextLabel& handle); + + /** + * @brief Move assignment + * @SINCE_1_9.23 + * + * @param[in] rhs A reference to the moved handle + * @return A reference to this + */ + TextLabel& operator=(TextLabel&& rhs) noexcept; /** * @brief Destructor. @@ -450,10 +458,9 @@ public: * @param[in] handle Handle to an object * @return Handle to a TextLabel or an empty handle */ - static TextLabel DownCast( BaseHandle handle ); + static TextLabel DownCast(BaseHandle handle); public: // Not intended for application developers - /// @cond internal /** * @brief Creates a handle using the Toolkit::Internal implementation. @@ -461,7 +468,7 @@ public: // Not intended for application developers * @SINCE_1_0.0 * @param[in] implementation The Control implementation */ - DALI_INTERNAL TextLabel( Internal::TextLabel& implementation ); + DALI_INTERNAL TextLabel(Internal::TextLabel& implementation); /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. @@ -469,7 +476,7 @@ public: // Not intended for application developers * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor */ - explicit DALI_INTERNAL TextLabel( Dali::Internal::CustomActor* internal ); + explicit DALI_INTERNAL TextLabel(Dali::Internal::CustomActor* internal); /// @endcond }; @@ -480,4 +487,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_LABEL_H__ +#endif // DALI_TOOLKIT_TEXT_LABEL_H