Remove use of deprecated Control flag REQUIRES_STYLE_CHANGE_SIGNALS
[platform/core/uifw/dali-demo.git] / examples / visual-transitions / beat-control-impl.cpp
index 54ae6b0..956fe11 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include "beat-control-impl.h"
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/type-registry-helper.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
 using namespace Dali; // Needed for macros
 using namespace Dali::Toolkit;
@@ -77,7 +75,7 @@ Toolkit::TransitionData ConvertPropertyToTransition( const Property::Value& valu
 
 
 Internal::BeatControl::BeatControl()
-: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
   mTransformSize(1.0f, 1.0f),
   mTransformOrigin(Align::CENTER),
   mTransformAnchorPoint(Align::CENTER),
@@ -181,14 +179,14 @@ void BeatControl::OnInitialize()
   Actor self = Self();
 }
 
-void BeatControl::OnStageConnection( int depth )
+void BeatControl::OnSceneConnection( int depth )
 {
-  Control::OnStageConnection( depth );
+  Control::OnSceneConnection( depth );
 }
 
-void BeatControl::OnStageDisconnection()
+void BeatControl::OnSceneDisconnection()
 {
-  Control::OnStageDisconnection();
+  Control::OnSceneDisconnection();
 }
 
 void BeatControl::OnSizeSet( const Vector3& targetSize )
@@ -212,9 +210,9 @@ void BeatControl::RelayoutVisuals( const Vector2& targetSize )
       Property::Map transformMap;
       // Make the visual half the size of the control, but leave
       // origin and anchor point at center, position is relative, but Zer0
-      transformMap[ DevelVisual::Transform::Property::SIZE ] = mTransformSize;
-      transformMap[ DevelVisual::Transform::Property::ORIGIN ] = mTransformOrigin;
-      transformMap[ DevelVisual::Transform::Property::ANCHOR_POINT ] = mTransformAnchorPoint;
+      transformMap[ Visual::Transform::Property::SIZE ] = mTransformSize;
+      transformMap[ Visual::Transform::Property::ORIGIN ] = mTransformOrigin;
+      transformMap[ Visual::Transform::Property::ANCHOR_POINT ] = mTransformAnchorPoint;
       mVisual.SetTransformAndSize( transformMap, size );
     }
   }
@@ -262,7 +260,7 @@ void BeatControl::SetProperty( BaseObject* object, Property::Index index, const
         Property::Map* map = value.GetMap();
         if( map )
         {
-          Property::Value* value = map->Find( DevelVisual::Property::TRANSFORM, "transform" );
+          Property::Value* value = map->Find( Visual::Property::TRANSFORM, "transform" );
           if( value )
           {
             Property::Map* transformMap = value->GetMap();
@@ -272,14 +270,14 @@ void BeatControl::SetProperty( BaseObject* object, Property::Index index, const
               // If there are more properties in the transform map, then we need to create a new visual
               unsigned int sizeAndPositionPropertyCount = 0;
 
-              Property::Value* sizeValue = transformMap->Find( DevelVisual::Transform::Property::SIZE, "size" );
+              Property::Value* sizeValue = transformMap->Find( Visual::Transform::Property::SIZE, "size" );
               if( sizeValue )
               {
                 sizeValue->Get( impl.mTransformSize );
                 ++sizeAndPositionPropertyCount;
               }
 
-              Property::Value* originValue = transformMap->Find( DevelVisual::Transform::Property::ORIGIN, "origin" );
+              Property::Value* originValue = transformMap->Find( Visual::Transform::Property::ORIGIN, "origin" );
               if( originValue )
               {
                 int intValue = 0;
@@ -290,7 +288,7 @@ void BeatControl::SetProperty( BaseObject* object, Property::Index index, const
                 }
               }
 
-              Property::Value* anchorPointValue = transformMap->Find( DevelVisual::Transform::Property::ANCHOR_POINT, "anchorPoint" );
+              Property::Value* anchorPointValue = transformMap->Find( Visual::Transform::Property::ANCHOR_POINT, "anchorPoint" );
               if( anchorPointValue )
               {
                 int intValue = 0;