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.
20 #include <dali-toolkit/public-api/controls/buttons/button.h>
24 #include <dali-toolkit/internal/controls/buttons/button-impl.h>
35 Button::Button( const Button& button )
40 Button& Button::operator=( const Button& button )
44 Control::operator=( button );
53 Button Button::DownCast( BaseHandle handle )
55 return Control::DownCast<Button, Internal::Button>(handle);
58 void Button::SetDisabled( bool disabled )
60 Dali::Toolkit::GetImplementation( *this ).SetDisabled( disabled );
63 bool Button::IsDisabled() const
65 return Dali::Toolkit::GetImplementation( *this ).IsDisabled();
68 void Button::SetAutoRepeating( bool autoRepeating )
70 Dali::Toolkit::GetImplementation( *this ).SetAutoRepeating( autoRepeating );
73 bool Button::IsAutoRepeating() const
75 return Dali::Toolkit::GetImplementation( *this ).IsAutoRepeating();
78 void Button::SetInitialAutoRepeatingDelay( float initialAutoRepeatingDelay )
80 Dali::Toolkit::GetImplementation( *this ).SetInitialAutoRepeatingDelay( initialAutoRepeatingDelay );
83 float Button::GetInitialAutoRepeatingDelay() const
85 return Dali::Toolkit::GetImplementation( *this ).GetInitialAutoRepeatingDelay();
88 void Button::SetNextAutoRepeatingDelay( float nextAutoRepeatingDelay )
90 Dali::Toolkit::GetImplementation( *this ).SetNextAutoRepeatingDelay( nextAutoRepeatingDelay );
93 float Button::GetNextAutoRepeatingDelay() const
95 return Dali::Toolkit::GetImplementation( *this ).GetNextAutoRepeatingDelay();
98 void Button::SetTogglableButton( bool togglable )
100 Dali::Toolkit::GetImplementation( *this ).SetTogglableButton( togglable );
103 bool Button::IsTogglableButton() const
105 return Dali::Toolkit::GetImplementation( *this ).IsTogglableButton();
108 void Button::SetSelected( bool selected )
110 Dali::Toolkit::GetImplementation( *this ).SetSelected( selected );
113 bool Button::IsSelected() const
115 return Dali::Toolkit::GetImplementation( *this ).IsSelected();
118 void Button::SetAnimationTime( float animationTime )
120 Dali::Toolkit::GetImplementation( *this ).SetAnimationTime( animationTime );
123 float Button::GetAnimationTime() const
125 return Dali::Toolkit::GetImplementation( *this ).GetAnimationTime();
128 void Button::SetLabel( const std::string& label )
130 Dali::Toolkit::GetImplementation( *this ).SetLabel( label );
133 void Button::SetLabel( Actor label )
135 Dali::Toolkit::GetImplementation( *this ).SetLabel( label );
138 Actor Button::GetLabel() const
140 return Dali::Toolkit::GetImplementation( *this ).GetLabel();
143 Button::ButtonSignalType& Button::PressedSignal()
145 return Dali::Toolkit::GetImplementation( *this ).PressedSignal();
148 Button::ButtonSignalType& Button::ReleasedSignal()
150 return Dali::Toolkit::GetImplementation( *this ).ReleasedSignal();
153 Button::ButtonSignalType& Button::ClickedSignal()
155 return Dali::Toolkit::GetImplementation( *this ).ClickedSignal();
158 Button::ButtonSignalType& Button::StateChangedSignal()
160 return Dali::Toolkit::GetImplementation( *this ).StateChangedSignal();
163 Button::Button( Internal::Button& implementation )
164 : Control( implementation )
168 Button::Button( Dali::Internal::CustomActor* internal )
169 : Control( internal )
171 VerifyCustomActorPointer<Internal::Button>(internal);
174 } // namespace Toolkit