1 #ifndef DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H
2 #define DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/object/property-value.h>
25 #include <dali-toolkit/public-api/text/text-enumerations.h>
34 * @brief Get the alignment from the provided property value.
35 * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
36 * @param[out] alignment The resulting alignment from the given source
37 * @return true if the resulting alignment has been updated
39 bool GetHorizontalAlignmentEnumeration(const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment);
42 * @brief Get the alignment from the provided property value.
43 * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
44 * @param[out] alignment The resulting alignment from the given source
45 * @return true if the resulting alignment has been updated
47 bool GetVerticalAlignmentEnumeration(const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment);
50 * @brief Get the line-wrap-mode from the provided property value.
51 * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
52 * @param[out] alignment The resulting lineWrapMode from the given source
53 * @return true if the resulting lineWrapMode has been updated
55 bool GetLineWrapModeEnumeration(const Property::Value& propertyValue, Toolkit::Text::LineWrap::Mode& lineWrapMode);
58 * @brief Get the alignment string from the provided alignment string.
59 * @param[in] alignment the Text::HORIZONTAL enum source
60 * @return the string equivalent
62 const char* GetHorizontalAlignmentString(const Toolkit::Text::HorizontalAlignment::Type& alignment);
65 * @brief Get the alignment string from the provided alignment string.
66 * @param[in] alignment the Text::VerticalAlignment enum source
67 * @return the string equivalent
69 const char* GetVerticalAlignmentString(const Toolkit::Text::VerticalAlignment::Type& alignment);
73 } // namespace Toolkit
77 #endif // DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H