Text Alignment Enums now public
[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) 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 // 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 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 namespace Text
34 {
35
36 /**
37  * @brief Get the alignment from the provided property value.
38  * @param[in] propertyValue the source value
39  * @param[out] alignment the resulting alignment from the given source
40  * @return true if the resulting alignment has been updated
41  */
42 bool GetHorizontalAlignmentEnum( const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment );
43
44 /**
45  * @brief Get the alignment from the provided property value.
46  * @param[in] propertyValue the source value
47  * @param[out] alignment the resulting alignment from the given source
48  * @return true if the resulting alignment has been updated
49  */
50 bool GetVerticalAlignmentEnum( const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment );
51
52 /**
53  * @brief Get the alignment string from the provided alignment string.
54  * @param[in] alignment the Text::Horizontal enum source
55  * @return the string equivalent
56  */
57 const char* GetHorizontalAlignmentString( const Toolkit::Text::HorizontalAlignment::Type& alignment );
58
59 /**
60  * @brief Get the alignment string from the provided alignment string.
61  * @param[in] alignment the Text::VerticalAlignment enum source
62  * @return the string equivalent
63  */
64 const char* GetVerticalAlignmentString( const Toolkit::Text::VerticalAlignment::Type& alignment );
65
66
67 } // namespace Text
68
69 } // namespace Toolkit
70
71 } // namespace Dali
72
73 #endif // DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H