2 * Copyright (c) 2015 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.
19 #include <dali-toolkit/public-api/controls/control.h>
22 #include <dali-toolkit/public-api/controls/control-impl.h>
30 Control Control::New()
32 return Internal::Control::New();
39 Control::Control( const Control& uiControl )
40 : CustomActor( uiControl )
48 Control& Control::operator=( const Control& handle )
52 CustomActor::operator=( handle );
57 Control Control::DownCast( BaseHandle handle )
59 return DownCast< Control, Internal::Control >(handle);
62 void Control::SetKeyInputFocus()
64 Internal::GetImplementation(*this).SetKeyInputFocus();
67 bool Control::HasKeyInputFocus()
69 return Internal::GetImplementation(*this).HasKeyInputFocus();
72 void Control::ClearKeyInputFocus()
74 Internal::GetImplementation(*this).ClearKeyInputFocus();
77 PinchGestureDetector Control::GetPinchGestureDetector() const
79 return Internal::GetImplementation(*this).GetPinchGestureDetector();
82 PanGestureDetector Control::GetPanGestureDetector() const
84 return Internal::GetImplementation(*this).GetPanGestureDetector();
87 TapGestureDetector Control::GetTapGestureDetector() const
89 return Internal::GetImplementation(*this).GetTapGestureDetector();
92 LongPressGestureDetector Control::GetLongPressGestureDetector() const
94 return Internal::GetImplementation(*this).GetLongPressGestureDetector();
97 void Control::SetStyleName( const std::string& styleName )
99 Internal::GetImplementation(*this).SetStyleName( styleName );
102 const std::string& Control::GetStyleName() const
104 return Internal::GetImplementation(*this).GetStyleName();
107 void Control::SetBackgroundColor( const Vector4& color )
109 Internal::GetImplementation(*this).SetBackgroundColor( color );
112 Vector4 Control::GetBackgroundColor() const
114 return Internal::GetImplementation(*this).GetBackgroundColor();
117 void Control::SetBackgroundImage( Image image )
119 Internal::GetImplementation(*this).SetBackgroundImage( image );
122 void Control::ClearBackground()
124 Internal::GetImplementation(*this).ClearBackground();
127 Control::KeyEventSignalType& Control::KeyEventSignal()
129 return Internal::GetImplementation(*this).KeyEventSignal();
132 Control::KeyInputFocusSignalType& Control::KeyInputFocusGainedSignal()
134 return Internal::GetImplementation(*this).KeyInputFocusGainedSignal();
137 Control::KeyInputFocusSignalType& Control::KeyInputFocusLostSignal()
139 return Internal::GetImplementation(*this).KeyInputFocusLostSignal();
142 Control::Control(Internal::Control& implementation)
143 : CustomActor(implementation)
147 Control::Control(Dali::Internal::CustomActor* internal)
148 : CustomActor(internal)
150 VerifyCustomActorPointer<Internal::Control>(internal);
153 } // namespace Toolkit