/*
- * 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;
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),
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 )
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 );
}
}
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();
// 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;
}
}
- 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;