Dali-Text: Keyboard Shortcuts
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-enumerations-impl.cpp
index 8dc3eb8..ce1c503 100644 (file)
@@ -36,35 +36,43 @@ 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_WITH_SCOPE( Toolkit::Text::HorizontalAlignment, BEGIN )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment, CENTER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::HorizontalAlignment, 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_WITH_SCOPE( Toolkit::Text::VerticalAlignment, TOP )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment, CENTER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::VerticalAlignment, BOTTOM )
 DALI_ENUM_TO_STRING_TABLE_END( VERTICAL_ALIGNMENT_TYPE )
 
+DALI_ENUM_TO_STRING_TABLE_BEGIN( LINE_WRAP_MODE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::LineWrap, WORD )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Text::LineWrap, CHARACTER )
+DALI_ENUM_TO_STRING_TABLE_END( LINE_WRAP_MODE )
 } // namespace
 
-bool GetHorizontalAlignmentEnum( const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment )
+bool GetHorizontalAlignmentEnumeration( 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 )
+bool GetVerticalAlignmentEnumeration( const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment )
 {
   return Scripting::GetEnumerationProperty( propertyValue, VERTICAL_ALIGNMENT_TYPE_TABLE, VERTICAL_ALIGNMENT_TYPE_TABLE_COUNT, alignment );
 }
 
+bool GetLineWrapModeEnumeration( const Property::Value& propertyValue, Toolkit::Text::LineWrap::Mode& lineWrapMode )
+{
+  return Scripting::GetEnumerationProperty( propertyValue, LINE_WRAP_MODE_TABLE, LINE_WRAP_MODE_TABLE_COUNT, lineWrapMode );
+}
+
 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 )
@@ -74,7 +82,6 @@ const char* GetVerticalAlignmentString( const Toolkit::Text::VerticalAlignment::
                                                                                         VERTICAL_ALIGNMENT_TYPE_TABLE_COUNT );
 }
 
-
 } // namespace Text
 
 } // namespace Toolkit