Merge "Fix issue using broken image" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / text / spans / underline-span.cpp
1 /*
2  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/devel-api/text/spans/underline-span.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/text/spannable/spans/underline-span-impl.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 namespace Text
29 {
30 UnderlineSpan UnderlineSpan::New()
31 {
32   return Internal::UnderlineSpan::New();
33 }
34
35 UnderlineSpan UnderlineSpan::NewSolid(Vector4 color, float height)
36 {
37   return Internal::UnderlineSpan::NewSolid(color, height);
38 }
39
40 UnderlineSpan UnderlineSpan::NewDashed(Vector4 color, float height, float dashGap, float dashWidth)
41 {
42   return Internal::UnderlineSpan::NewDashed(color, height, dashGap, dashWidth);
43 }
44
45 UnderlineSpan UnderlineSpan::NewDouble(Vector4 color, float height)
46 {
47   return Internal::UnderlineSpan::NewDouble(color, height);
48 }
49
50 UnderlineSpan::UnderlineSpan(Internal::UnderlineSpan* internal)
51 : BaseSpan(internal)
52 {
53 }
54
55 UnderlineSpan::UnderlineSpan() = default;
56
57 UnderlineSpan::UnderlineSpan(const UnderlineSpan& rhs) = default;
58
59 UnderlineSpan::UnderlineSpan(UnderlineSpan&& rhs) = default;
60
61 UnderlineSpan& UnderlineSpan::operator=(const UnderlineSpan& rhs) = default;
62
63 UnderlineSpan& UnderlineSpan::operator=(UnderlineSpan&& rhs) = default;
64
65 UnderlineSpan::~UnderlineSpan() = default;
66
67 //Methods
68
69 const Text::Underline::Type UnderlineSpan::GetType() const
70 {
71   return GetImplementation(*this).GetType();
72 }
73
74 bool UnderlineSpan::IsTypeDefined() const
75 {
76   return GetImplementation(*this).IsTypeDefined();
77 }
78
79 const Vector4 UnderlineSpan::GetColor() const
80 {
81   return GetImplementation(*this).GetColor();
82 }
83
84 bool UnderlineSpan::IsColorDefined() const
85 {
86   return GetImplementation(*this).IsColorDefined();
87 }
88
89 const float UnderlineSpan::GetHeight() const
90 {
91   return GetImplementation(*this).GetHeight();
92 }
93
94 bool UnderlineSpan::IsHeightDefined() const
95 {
96   return GetImplementation(*this).IsHeightDefined();
97 }
98
99 const float UnderlineSpan::GetDashGap() const
100 {
101   return GetImplementation(*this).GetDashGap();
102 }
103
104 bool UnderlineSpan::IsDashGapDefined() const
105 {
106   return GetImplementation(*this).IsDashGapDefined();
107 }
108
109 const float UnderlineSpan::GetDashWidth() const
110 {
111   return GetImplementation(*this).GetDashWidth();
112 }
113
114 bool UnderlineSpan::IsDashWidthDefined() const
115 {
116   return GetImplementation(*this).IsDashWidthDefined();
117 }
118
119 UnderlineSpan UnderlineSpan::DownCast(BaseHandle handle)
120 {
121   return UnderlineSpan(dynamic_cast<Dali::Toolkit::Text::Internal::UnderlineSpan*>(handle.GetObjectPtr()));
122 }
123
124 } // namespace Text
125
126 } // namespace Toolkit
127
128 } // namespace Dali