Fix SWIG C# Build
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / push-button.cpp
1 /*
2  * Copyright (c) 2015 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 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/integration-api/debug.h>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/internal/controls/buttons/push-button-impl.h>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 PushButton::PushButton()
34 : Button()
35 {
36 }
37
38 PushButton::PushButton( Internal::PushButton& implementation )
39 : Button( implementation )
40 {
41 }
42
43 PushButton::PushButton( const PushButton& pushButton )
44 : Button( pushButton )
45 {
46 }
47
48 PushButton& PushButton::operator=( const PushButton& pushButton )
49 {
50   if( &pushButton != this )
51   {
52     Button::operator=( pushButton );
53   }
54   return *this;
55 }
56
57 PushButton::PushButton( Dali::Internal::CustomActor* internal )
58 : Button( internal )
59 {
60   VerifyCustomActorPointer<Internal::PushButton>(internal);
61 }
62
63 PushButton::~PushButton()
64 {
65 }
66
67 PushButton PushButton::New()
68 {
69   return Internal::PushButton::New();
70 }
71
72 PushButton PushButton::DownCast( BaseHandle handle )
73 {
74   return Control::DownCast<PushButton, Internal::PushButton>(handle);
75 }
76
77 // Deprecated API
78
79 void PushButton::SetButtonImage( Actor image )
80 {
81   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetButtonImage() is deprecated and will be removed from next release. Use Button.SetProperty UNSELECTED_STATE_IMAGE or Styling file instead.\n" );
82
83   Dali::Toolkit::GetImplementation( *this ).SetButtonImage( image );
84 }
85
86 void PushButton::SetBackgroundImage( Actor image )
87 {
88   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetBackgroundImage() is deprecated and will be removed from next release.\n" );
89
90   Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
91 }
92
93 void PushButton::SetSelectedImage( Actor image )
94 {
95   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetSelectedImage() is deprecated and will be removed from next release. Use Button.SetProperty SELECTED_STATE_IMAGE or Styling file instead.\n" );
96
97   Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
98 }
99
100 void PushButton::SetSelectedBackgroundImage( Actor image )
101 {
102   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetSelectedBackgroundImage() is deprecated and will be removed from next release.\n" );
103
104   Dali::Toolkit::GetImplementation( *this ).SetSelectedBackgroundImage( image );
105 }
106
107 void PushButton::SetDisabledBackgroundImage( Actor image )
108 {
109   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetDisabledBackgroundImage() is deprecated and will be removed from next release.\n" );
110
111   Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
112 }
113
114 void PushButton::SetDisabledImage( Actor image )
115 {
116   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetDisabledImage() is deprecated and will be removed from next release. Use Button.SetProperty DISABLED_STATE_IMAGE or Styling file instead.\n" );
117
118   Dali::Toolkit::GetImplementation( *this ).SetDisabledImage( image );
119 }
120
121 void PushButton::SetDisabledSelectedImage( Actor image )
122 {
123   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetDisabledSelectedImage() is deprecated and will be removed from next release.\n" );
124
125   Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( image );
126 }
127
128 } // namespace Toolkit
129
130 } // namespace Dali