Merge "Typo fixed in Control implementation doc." into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / popup / popup.cpp
1 /*
2  * Copyright (c) 2014 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 #include <dali-toolkit/public-api/controls/popup/popup.h>
19 #include <dali-toolkit/internal/controls/popup/popup-impl.h>
20 #include <dali-toolkit/public-api/controls/buttons/button.h>
21
22 using namespace Dali;
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
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 void Popup::SetBackgroundImage( Actor image )
78 {
79   GetImpl(*this).SetBackgroundImage( image );
80 }
81
82 void Popup::SetTitle( const std::string& text )
83 {
84   GetImpl(*this).SetTitle( text );
85 }
86
87 void Popup::SetTitle( TextView titleActor )
88 {
89   GetImpl(*this).SetTitle( titleActor );
90 }
91
92 TextView Popup::GetTitle() const
93 {
94   return GetImpl(*this).GetTitle();
95 }
96
97 void Popup::AddButton( Button button )
98 {
99   GetImpl(*this).AddButton( button );
100 }
101
102 void Popup::SetState( PopupState state )
103 {
104   GetImpl(*this).SetState( state );
105 }
106
107 void Popup::SetState( PopupState state, float duration )
108 {
109   GetImpl(*this).SetState( state, duration );
110 }
111
112 Popup::PopupState Popup::GetState() const
113 {
114   return GetImpl(*this).GetState();
115 }
116
117 void Popup::Show()
118 {
119   GetImpl(*this).SetState( POPUP_SHOW );
120 }
121
122 void Popup::Hide()
123 {
124   GetImpl(*this).SetState( POPUP_HIDE );
125 }
126
127 void Popup::ShowTail(const Vector3& position)
128 {
129   GetImpl(*this).ShowTail( position );
130 }
131
132 void Popup::HideTail()
133 {
134   GetImpl(*this).HideTail();
135 }
136
137 Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
138 {
139   return GetImpl(*this).OutsideTouchedSignal();
140 }
141
142 Popup::HiddenSignalType& Popup::HiddenSignal()
143 {
144   return GetImpl(*this).HiddenSignal();
145 }
146
147 } // namespace Toolkit
148
149 } // namespace Dali