DALi Version 2.1.23
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / popup / popup.cpp
1 /*
2  * Copyright (c) 2020 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)
39 : Control(handle)
40 {
41 }
42
43 Popup& Popup::operator=(const Popup& handle)
44 {
45   if(&handle != this)
46   {
47     Control::operator=(handle);
48   }
49   return *this;
50 }
51
52 Popup::Popup(Internal::Popup& implementation)
53 : Control(implementation)
54 {
55 }
56
57 Popup::Popup(Dali::Internal::CustomActor* internal)
58 : Control(internal)
59 {
60   VerifyCustomActorPointer<Internal::Popup>(internal);
61 }
62
63 Popup Popup::New()
64 {
65   return Internal::Popup::New();
66 }
67
68 Popup::~Popup()
69 {
70 }
71
72 Popup Popup::DownCast(BaseHandle handle)
73 {
74   return Control::DownCast<Popup, Internal::Popup>(handle);
75 }
76
77 // Properties:
78
79 void Popup::SetTitle(Actor titleActor)
80 {
81   GetImpl(*this).SetTitle(titleActor);
82 }
83
84 Actor Popup::GetTitle() const
85 {
86   return GetImpl(*this).GetTitle();
87 }
88
89 void Popup::SetContent(Actor content)
90 {
91   GetImpl(*this).SetContent(content);
92 }
93
94 Actor Popup::GetContent() const
95 {
96   return GetImpl(*this).GetContent();
97 }
98
99 void Popup::SetFooter(Actor footer)
100 {
101   GetImpl(*this).SetFooter(footer);
102 }
103
104 Actor Popup::GetFooter() const
105 {
106   return GetImpl(*this).GetFooter();
107 }
108
109 void Popup::SetDisplayState(Toolkit::Popup::DisplayState displayState)
110 {
111   GetImpl(*this).SetDisplayState(displayState);
112 }
113
114 Toolkit::Popup::DisplayState Popup::GetDisplayState() const
115 {
116   return GetImpl(*this).GetDisplayState();
117 }
118
119 // Signals:
120
121 Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
122 {
123   return GetImpl(*this).OutsideTouchedSignal();
124 }
125
126 Popup::DisplayStateChangeSignalType& Popup::ShowingSignal()
127 {
128   return GetImpl(*this).ShowingSignal();
129 }
130
131 Popup::DisplayStateChangeSignalType& Popup::ShownSignal()
132 {
133   return GetImpl(*this).ShownSignal();
134 }
135
136 Popup::DisplayStateChangeSignalType& Popup::HidingSignal()
137 {
138   return GetImpl(*this).HidingSignal();
139 }
140
141 Popup::DisplayStateChangeSignalType& Popup::HiddenSignal()
142 {
143   return GetImpl(*this).HiddenSignal();
144 }
145
146 } // namespace Toolkit
147
148 } // namespace Dali