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 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 const std::string CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME( "use-fade-animation" );
35 const std::string CheckBoxButton::USE_CHECK_ANIMATION_PROPERTY_NAME( "use-check-animation" );
36
37
38 CheckBoxButton::CheckBoxButton()
39 : Button()
40 {
41 }
42
43 CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox )
44 : Button( checkBox )
45 {
46 }
47
48 CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox )
49 {
50   if( &checkBox != this )
51   {
52     Button::operator=( checkBox );
53   }
54   return *this;
55 }
56
57 CheckBoxButton::~CheckBoxButton()
58 {
59 }
60
61 CheckBoxButton CheckBoxButton::New()
62 {
63   return Internal::CheckBoxButton::New();
64 }
65
66 CheckBoxButton CheckBoxButton::DownCast( BaseHandle handle )
67 {
68   return Control::DownCast<CheckBoxButton, Internal::CheckBoxButton>(handle);
69 }
70
71 void CheckBoxButton::SetChecked( bool checked )
72 {
73   Dali::Toolkit::GetImplementation( *this ).SetChecked( checked );
74 }
75
76 bool CheckBoxButton::IsChecked() const
77 {
78   return Dali::Toolkit::GetImplementation( *this ).IsChecked();
79 }
80
81 void CheckBoxButton::SetBackgroundImage( Image image )
82 {
83   Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
84 }
85
86 void CheckBoxButton::SetBackgroundImage( Actor image )
87 {
88   Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
89 }
90
91 Actor CheckBoxButton::GetBackgroundImage() const
92 {
93   return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
94 }
95
96 void CheckBoxButton::SetCheckedImage( Image image )
97 {
98   Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
99 }
100
101 void CheckBoxButton::SetCheckedImage( Actor image )
102 {
103   Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
104 }
105
106
107 Actor CheckBoxButton::GetCheckedImage() const
108 {
109   return Dali::Toolkit::GetImplementation( *this ).GetCheckedImage();
110 }
111
112 void CheckBoxButton::SetDimmedBackgroundImage( Image image )
113 {
114   Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
115 }
116
117 void CheckBoxButton::SetDimmedBackgroundImage( Actor image )
118 {
119   Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
120 }
121
122 Actor CheckBoxButton::GetDimmedBackgroundImage() const
123 {
124   return Dali::Toolkit::GetImplementation( *this ).GetDimmedBackgroundImage();
125 }
126
127 void CheckBoxButton::SetDimmedCheckedImage( Image image )
128 {
129   Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
130 }
131
132 void CheckBoxButton::SetDimmedCheckedImage( Actor image )
133 {
134   Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
135 }
136
137 Actor CheckBoxButton::GetDimmedCheckedImage() const
138 {
139   return Dali::Toolkit::GetImplementation( *this ).GetDimmedCheckedImage();
140 }
141
142 CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation )
143 : Button( implementation )
144 {
145 }
146
147 CheckBoxButton::CheckBoxButton( Dali::Internal::CustomActor* internal )
148 : Button( internal )
149 {
150   VerifyCustomActorPointer<Internal::CheckBoxButton>(internal);
151 }
152
153 } // namespace Toolkit
154
155 } // namespace Dali