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