Updated demos to use DALi clang-format
[platform/core/uifw/dali-demo.git] / examples / text-label / expanding-buttons.cpp
1 /*
2  * Copyright (c) 2020 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 #include "expanding-buttons.h"
18 #include "expanding-buttons-impl.h"
19
20 namespace Demo
21 {
22 ExpandingButtons::ExpandingButtons()
23 {
24 }
25
26 ExpandingButtons::ExpandingButtons(const ExpandingButtons& expandingButtons)
27 : Control(expandingButtons)
28 {
29 }
30
31 ExpandingButtons& ExpandingButtons::operator=(const ExpandingButtons& rhs)
32 {
33   if(&rhs != this)
34   {
35     Control::operator=(rhs);
36   }
37   return *this;
38 }
39
40 ExpandingButtons::~ExpandingButtons()
41 {
42 }
43
44 ExpandingButtons ExpandingButtons::New()
45 {
46   ExpandingButtons expandingButtons = Internal::ExpandingButtons::New();
47   return expandingButtons;
48 }
49
50 ExpandingButtons ExpandingButtons::DownCast(BaseHandle handle)
51 {
52   return Control::DownCast<ExpandingButtons, Internal::ExpandingButtons>(handle);
53 }
54
55 void ExpandingButtons::RegisterButton(Control& control)
56 {
57   GetImpl(*this).RegisterButton(control);
58 }
59
60 void ExpandingButtons::Expand()
61 {
62   GetImpl(*this).Expand();
63 }
64 void ExpandingButtons::Collapse()
65 {
66   GetImpl(*this).Collapse();
67 }
68
69 Demo::ExpandingButtons::ExpandingButtonsSignalType& ExpandingButtons::CollapsingSignal()
70 {
71   return GetImpl(*this).CollapsingSignal();
72 }
73
74 ExpandingButtons::ExpandingButtons(Internal::ExpandingButtons& implementation)
75 : Control(implementation)
76 {
77 }
78
79 ExpandingButtons::ExpandingButtons(Dali::Internal::CustomActor* internal)
80 : Control(internal)
81 {
82   VerifyCustomActorPointer<Internal::ExpandingButtons>(internal);
83 }
84
85 } //namespace Demo