X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Ftext-controls%2Ftext-label-devel.h;h=e0e877c3529328dbb3ce183d7f532763c05d37b4;hb=1d716f1ce092f9197562859fb357ba922d800fa7;hp=dfcd279226e894be1924329e1ff4ac585c4df43d;hpb=af0625200898f1861270555be616d7848a1d0b6c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 old mode 100644 new mode 100755 index dfcd279..e0e877c --- 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) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -30,24 +30,10 @@ namespace Toolkit namespace DevelTextLabel { -/** - * @brief Enumeration for the start and end property ranges for this control. - * @SINCE_1_0.0 - */ -enum PropertyRange -{ - ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices -}; - namespace Property { enum Type { - /////////////////////////////////////////////////////////////////////////////// - // Event side (non-animatable) properties - /////////////////////////////////////////////////////////////////////////////// - RENDERING_BACKEND = Dali::Toolkit::TextLabel::Property::RENDERING_BACKEND, TEXT = Dali::Toolkit::TextLabel::Property::TEXT, FONT_FAMILY = Dali::Toolkit::TextLabel::Property::FONT_FAMILY, @@ -56,12 +42,7 @@ namespace Property MULTI_LINE = Dali::Toolkit::TextLabel::Property::MULTI_LINE, HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, VERTICAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, - TEXT_COLOR = Dali::Toolkit::TextLabel::Property::TEXT_COLOR, - SHADOW_OFFSET = Dali::Toolkit::TextLabel::Property::SHADOW_OFFSET, - SHADOW_COLOR = Dali::Toolkit::TextLabel::Property::SHADOW_COLOR, - UNDERLINE_ENABLED = Dali::Toolkit::TextLabel::Property::UNDERLINE_ENABLED, - UNDERLINE_COLOR = Dali::Toolkit::TextLabel::Property::UNDERLINE_COLOR, - UNDERLINE_HEIGHT = Dali::Toolkit::TextLabel::Property::UNDERLINE_HEIGHT, + UNUSED_PROPERTY_TEXT_COLOR = Dali::Toolkit::TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR, ENABLE_MARKUP = Dali::Toolkit::TextLabel::Property::ENABLE_MARKUP, ENABLE_AUTO_SCROLL = Dali::Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL, AUTO_SCROLL_SPEED = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_SPEED, @@ -72,104 +53,75 @@ namespace Property SHADOW = Dali::Toolkit::TextLabel::Property::SHADOW, EMBOSS = Dali::Toolkit::TextLabel::Property::EMBOSS, OUTLINE = Dali::Toolkit::TextLabel::Property::OUTLINE, + PIXEL_SIZE = Dali::Toolkit::TextLabel::Property::PIXEL_SIZE, + ELLIPSIS = Dali::Toolkit::TextLabel::Property::ELLIPSIS, + AUTO_SCROLL_LOOP_DELAY = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, + AUTO_SCROLL_STOP_MODE = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_STOP_MODE, + LINE_COUNT = Dali::Toolkit::TextLabel::Property::LINE_COUNT, + LINE_WRAP_MODE = Dali::Toolkit::TextLabel::Property::LINE_WRAP_MODE, /** - * @brief The size of font in pixels. - * @details Name "pixelSize", type Property::FLOAT. - * Conversion from Point size to Pixel size: - * Pixel size = Point size * DPI / 72 + * @brief The direction of the layout. + * @details Name "textDirection", type [Type](@ref Dali::Toolkit::DevelText::TextDirection::Type) (Property::INTEGER), Read/Write + * @note The text direction can be changed only by replacing the text itself. + * @see TextDirection::Type for supported values. */ - PIXEL_SIZE = OUTLINE + 1, + TEXT_DIRECTION, /** - * @brief Enable or disable the ellipsis. - * @details Name "ellipsis", type Property::BOOLEAN. + * @brief Alignment of text within area of single line + * @details Name "verticalLineAlignment", type [Type](@ref Dali::Toolkit::DevelText::VerticalLineAlignment::Type) (Property::INTEGER), Read/Write + * @note The default value is TOP + * @see VerticalLineAlignment::Type for supported values */ - ELLIPSIS = OUTLINE + 2, + VERTICAL_LINE_ALIGNMENT, /** - * @brief delay starting time of auto scrolling and further loops - * @details Name "autoScrollLoopDelay", type Property::FLOAT. + * @brief The default text background parameters. + * @details Name "textBackground", type Property::MAP. + * @note Use "textBackground" as property name to avoid conflict with Control's "background" property + * + * The background map contains the following keys: + * + * | %Property Name | Type | Required | Description | + * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------| + * | enable | BOOLEAN | No | True to enable the background or false to disable (the default value is false) | + * | color | VECTOR4 | No | The color of the background (the default value is Color::CYAN) | */ - AUTO_SCROLL_LOOP_DELAY = OUTLINE + 3, + BACKGROUND, /** - * @brief Auto scrolling stop behaviour. - * @details Name "autoScrollStopMode", type [Type](@ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode::Type) (Property::INTEGER) or Property::STRING. - * Values FINISH_LOOP, IMMEDIATE, default FINISH_LOOP + * @brief Ignore spaces after text. + * @details Name "ignoreSpacesAfterText", type (Property::BOLEAN), Read/Write + * @note The default value is true */ - AUTO_SCROLL_STOP_MODE = OUTLINE + 4, - - /* - * @brief The line count of text. - * @details name "lineCount", type int - * @node This property is read-only. - */ - LINE_COUNT = OUTLINE + 5, + IGNORE_SPACES_AFTER_TEXT, /** - * @brief line wrap mode when the text lines over layout width. - * @details Name "lineWrapMode", type Property::STRING. + * @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 + * + * If MATCH_SYSTEM_LANGUAGE_DIRECTION property set true, the default text alignment to match the direction of the system language. + * + * ex) Current system language direction LTR. + * TextLabel::New("Hello world \n ﻡﺮﺤﺑﺍ. "); + * TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" + * + * | TextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION | + * |----------------------------------------------------------------------- + * | false (default) | true | + * |-----------------------------------|----------------------------------| + * | Hello world | Hello world | + * | ﻡﺮﺤﺑﺍ. | ﻡﺮﺤﺑﺍ. | + * */ - LINE_WRAP_MODE = OUTLINE + 6, - - /////////////////////////////////////////////////////////////////////////////// - // Animatable Properties - /////////////////////////////////////////////////////////////////////////////// - - /* - * @brief Animatable text color. - * @details Name "textColorAnimatable", type Property::VECTOR4. - * Text color property to use if required to animate the text color. - */ - TEXT_COLOR_ANIMATABLE = ANIMATABLE_PROPERTY_START_INDEX, - - /** - * @brief The red component of the text color. - * @details Name "textColorRed", type Property::FLOAT. - * @see TEXT_COLOR_ANIMATABLE - */ - TEXT_COLOR_RED = ANIMATABLE_PROPERTY_START_INDEX + 1, - - /** - * @brief The green component of the text color. - * @details Name "textColorGreen", type Property::FLOAT. - * @see TEXT_COLOR_ANIMATABLE - */ - TEXT_COLOR_GREEN = ANIMATABLE_PROPERTY_START_INDEX + 2, - - /** - * @brief The blue component of the text color. - * @details Name "textColorBlue", type Property::FLOAT. - * @see TEXT_COLOR_ANIMATABLE - */ - TEXT_COLOR_BLUE = ANIMATABLE_PROPERTY_START_INDEX + 3, - - /** - * @brief The alpha component of the text color. - * @details Name "textColorAlpha", type Property::FLOAT. - * @see TEXT_COLOR_ANIMATABLE - */ - TEXT_COLOR_ALPHA = ANIMATABLE_PROPERTY_START_INDEX + 4, + MATCH_SYSTEM_LANGUAGE_DIRECTION, }; -} // namespace Property -/** -* @brief The type for TextLabel::Property::AUTO_SCROLL_STOP_MODE -*/ -namespace AutoScrollStopMode -{ -/** -* @ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode -*/ -enum Type -{ - FINISH_LOOP = 0, ///< stop animation after current loop finished. - IMMEDIATE ///< stop animation immediatly and reset position. -}; -} // namespace AutoScrollStopMode +} // namespace Property -} // namespace DevelText +} // namespace DevelTextLabel } // namespace Toolkit