2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 "check-box-button.h"
23 #include <dali-toolkit/internal/controls/buttons/check-box-button-impl.h>
31 const char* const CheckBoxButton::ACTION_CHECK_BOX_BUTTON_CLICK = "check-box-button-click";
33 const std::string CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME( "use-fade-animation" );
34 const std::string CheckBoxButton::USE_CHECK_ANIMATION_PROPERTY_NAME( "use-check-animation" );
37 CheckBoxButton::CheckBoxButton()
42 CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox )
47 CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox )
49 if( &checkBox != this )
51 Button::operator=( checkBox );
56 CheckBoxButton::~CheckBoxButton()
60 CheckBoxButton CheckBoxButton::New()
62 return Internal::CheckBoxButton::New();
65 CheckBoxButton CheckBoxButton::DownCast( BaseHandle handle )
67 return Control::DownCast<CheckBoxButton, Internal::CheckBoxButton>(handle);
70 void CheckBoxButton::SetChecked( bool checked )
72 Dali::Toolkit::GetImplementation( *this ).SetChecked( checked );
75 bool CheckBoxButton::IsChecked() const
77 return Dali::Toolkit::GetImplementation( *this ).IsChecked();
80 void CheckBoxButton::SetBackgroundImage( Image image )
82 Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
85 void CheckBoxButton::SetBackgroundImage( Actor image )
87 Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
90 Actor CheckBoxButton::GetBackgroundImage() const
92 return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
95 void CheckBoxButton::SetCheckedImage( Image image )
97 Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
100 void CheckBoxButton::SetCheckedImage( Actor image )
102 Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
106 Actor CheckBoxButton::GetCheckedImage() const
108 return Dali::Toolkit::GetImplementation( *this ).GetCheckedImage();
111 void CheckBoxButton::SetDimmedBackgroundImage( Image image )
113 Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
116 void CheckBoxButton::SetDimmedBackgroundImage( Actor image )
118 Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
121 Actor CheckBoxButton::GetDimmedBackgroundImage() const
123 return Dali::Toolkit::GetImplementation( *this ).GetDimmedBackgroundImage();
126 void CheckBoxButton::SetDimmedCheckedImage( Image image )
128 Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
131 void CheckBoxButton::SetDimmedCheckedImage( Actor image )
133 Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
136 Actor CheckBoxButton::GetDimmedCheckedImage() const
138 return Dali::Toolkit::GetImplementation( *this ).GetDimmedCheckedImage();
141 CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation )
142 : Button( implementation )
146 CheckBoxButton::CheckBoxButton( Dali::Internal::CustomActor* internal )
149 VerifyCustomActorPointer<Internal::CheckBoxButton>(internal);
152 } // namespace Toolkit