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