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