[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / strikethrough-character-run.h
index 3f0e1f4..1d0bc87 100644 (file)
@@ -22,7 +22,8 @@
 #include <dali/public-api/math/vector4.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/character-run.h>
+#include <dali-toolkit/internal/text/abstract-style-character-run.h>
+#include <dali-toolkit/internal/text/strikethrough-style-properties.h>
 
 namespace Dali
 {
@@ -33,17 +34,34 @@ namespace Text
 /**
  * @brief Run of strikethrough characters with same properties.
  */
-struct StrikethroughCharacterRun
+struct StrikethroughCharacterRun : public AbstractStyleCharacterRun
 {
-  CharacterRun characterRun; ///< The initial character index and the number of characters of the run.
-  Vector4      color;        ///< The color of strikethrough.
-  bool         isColorSet;   ///< If the color of strikethrough is set.
+  /**
+   * Default constructor to set the default values of bitfields
+   */
+  StrikethroughCharacterRun()
+  : AbstractStyleCharacterRun(),
+    properties{}
+  {
+  }
+
+  StrikethroughStyleProperties properties; /// The properties of strikethrough style
 };
 
 } // namespace Text
 
 } // namespace Toolkit
 
+// Allow StrikethroughCharacterRun to be treated as a POD type
+template<>
+struct TypeTraits<Dali::Toolkit::Text::StrikethroughCharacterRun> : public Dali::BasicTypes<Dali::Toolkit::Text::StrikethroughCharacterRun>
+{
+  enum
+  {
+    IS_TRIVIAL_TYPE = true
+  };
+};
+
 } // namespace Dali
 
 #endif // DALI_TOOLKIT_TEXT_STRIKETHROUGH_CHARACTER_RUN_H