Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / buttons / check-box-button.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://floralicense.org/license/
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 // CLASS HEADER
18
19 #include "check-box-button.h"
20
21 // INTERNAL INCLUDES
22
23 #include <dali-toolkit/internal/controls/buttons/check-box-button-impl.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 const char* const CheckBoxButton::ACTION_CHECK_BOX_BUTTON_CLICK = "check-box-button-click";
32
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" );
35
36
37 CheckBoxButton::CheckBoxButton()
38 : Button()
39 {
40 }
41
42 CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox )
43 : Button( checkBox )
44 {
45 }
46
47 CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox )
48 {
49   if( &checkBox != this )
50   {
51     Button::operator=( checkBox );
52   }
53   return *this;
54 }
55
56 CheckBoxButton::~CheckBoxButton()
57 {
58 }
59
60 CheckBoxButton CheckBoxButton::New()
61 {
62   return Internal::CheckBoxButton::New();
63 }
64
65 CheckBoxButton CheckBoxButton::DownCast( BaseHandle handle )
66 {
67   return Control::DownCast<CheckBoxButton, Internal::CheckBoxButton>(handle);
68 }
69
70 void CheckBoxButton::SetChecked( bool checked )
71 {
72   Dali::Toolkit::GetImplementation( *this ).SetChecked( checked );
73 }
74
75 bool CheckBoxButton::IsChecked() const
76 {
77   return Dali::Toolkit::GetImplementation( *this ).IsChecked();
78 }
79
80 void CheckBoxButton::SetBackgroundImage( Image image )
81 {
82   Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
83 }
84
85 void CheckBoxButton::SetBackgroundImage( Actor image )
86 {
87   Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
88 }
89
90 Actor CheckBoxButton::GetBackgroundImage() const
91 {
92   return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
93 }
94
95 void CheckBoxButton::SetCheckedImage( Image image )
96 {
97   Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
98 }
99
100 void CheckBoxButton::SetCheckedImage( Actor image )
101 {
102   Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
103 }
104
105
106 Actor CheckBoxButton::GetCheckedImage() const
107 {
108   return Dali::Toolkit::GetImplementation( *this ).GetCheckedImage();
109 }
110
111 void CheckBoxButton::SetDimmedBackgroundImage( Image image )
112 {
113   Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
114 }
115
116 void CheckBoxButton::SetDimmedBackgroundImage( Actor image )
117 {
118   Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
119 }
120
121 Actor CheckBoxButton::GetDimmedBackgroundImage() const
122 {
123   return Dali::Toolkit::GetImplementation( *this ).GetDimmedBackgroundImage();
124 }
125
126 void CheckBoxButton::SetDimmedCheckedImage( Image image )
127 {
128   Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
129 }
130
131 void CheckBoxButton::SetDimmedCheckedImage( Actor image )
132 {
133   Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
134 }
135
136 Actor CheckBoxButton::GetDimmedCheckedImage() const
137 {
138   return Dali::Toolkit::GetImplementation( *this ).GetDimmedCheckedImage();
139 }
140
141 CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation )
142 : Button( implementation )
143 {
144 }
145
146 CheckBoxButton::CheckBoxButton( Dali::Internal::CustomActor* internal )
147 : Button( internal )
148 {
149   VerifyCustomActorPointer<Internal::CheckBoxButton>(internal);
150 }
151
152 } // namespace Toolkit
153
154 } // namespace Dali