Property refactor in dali-core: Toolkit changes for compiling
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / cluster / cluster-impl.cpp
index d94a94b..2aa8302 100644 (file)
@@ -49,17 +49,23 @@ namespace Internal
 namespace
 {
 
+// Actions
+
+const char* const ACTION_EXPAND =    "expand";
+const char* const ACTION_COLLAPSE =  "collapse";
+const char* const ACTION_TRANSFORM = "transform";
+
 BaseHandle Create()
 {
-  Toolkit::ClusterStyleStandard s = Toolkit::ClusterStyleStandard::New(Toolkit::ClusterStyleStandard::ClusterStyle1);
+  Toolkit::ClusterStyleStandard s = Toolkit::ClusterStyleStandard::New( Toolkit::ClusterStyleStandard::ClusterStyle1 );
   return Toolkit::Cluster::New( s );
 }
 
-TypeRegistration mType( typeid(Toolkit::Cluster), typeid(Toolkit::Control), Create );
+TypeRegistration mType( typeid( Toolkit::Cluster ), typeid( Toolkit::Control ), Create );
 
-TypeAction a1(mType, Toolkit::Cluster::ACTION_EXPAND   , &Cluster::DoAction);
-TypeAction a2(mType, Toolkit::Cluster::ACTION_COLLAPSE , &Cluster::DoAction);
-TypeAction a3(mType, Toolkit::Cluster::ACTION_TRANSFORM, &Cluster::DoAction);
+TypeAction a1( mType, ACTION_EXPAND,    &Cluster::DoAction );
+TypeAction a2( mType, ACTION_COLLAPSE,  &Cluster::DoAction );
+TypeAction a3( mType, ACTION_TRANSFORM, &Cluster::DoAction );
 
 }
 
@@ -345,9 +351,9 @@ void Cluster::TransformChild( unsigned int index, const Vector3& position, const
 
       child.RemoveConstraints();
       Animation animation = Animation::New(period.delaySeconds + period.durationSeconds);
-      animation.AnimateTo( Property(child, Actor::POSITION), position, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::SCALE), scale, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::ROTATION), rotation, AlphaFunctions::EaseOut, period);
+      animation.AnimateTo( Property(child, Actor::Property::Position), position, AlphaFunctions::EaseOut, period);
+      animation.AnimateTo( Property(child, Actor::Property::Scale), scale, AlphaFunctions::EaseOut, period);
+      animation.AnimateTo( Property(child, Actor::Property::Rotation), rotation, AlphaFunctions::EaseOut, period);
       animation.Play();
     }
   }
@@ -552,25 +558,25 @@ bool Cluster::DoAction(BaseObject* object, const std::string& actionName, const
 {
   bool ret = false;
 
-  Dali::BaseHandle handle(object);
+  Dali::BaseHandle handle( object );
 
-  Toolkit::Cluster cluster = Toolkit::Cluster::DownCast(handle);
+  Toolkit::Cluster cluster = Toolkit::Cluster::DownCast( handle );
 
-  DALI_ASSERT_ALWAYS(cluster);
+  DALI_ASSERT_ALWAYS( cluster );
 
-  if(Toolkit::Cluster::ACTION_EXPAND == actionName)
+  if( 0 == strcmp( actionName.c_str(), ACTION_EXPAND ) )
   {
-    GetImpl(cluster).DoExpandAction(attributes);
+    GetImpl( cluster ).DoExpandAction( attributes );
     ret = true;
   }
-  else if(Toolkit::Cluster::ACTION_COLLAPSE == actionName)
+  else if( 0 == strcmp( actionName.c_str(), ACTION_COLLAPSE ) )
   {
-    GetImpl(cluster).DoCollapseAction(attributes);
+    GetImpl( cluster ).DoCollapseAction( attributes );
     ret = true;
   }
-  else if(Toolkit::Cluster::ACTION_TRANSFORM == actionName)
+  else if( 0 == strcmp( actionName.c_str(), ACTION_TRANSFORM ) )
   {
-    GetImpl(cluster).DoTransformAction(attributes);
+    GetImpl( cluster ).DoTransformAction( attributes );
     ret = true;
   }