Merge "Add ApplyCustomFragmentPrefix" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-enumerations-impl.h
1 #ifndef DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H
2 #define DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H
3
4 /*
5  * Copyright (c) 2021 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 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/property-value.h>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/public-api/text/text-enumerations.h>
26
27 // DEVEL INCLUDES
28 #include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
29 namespace Dali
30 {
31 namespace Toolkit
32 {
33 namespace Text
34 {
35 /**
36  * @brief Get the alignment from the provided property value.
37  * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
38  * @param[out] alignment The resulting alignment from the given source
39  * @return true if the resulting alignment has been updated
40  */
41 bool GetHorizontalAlignmentEnumeration(const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment);
42
43 /**
44  * @brief Get the alignment from the provided property value.
45  * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
46  * @param[out] alignment The resulting alignment from the given source
47  * @return true if the resulting alignment has been updated
48  */
49 bool GetVerticalAlignmentEnumeration(const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment);
50
51 /**
52  * @brief Get the line-wrap-mode from the provided property value.
53  * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
54  * @param[out] alignment The resulting lineWrapMode from the given source
55  * @return true if the resulting lineWrapMode has been updated
56  */
57 bool GetLineWrapModeEnumeration(const Property::Value& propertyValue, Toolkit::Text::LineWrap::Mode& lineWrapMode);
58
59 /**
60  * @brief Get the alignment string from the provided alignment string.
61  * @param[in] alignment the Text::HORIZONTAL enum source
62  * @return the string equivalent
63  */
64 const char* GetHorizontalAlignmentString(const Toolkit::Text::HorizontalAlignment::Type& alignment);
65
66 /**
67  * @brief Get the alignment string from the provided alignment string.
68  * @param[in] alignment the Text::VerticalAlignment enum source
69  * @return the string equivalent
70  */
71 const char* GetVerticalAlignmentString(const Toolkit::Text::VerticalAlignment::Type& alignment);
72
73 /**
74  * @brief Get the ellipsis-location-type from the provided property value.
75  * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
76  * @param[out] ellipsisPositionType The resulting ellipsisPositionType from the given source
77  * @return true if the resulting ellipsisPositionType has been updated
78  */
79 bool GetEllipsisPositionTypeEnumeration(const Property::Value& propertyValue, Toolkit::DevelText::EllipsisPosition::Type& ellipsisPositionType);
80
81 } // namespace Text
82
83 } // namespace Toolkit
84
85 } // namespace Dali
86
87 #endif // DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H