#define DALI_TOOLKIT_TEXT_UNDERLINED_CHARACTER_RUN_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
#include <dali/public-api/math/vector4.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/character-run.h>
-#include <dali-toolkit/internal/text/glyph-run.h>
+#include <dali-toolkit/internal/text/abstract-style-character-run.h>
+#include <dali-toolkit/internal/text/underline-style-properties.h>
namespace Dali
{
/**
* @brief Run of underlined characters with same properties.
*/
-struct UnderlinedCharacterRun
+struct UnderlinedCharacterRun : public AbstractStyleCharacterRun
{
- CharacterRun characterRun; ///< The initial character index and the number of characters of the run.
- //TODO: add properties like color, height and style
- //Vector4 color; ///< The color of underline.
- //float height; ///< The height of underline.
+ /**
+ * Default constructor to set the default values of bitfields
+ */
+ UnderlinedCharacterRun()
+ : AbstractStyleCharacterRun(),
+ properties{}
+ {
+ }
+
+ UnderlineStyleProperties properties; /// The properties of underline style
};
} // namespace Text
} // namespace Toolkit
+// Allow UnderlinedCharacterRun to be treated as a POD type
+template<>
+struct TypeTraits<Dali::Toolkit::Text::UnderlinedCharacterRun> : public Dali::BasicTypes<Dali::Toolkit::Text::UnderlinedCharacterRun>
+{
+ enum
+ {
+ IS_TRIVIAL_TYPE = true
+ };
+};
+
} // namespace Dali
#endif // DALI_TOOLKIT_TEXT_UNDERLINED_CHARACTER_RUN_H