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