[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / popup / popup.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/controls/popup/popup.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/popup/popup-impl.h>
23
24 using namespace Dali;
25
26 namespace Dali
27 {
28 namespace Toolkit
29 {
30 ///////////////////////////////////////////////////////////////////////////////////////////////////
31 // Popup
32 ///////////////////////////////////////////////////////////////////////////////////////////////////
33
34 Popup::Popup()
35 {
36 }
37
38 Popup::Popup(const Popup& handle) = default;
39
40 Popup& Popup::operator=(const Popup& handle) = default;
41
42 Popup::Popup(Popup&& handle) = default;
43
44 Popup& Popup::operator=(Popup&& handle) = default;
45
46 Popup::Popup(Internal::Popup& implementation)
47 : Control(implementation)
48 {
49 }
50
51 Popup::Popup(Dali::Internal::CustomActor* internal)
52 : Control(internal)
53 {
54   VerifyCustomActorPointer<Internal::Popup>(internal);
55 }
56
57 Popup Popup::New()
58 {
59   return Internal::Popup::New();
60 }
61
62 Popup::~Popup()
63 {
64 }
65
66 Popup Popup::DownCast(BaseHandle handle)
67 {
68   return Control::DownCast<Popup, Internal::Popup>(handle);
69 }
70
71 // Properties:
72
73 void Popup::SetTitle(Actor titleActor)
74 {
75   GetImpl(*this).SetTitle(titleActor);
76 }
77
78 Actor Popup::GetTitle() const
79 {
80   return GetImpl(*this).GetTitle();
81 }
82
83 void Popup::SetContent(Actor content)
84 {
85   GetImpl(*this).SetContent(content);
86 }
87
88 Actor Popup::GetContent() const
89 {
90   return GetImpl(*this).GetContent();
91 }
92
93 void Popup::SetFooter(Actor footer)
94 {
95   GetImpl(*this).SetFooter(footer);
96 }
97
98 Actor Popup::GetFooter() const
99 {
100   return GetImpl(*this).GetFooter();
101 }
102
103 void Popup::SetDisplayState(Toolkit::Popup::DisplayState displayState)
104 {
105   GetImpl(*this).SetDisplayState(displayState);
106 }
107
108 Toolkit::Popup::DisplayState Popup::GetDisplayState() const
109 {
110   return GetImpl(*this).GetDisplayState();
111 }
112
113 // Signals:
114
115 Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
116 {
117   return GetImpl(*this).OutsideTouchedSignal();
118 }
119
120 Popup::DisplayStateChangeSignalType& Popup::ShowingSignal()
121 {
122   return GetImpl(*this).ShowingSignal();
123 }
124
125 Popup::DisplayStateChangeSignalType& Popup::ShownSignal()
126 {
127   return GetImpl(*this).ShownSignal();
128 }
129
130 Popup::DisplayStateChangeSignalType& Popup::HidingSignal()
131 {
132   return GetImpl(*this).HidingSignal();
133 }
134
135 Popup::DisplayStateChangeSignalType& Popup::HiddenSignal()
136 {
137   return GetImpl(*this).HiddenSignal();
138 }
139
140 } // namespace Toolkit
141
142 } // namespace Dali