X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fcluster%2Fcluster-impl.cpp;h=d43d63a42ae3197f69ed5046810f0c4a981f4156;hp=83ccf2cf09cf5cff3d674002ec4cb23e51abe553;hb=4b347781c8761d2909b235ded2e98d272fa9ac16;hpb=8fef10ea440a32a1536b485dc7a035f9defa537c diff --git a/dali-toolkit/internal/controls/cluster/cluster-impl.cpp b/dali-toolkit/internal/controls/cluster/cluster-impl.cpp index 83ccf2c..d43d63a 100644 --- a/dali-toolkit/internal/controls/cluster/cluster-impl.cpp +++ b/dali-toolkit/internal/controls/cluster/cluster-impl.cpp @@ -20,8 +20,10 @@ // EXTERNAL INCLUDES #include +#include // for strcmp #include #include +#include #include // INTERNAL INCLUDES @@ -30,13 +32,6 @@ using namespace Dali; -namespace // unnamed namespace -{ - -const float CLUSTER_STYLE_CONSTRAINT_DURATION = 1.0f; - -} - namespace Dali { @@ -49,23 +44,21 @@ 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 ); return Toolkit::Cluster::New( s ); } -TypeRegistration mType( typeid( Toolkit::Cluster ), typeid( Toolkit::Control ), Create ); +DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Cluster, Toolkit::Control, Create ) + +DALI_ACTION_REGISTRATION( Cluster, "expand", ACTION_EXPAND ) +DALI_ACTION_REGISTRATION( Cluster, "collapse", ACTION_COLLAPSE ) +DALI_ACTION_REGISTRATION( Cluster, "transform", ACTION_TRANSFORM ) -TypeAction a1( mType, ACTION_EXPAND, &Cluster::DoAction ); -TypeAction a2( mType, ACTION_COLLAPSE, &Cluster::DoAction ); -TypeAction a3( mType, ACTION_TRANSFORM, &Cluster::DoAction ); +DALI_TYPE_REGISTRATION_END() + +const float CLUSTER_STYLE_CONSTRAINT_DURATION = 1.0f; } @@ -353,7 +346,7 @@ void Cluster::TransformChild( unsigned int index, const Vector3& position, const Animation animation = Animation::New(period.delaySeconds + period.durationSeconds); 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.AnimateTo( Property(child, Actor::Property::ORIENTATION), rotation, AlphaFunctions::EaseOut, period); animation.Play(); } }