+/*
+ * Copyright (c) 2017 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/text/text-enumerations-impl.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/scripting/enum-helper.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/text-enumerations.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+namespace
+{
+DALI_ENUM_TO_STRING_TABLE_BEGIN( HORIZONTAL_ALIGNMENT_TYPE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment::Type, BEGIN )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment::Type, CENTER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment::Type, END )
+DALI_ENUM_TO_STRING_TABLE_END( HORIZONTAL_ALIGNMENT_TYPE )
+
+DALI_ENUM_TO_STRING_TABLE_BEGIN( VERTICAL_ALIGNMENT_TYPE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment::Type, TOP )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment::Type, CENTER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment::Type, BOTTOM )
+DALI_ENUM_TO_STRING_TABLE_END( VERTICAL_ALIGNMENT_TYPE )
+
+} // namespace
+
+bool GetHorizontalAlignmentEnum( const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment )
+{
+ return Scripting::GetEnumerationProperty( propertyValue, HORIZONTAL_ALIGNMENT_TYPE_TABLE, HORIZONTAL_ALIGNMENT_TYPE_TABLE_COUNT, alignment );
+}
+
+bool GetVerticalAlignmentEnum( const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment )
+{
+ return Scripting::GetEnumerationProperty( propertyValue, VERTICAL_ALIGNMENT_TYPE_TABLE, VERTICAL_ALIGNMENT_TYPE_TABLE_COUNT, alignment );
+}
+
+const char* GetHorizontalAlignmentString( const Toolkit::Text::HorizontalAlignment::Type& alignment )
+{
+ return Scripting::GetLinearEnumerationName< Toolkit::Text::HorizontalAlignment::Type >( alignment,
+ HORIZONTAL_ALIGNMENT_TYPE_TABLE,
+ HORIZONTAL_ALIGNMENT_TYPE_TABLE_COUNT );
+
+}
+
+const char* GetVerticalAlignmentString( const Toolkit::Text::VerticalAlignment::Type& alignment )
+{
+ return Scripting::GetLinearEnumerationName< Toolkit::Text::VerticalAlignment::Type >( alignment,
+ VERTICAL_ALIGNMENT_TYPE_TABLE,
+ VERTICAL_ALIGNMENT_TYPE_TABLE_COUNT );
+}
+
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali