2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <dali-toolkit/public-api/controls/cluster/cluster.h>
24 #include <dali-toolkit/internal/controls/cluster/cluster-impl.h>
32 ///////////////////////////////////////////////////////////////////////////////////////////////////
34 ///////////////////////////////////////////////////////////////////////////////////////////////////
36 const std::string Cluster::CLUSTER_ACTOR_DEPTH( "cluster-actor-depth" );
42 Cluster::Cluster(const Cluster& cluster)
47 Cluster& Cluster::operator =(const Cluster& cluster)
49 if( &cluster != this )
51 Control::operator=( cluster );
60 Cluster Cluster::New( ClusterStyle& style )
62 return Internal::Cluster::New(style);
65 Cluster Cluster::DownCast( BaseHandle handle )
67 return Control::DownCast<Cluster, Internal::Cluster>(handle);
70 void Cluster::AddChild( Actor child )
72 GetImpl(*this).AddChild( child );
75 void Cluster::AddChild( Actor child, unsigned int positionIndex )
77 GetImpl(*this).AddChild( child, positionIndex);
80 void Cluster::AddChildAt( Actor child, unsigned int index )
82 GetImpl(*this).AddChildAt( child, index );
85 void Cluster::AddChildAt( Actor child, unsigned int positionIndex, unsigned int index )
87 GetImpl(*this).AddChildAt( child, positionIndex, index );
90 Actor Cluster::GetChildAt( unsigned int index )
92 return GetImpl(*this).GetChildAt(index);
95 Actor Cluster::RemoveChildAt( unsigned int index )
97 return GetImpl(*this).RemoveChildAt(index);
100 void Cluster::ExpandChild( unsigned int index )
102 GetImpl(*this).ExpandChild(index);
105 void Cluster::ExpandAllChildren()
107 GetImpl(*this).ExpandAllChildren();
110 void Cluster::CollapseChild( unsigned int index, bool front )
112 GetImpl(*this).CollapseChild(index, front);
115 void Cluster::CollapseAllChildren( bool front )
117 GetImpl(*this).CollapseAllChildren( front );
120 void Cluster::TransformChild( unsigned int index, const Vector3& position, const Vector3& scale, const Quaternion& rotation, AlphaFunction alpha, const TimePeriod& period )
122 GetImpl(*this).TransformChild( index, position, scale, rotation, alpha, period );
125 void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front )
127 GetImpl(*this).RestoreChild( index, alpha, period, front );
130 void Cluster::SetBackgroundImage( Actor image )
132 GetImpl(*this).SetBackgroundImage(image);
135 void Cluster::SetTitle( Actor text )
137 GetImpl(*this).SetTitle(text);
140 void Cluster::SetStyle(ClusterStyle style)
142 GetImpl(*this).SetStyle(style);
145 ClusterStyle Cluster::GetStyle() const
147 return GetImpl(*this).GetStyle();
150 unsigned int Cluster::GetExpandedCount() const
152 return GetImpl(*this).GetExpandedCount();
155 unsigned int Cluster::GetTotalCount() const
157 return GetImpl(*this).GetTotalCount();
160 Cluster::Cluster( Internal::Cluster& impl )
165 Cluster::Cluster( Dali::Internal::CustomActor* internal )
166 : Control( internal )
168 VerifyCustomActorPointer<Internal::Cluster>(internal);
171 } // namespace Toolkit