Add 'ExclusiveArch: armv7l' limit build to arm architecture
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / cluster / cluster.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // CLASS HEADER
18
19 #include <dali-toolkit/public-api/controls/cluster/cluster.h>
20
21 // INTERNAL INCLUDES
22
23 #include <dali-toolkit/internal/controls/cluster/cluster-impl.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 ///////////////////////////////////////////////////////////////////////////////////////////////////
32 // Cluster
33 ///////////////////////////////////////////////////////////////////////////////////////////////////
34
35 const std::string Cluster::CLUSTER_ACTOR_DEPTH( "cluster-actor-depth" );
36
37 const char* const Cluster::ACTION_EXPAND = "expand";
38 const char* const Cluster::ACTION_COLLAPSE = "collapse";
39 const char* const Cluster::ACTION_TRANSFORM = "transform";
40
41 Cluster::Cluster()
42 {
43 }
44
45 Cluster::Cluster(const Cluster& cluster)
46 : Control(cluster)
47 {
48 }
49
50 Cluster& Cluster::operator =(const Cluster& cluster)
51 {
52   if( &cluster != this )
53   {
54     Control::operator=( cluster );
55   }
56   return *this;
57 }
58
59 Cluster::~Cluster()
60 {
61 }
62
63 Cluster Cluster::New( ClusterStyle& style )
64 {
65   return Internal::Cluster::New(style);
66 }
67
68 Cluster Cluster::DownCast( BaseHandle handle )
69 {
70   return Control::DownCast<Cluster, Internal::Cluster>(handle);
71 }
72
73 void Cluster::AddChild( Actor child )
74 {
75   GetImpl(*this).AddChild( child );
76 }
77
78 void Cluster::AddChild( Actor child, unsigned int positionIndex )
79 {
80   GetImpl(*this).AddChild( child, positionIndex);
81 }
82
83 void Cluster::AddChildAt( Actor child, unsigned int index )
84 {
85   GetImpl(*this).AddChildAt( child, index );
86 }
87
88 void Cluster::AddChildAt( Actor child, unsigned int positionIndex, unsigned int index )
89 {
90   GetImpl(*this).AddChildAt( child, positionIndex, index );
91 }
92
93 Actor Cluster::GetChildAt( unsigned int index )
94 {
95   return GetImpl(*this).GetChildAt(index);
96 }
97
98 Actor Cluster::RemoveChildAt( unsigned int index )
99 {
100   return GetImpl(*this).RemoveChildAt(index);
101 }
102
103 void Cluster::ExpandChild( unsigned int index )
104 {
105   GetImpl(*this).ExpandChild(index);
106 }
107
108 void Cluster::ExpandAllChildren()
109 {
110   GetImpl(*this).ExpandAllChildren();
111 }
112
113 void Cluster::CollapseChild( unsigned int index, bool front )
114 {
115   GetImpl(*this).CollapseChild(index, front);
116 }
117
118 void Cluster::CollapseAllChildren( bool front )
119 {
120   GetImpl(*this).CollapseAllChildren( front );
121 }
122
123 void Cluster::TransformChild( unsigned int index, const Vector3& position, const Vector3& scale, const Quaternion& rotation, AlphaFunction alpha, const TimePeriod& period )
124 {
125   GetImpl(*this).TransformChild( index, position, scale, rotation, alpha, period );
126 }
127
128 void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front )
129 {
130   GetImpl(*this).RestoreChild( index, alpha, period, front );
131 }
132
133 void Cluster::SetBackgroundImage( Actor image )
134 {
135   GetImpl(*this).SetBackgroundImage(image);
136 }
137
138 void Cluster::SetTitle( Actor text )
139 {
140   GetImpl(*this).SetTitle(text);
141 }
142
143 void Cluster::SetStyle(ClusterStyle style)
144 {
145   GetImpl(*this).SetStyle(style);
146 }
147
148 ClusterStyle Cluster::GetStyle() const
149 {
150   return GetImpl(*this).GetStyle();
151 }
152
153 unsigned int Cluster::GetExpandedCount() const
154 {
155   return GetImpl(*this).GetExpandedCount();
156 }
157
158 unsigned int Cluster::GetTotalCount() const
159 {
160   return GetImpl(*this).GetTotalCount();
161 }
162
163 Cluster::Cluster( Internal::Cluster& impl )
164 : Control( impl )
165 {
166 }
167
168 Cluster::Cluster( Dali::Internal::CustomActor* internal )
169 : Control( internal )
170 {
171   VerifyCustomActorPointer<Internal::Cluster>(internal);
172 }
173
174 } // namespace Toolkit
175
176 } // namespace Dali