[dali_2.3.19] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / underlined-character-run.h
1 #ifndef DALI_TOOLKIT_TEXT_UNDERLINED_CHARACTER_RUN_H
2 #define DALI_TOOLKIT_TEXT_UNDERLINED_CHARACTER_RUN_H
3
4 /*
5  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/math/vector4.h>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/internal/text/abstract-style-character-run.h>
26 #include <dali-toolkit/internal/text/underline-style-properties.h>
27
28 namespace Dali
29 {
30 namespace Toolkit
31 {
32 namespace Text
33 {
34 /**
35  * @brief Run of underlined characters with same properties.
36  */
37 struct UnderlinedCharacterRun : public AbstractStyleCharacterRun
38 {
39   /**
40    * Default constructor to set the default values of bitfields
41    */
42   UnderlinedCharacterRun()
43   : AbstractStyleCharacterRun(),
44     properties{}
45   {
46   }
47
48   UnderlineStyleProperties properties; /// The properties of underline style
49 };
50
51 } // namespace Text
52
53 } // namespace Toolkit
54
55 // Allow UnderlinedCharacterRun to be treated as a POD type
56 template<>
57 struct TypeTraits<Dali::Toolkit::Text::UnderlinedCharacterRun> : public Dali::BasicTypes<Dali::Toolkit::Text::UnderlinedCharacterRun>
58 {
59   enum
60   {
61     IS_TRIVIAL_TYPE = true
62   };
63 };
64
65 } // namespace Dali
66
67 #endif // DALI_TOOLKIT_TEXT_UNDERLINED_CHARACTER_RUN_H