TextColor Animatable
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-label-devel.h
1 #ifndef DALI_TOOLKIT_TEXT_LABEL_DEVEL_H
2 #define DALI_TOOLKIT_TEXT_LABEL_DEVEL_H
3
4 /*
5  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace DevelTextLabel
31 {
32
33 /**
34  * @brief Enumeration for the start and end property ranges for this control.
35  * @SINCE_1_0.0
36  */
37 enum PropertyRange
38 {
39   ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
40   ANIMATABLE_PROPERTY_END_INDEX =   ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices
41 };
42
43 namespace Property
44 {
45   enum Type
46   {
47       RENDERING_BACKEND = Dali::Toolkit::TextLabel::Property::RENDERING_BACKEND,
48       TEXT = Dali::Toolkit::TextLabel::Property::TEXT,
49       FONT_FAMILY = Dali::Toolkit::TextLabel::Property::FONT_FAMILY,
50       FONT_STYLE = Dali::Toolkit::TextLabel::Property::FONT_STYLE,
51       POINT_SIZE = Dali::Toolkit::TextLabel::Property::POINT_SIZE,
52       MULTI_LINE = Dali::Toolkit::TextLabel::Property::MULTI_LINE,
53       HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,
54       VERTICAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,
55       TEXT_COLOR = Dali::Toolkit::TextLabel::Property::TEXT_COLOR,
56       SHADOW_OFFSET = Dali::Toolkit::TextLabel::Property::SHADOW_OFFSET,
57       SHADOW_COLOR = Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,
58       UNDERLINE_ENABLED = Dali::Toolkit::TextLabel::Property::UNDERLINE_ENABLED,
59       UNDERLINE_COLOR = Dali::Toolkit::TextLabel::Property::UNDERLINE_COLOR,
60       UNDERLINE_HEIGHT = Dali::Toolkit::TextLabel::Property::UNDERLINE_HEIGHT,
61       ENABLE_MARKUP = Dali::Toolkit::TextLabel::Property::ENABLE_MARKUP,
62       ENABLE_AUTO_SCROLL = Dali::Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL,
63       AUTO_SCROLL_SPEED = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_SPEED,
64       AUTO_SCROLL_LOOP_COUNT = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT,
65       AUTO_SCROLL_GAP = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_GAP,
66       LINE_SPACING = Dali::Toolkit::TextLabel::Property::LINE_SPACING,
67       UNDERLINE = Dali::Toolkit::TextLabel::Property::UNDERLINE,
68       SHADOW = Dali::Toolkit::TextLabel::Property::SHADOW,
69       EMBOSS = Dali::Toolkit::TextLabel::Property::EMBOSS,
70       OUTLINE = Dali::Toolkit::TextLabel::Property::OUTLINE,
71
72       /**
73        * @brief The size of font in pixels.
74        *
75        * Conversion from Point size to Pixel size :
76        *  Pixel size = Point size * DPI / 72
77        * @details name "pixelSize", type float
78        */
79       PIXEL_SIZE = OUTLINE + 1,
80
81       /**
82        * @brief Enable or disable the ellipsis.
83        * @details name "ellipsis", type bool
84        */
85       ELLIPSIS = OUTLINE + 2,
86
87       /**
88        * @brief delay starting time of auto scrolling and further loops
89        * @details name "autoScrollLoopDelay", type float.
90        */
91       AUTO_SCROLL_LOOP_DELAY = OUTLINE + 3,
92
93       /**
94        * @brief Auto scrolling stop behaviour.
95        * @details name "autoScrollStopMode", type [Type](@ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode::Type) (Property::INTEGER) or Property::STRING.
96        *          values FINISH_LOOP, IMMEDIATE, defualt FINISH_LOOP
97        */
98       AUTO_SCROLL_STOP_MODE = OUTLINE + 4,
99
100       /*
101        * @brief The line count of text.
102        * @details name "lineCount", type int
103        * @node this property is read-only.
104        */
105       LINE_COUNT = OUTLINE + 5,
106
107       /**
108        * @brief line wrap mode when the text lines over layout width.
109        * @details name "lineWrapMode", type string.
110        */
111       LINE_WRAP_MODE = OUTLINE + 6,
112
113       /*
114        * @brief Animatable text color
115        * @details text color property to use if required to animate the text color
116        */
117       TEXT_COLOR_ANIMATABLE = ANIMATABLE_PROPERTY_START_INDEX
118
119   };
120 } // namespace Property
121
122 /**
123 * @brief The type for TextLabel::Property::AUTO_SCROLL_STOP_MODE
124 */
125 namespace AutoScrollStopMode
126 {
127 /**
128 * @ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode
129 */
130 enum Type
131 {
132   FINISH_LOOP = 0,  ///< stop animation after current loop finished.
133   IMMEDIATE         ///< stop animation immediatly and reset position.
134 };
135 } // namespace AutoScrollStopMode
136
137 } // namespace DevelText
138
139 } // namespace Toolkit
140
141 } // namespace Dali
142
143 #endif // DALI_TOOLKIT_TEXT_LABEL_DEVEL_H