2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
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>
30 ///////////////////////////////////////////////////////////////////////////////////////////////////
32 ///////////////////////////////////////////////////////////////////////////////////////////////////
38 Popup::Popup( const Popup& handle )
43 Popup& Popup::operator=( const Popup& handle )
47 Control::operator=( handle );
52 Popup::Popup(Internal::Popup& implementation)
53 : Control(implementation)
57 Popup::Popup( Dali::Internal::CustomActor* internal )
60 VerifyCustomActorPointer<Internal::Popup>(internal);
65 return Internal::Popup::New();
72 Popup Popup::DownCast( BaseHandle handle )
74 return Control::DownCast<Popup, Internal::Popup>(handle);
77 void Popup::SetBackgroundImage( Actor image )
79 GetImpl(*this).SetBackgroundImage( image );
82 void Popup::SetTitle( const std::string& text )
84 GetImpl(*this).SetTitle( text );
87 void Popup::SetTitle( TextView titleActor )
89 GetImpl(*this).SetTitle( titleActor );
92 TextView Popup::GetTitle() const
94 return GetImpl(*this).GetTitle();
97 void Popup::AddButton( Button button )
99 GetImpl(*this).AddButton( button );
102 void Popup::SetState( PopupState state )
104 GetImpl(*this).SetState( state );
107 void Popup::SetState( PopupState state, float duration )
109 GetImpl(*this).SetState( state, duration );
112 Popup::PopupState Popup::GetState() const
114 return GetImpl(*this).GetState();
119 GetImpl(*this).SetState( POPUP_SHOW );
124 GetImpl(*this).SetState( POPUP_HIDE );
127 void Popup::ShowTail(const Vector3& position)
129 GetImpl(*this).ShowTail( position );
132 void Popup::HideTail()
134 GetImpl(*this).HideTail();
137 Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
139 return GetImpl(*this).OutsideTouchedSignal();
142 Popup::HiddenSignalType& Popup::HiddenSignal()
144 return GetImpl(*this).HiddenSignal();
147 } // namespace Toolkit