6a70aaf1caba49ec5bfd9c4395afda10f9e9a194
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / push-button.cpp
1 /*
2  * Copyright (c) 2019 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 #include <dali/public-api/images/resource-image.h>
25
26 // INTERNAL INCLUDES
27 #include <dali-toolkit/internal/controls/buttons/push-button-impl.h>
28
29 namespace Dali
30 {
31
32 namespace Toolkit
33 {
34
35 PushButton::PushButton()
36 : Button()
37 {
38 }
39
40 PushButton::PushButton( Internal::PushButton& implementation )
41 : Button( implementation )
42 {
43 }
44
45 PushButton::PushButton( const PushButton& pushButton )
46 : Button( pushButton )
47 {
48 }
49
50 PushButton& PushButton::operator=( const PushButton& pushButton )
51 {
52   if( &pushButton != this )
53   {
54     Button::operator=( pushButton );
55   }
56   return *this;
57 }
58
59 PushButton::PushButton( Dali::Internal::CustomActor* internal )
60 : Button( internal )
61 {
62   VerifyCustomActorPointer<Internal::PushButton>(internal);
63 }
64
65 PushButton::~PushButton()
66 {
67 }
68
69 PushButton PushButton::New()
70 {
71   return Internal::PushButton::New();
72 }
73
74 PushButton PushButton::DownCast( BaseHandle handle )
75 {
76   return Control::DownCast<PushButton, Internal::PushButton>(handle);
77 }
78
79 } // namespace Toolkit
80
81 } // namespace Dali