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=e17e9b5f55ad8262a0d51d8e428847159f2d828a;hp=83ccf2cf09cf5cff3d674002ec4cb23e51abe553;hb=refs%2Ftags%2Faccepted%2Ftizen%2Fcommon%2F20150309.091951;hpb=b8d4bac83c801b93dc7b3298148864a4215e139f diff --git a/dali-toolkit/internal/controls/cluster/cluster-impl.cpp b/dali-toolkit/internal/controls/cluster/cluster-impl.cpp index 83ccf2c..e17e9b5 100644 --- a/dali-toolkit/internal/controls/cluster/cluster-impl.cpp +++ b/dali-toolkit/internal/controls/cluster/cluster-impl.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include // INTERNAL INCLUDES @@ -30,13 +31,6 @@ using namespace Dali; -namespace // unnamed namespace -{ - -const float CLUSTER_STYLE_CONSTRAINT_DURATION = 1.0f; - -} - namespace Dali { @@ -49,23 +43,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; }