Updated all header files to new format
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-font-style.h
index e53d754..c85ec58 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_FONT_STYLE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 const Scripting::StringEnum FONT_WEIGHT_STRING_TABLE[] =
-{
-  { "thin", TextAbstraction::FontWeight::THIN },
-  { "ultraLight", TextAbstraction::FontWeight::ULTRA_LIGHT },
-  { "extraLight", TextAbstraction::FontWeight::EXTRA_LIGHT },
-  { "light", TextAbstraction::FontWeight::LIGHT },
-  { "demiLight", TextAbstraction::FontWeight::DEMI_LIGHT },
-  { "semiLight", TextAbstraction::FontWeight::SEMI_LIGHT },
-  { "book", TextAbstraction::FontWeight::BOOK },
-  { "normal", TextAbstraction::FontWeight::NORMAL },
-  { "regular", TextAbstraction::FontWeight::REGULAR },
-  { "medium", TextAbstraction::FontWeight::MEDIUM },
-  { "demiBold", TextAbstraction::FontWeight::DEMI_BOLD },
-  { "semiBold", TextAbstraction::FontWeight::SEMI_BOLD },
-  { "bold", TextAbstraction::FontWeight::BOLD },
-  { "ultraBold", TextAbstraction::FontWeight::ULTRA_BOLD },
-  { "extraBold", TextAbstraction::FontWeight::EXTRA_BOLD },
-  { "black", TextAbstraction::FontWeight::BLACK },
-  { "heavy", TextAbstraction::FontWeight::HEAVY },
-  { "extraBlack", TextAbstraction::FontWeight::EXTRA_BLACK }
-};
-const unsigned int FONT_WEIGHT_STRING_TABLE_COUNT = sizeof( FONT_WEIGHT_STRING_TABLE ) / sizeof( FONT_WEIGHT_STRING_TABLE[0] );
+  {
+    {"thin", TextAbstraction::FontWeight::THIN},
+    {"ultraLight", TextAbstraction::FontWeight::ULTRA_LIGHT},
+    {"extraLight", TextAbstraction::FontWeight::EXTRA_LIGHT},
+    {"light", TextAbstraction::FontWeight::LIGHT},
+    {"demiLight", TextAbstraction::FontWeight::DEMI_LIGHT},
+    {"semiLight", TextAbstraction::FontWeight::SEMI_LIGHT},
+    {"book", TextAbstraction::FontWeight::BOOK},
+    {"normal", TextAbstraction::FontWeight::NORMAL},
+    {"regular", TextAbstraction::FontWeight::REGULAR},
+    {"medium", TextAbstraction::FontWeight::MEDIUM},
+    {"demiBold", TextAbstraction::FontWeight::DEMI_BOLD},
+    {"semiBold", TextAbstraction::FontWeight::SEMI_BOLD},
+    {"bold", TextAbstraction::FontWeight::BOLD},
+    {"ultraBold", TextAbstraction::FontWeight::ULTRA_BOLD},
+    {"extraBold", TextAbstraction::FontWeight::EXTRA_BOLD},
+    {"black", TextAbstraction::FontWeight::BLACK},
+    {"heavy", TextAbstraction::FontWeight::HEAVY},
+    {"extraBlack", TextAbstraction::FontWeight::EXTRA_BLACK}};
+const unsigned int FONT_WEIGHT_STRING_TABLE_COUNT = sizeof(FONT_WEIGHT_STRING_TABLE) / sizeof(FONT_WEIGHT_STRING_TABLE[0]);
 
 const Scripting::StringEnum FONT_WIDTH_STRING_TABLE[] =
-{
-  { "ultraCondensed", TextAbstraction::FontWidth::ULTRA_CONDENSED },
-  { "extraCondensed", TextAbstraction::FontWidth::EXTRA_CONDENSED },
-  { "condensed", TextAbstraction::FontWidth::CONDENSED },
-  { "semiCondensed", TextAbstraction::FontWidth::SEMI_CONDENSED },
-  { "normal", TextAbstraction::FontWidth::NORMAL },
-  { "semiExpanded", TextAbstraction::FontWidth::SEMI_EXPANDED },
-  { "expanded", TextAbstraction::FontWidth::EXPANDED },
-  { "extraExpanded", TextAbstraction::FontWidth::EXTRA_EXPANDED },
-  { "ultraExpanded", TextAbstraction::FontWidth::ULTRA_EXPANDED },
+  {
+    {"ultraCondensed", TextAbstraction::FontWidth::ULTRA_CONDENSED},
+    {"extraCondensed", TextAbstraction::FontWidth::EXTRA_CONDENSED},
+    {"condensed", TextAbstraction::FontWidth::CONDENSED},
+    {"semiCondensed", TextAbstraction::FontWidth::SEMI_CONDENSED},
+    {"normal", TextAbstraction::FontWidth::NORMAL},
+    {"semiExpanded", TextAbstraction::FontWidth::SEMI_EXPANDED},
+    {"expanded", TextAbstraction::FontWidth::EXPANDED},
+    {"extraExpanded", TextAbstraction::FontWidth::EXTRA_EXPANDED},
+    {"ultraExpanded", TextAbstraction::FontWidth::ULTRA_EXPANDED},
 };
-const unsigned int FONT_WIDTH_STRING_TABLE_COUNT = sizeof( FONT_WIDTH_STRING_TABLE ) / sizeof( FONT_WIDTH_STRING_TABLE[0] );
+const unsigned int FONT_WIDTH_STRING_TABLE_COUNT = sizeof(FONT_WIDTH_STRING_TABLE) / sizeof(FONT_WIDTH_STRING_TABLE[0]);
 
 const Scripting::StringEnum FONT_SLANT_STRING_TABLE[] =
-{
-  { "normal", TextAbstraction::FontSlant::NORMAL },
-  { "roman", TextAbstraction::FontSlant::ROMAN },
-  { "italic", TextAbstraction::FontSlant::ITALIC },
-  { "oblique", TextAbstraction::FontSlant::OBLIQUE }
-};
-const unsigned int FONT_SLANT_STRING_TABLE_COUNT = sizeof( FONT_SLANT_STRING_TABLE ) / sizeof( FONT_SLANT_STRING_TABLE[0] );
+  {
+    {"normal", TextAbstraction::FontSlant::NORMAL},
+    {"roman", TextAbstraction::FontSlant::ROMAN},
+    {"italic", TextAbstraction::FontSlant::ITALIC},
+    {"oblique", TextAbstraction::FontSlant::OBLIQUE}};
+const unsigned int FONT_SLANT_STRING_TABLE_COUNT = sizeof(FONT_SLANT_STRING_TABLE) / sizeof(FONT_SLANT_STRING_TABLE[0]);
 
 namespace FontStyle
 {
-  enum Type
-  {
-    DEFAULT,      ///< The default font's style.
-    INPUT,        ///< The input font's style.
-    PLACEHOLDER   ///< The placeholder text font's style.
-  };
+enum Type
+{
+  DEFAULT,    ///< The default font's style.
+  INPUT,      ///< The input font's style.
+  PLACEHOLDER ///< The placeholder text font's style.
+};
 };
 
 /**
@@ -95,7 +90,7 @@ namespace FontStyle
  * @param[in] controller The text's controller.
  * @param[in] value The value of the font's family.
  */
-void SetFontFamilyProperty( ControllerPtr controller, const Property::Value& value );
+void SetFontFamilyProperty(ControllerPtr controller, const Property::Value& value);
 
 /**
  * @brief Sets the font's style property.
@@ -105,7 +100,7 @@ void SetFontFamilyProperty( ControllerPtr controller, const Property::Value& val
  * @param[in] type Whether the property is for the default font's style, the input font's style or the placeholder font's style.
  *
  */
-void SetFontStyleProperty( ControllerPtr controller, const Property::Value& value, FontStyle::Type type );
+void SetFontStyleProperty(ControllerPtr controller, const Property::Value& value, FontStyle::Type type);
 
 /**
  * @brief Retrieves the font's style property.
@@ -114,7 +109,7 @@ void SetFontStyleProperty( ControllerPtr controller, const Property::Value& valu
  * @param[out] value The value of the font's style.
  * @param[in] type Whether the property is for the default font's style, the input font's style or the placeholder font's style.
  */
-void GetFontStyleProperty( ControllerPtr controller, Property::Value& value, FontStyle::Type type );
+void GetFontStyleProperty(ControllerPtr controller, Property::Value& value, FontStyle::Type type);
 
 /**
  * @brief Converts a weight string into @e FontWeight.
@@ -123,7 +118,7 @@ void GetFontStyleProperty( ControllerPtr controller, Property::Value& value, Fon
  *
  * @return The @e FontWeight value corresponding to the string.
  */
-FontWeight StringToWeight( const char* const weightStr );
+FontWeight StringToWeight(const char* const weightStr);
 
 /**
  * @brief Converts a width string into @e FontWidth.
@@ -132,7 +127,7 @@ FontWeight StringToWeight( const char* const weightStr );
  *
  * @return The @e FontWidth value corresponding to the string.
  */
-FontWidth StringToWidth( const char* const widthStr );
+FontWidth StringToWidth(const char* const widthStr);
 
 /**
  * @brief Converts a slant string into @e FontSlant.
@@ -141,7 +136,7 @@ FontWidth StringToWidth( const char* const widthStr );
  *
  * @return The @e FontSlant value corresponding to the string.
  */
-FontSlant StringToSlant( const char* const slantStr );
+FontSlant StringToSlant(const char* const slantStr);
 } // namespace Text
 
 } // namespace Toolkit