/*
- * 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 "shadow-button-impl.h"
#include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/type-registry-helper.h>
#include <dali/devel-api/scripting/enum-helper.h>
-#include <dali-toolkit/devel-api/align-enums.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <cstdio>
Internal::ShadowButton::ShadowButton()
-: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
mCheckState(false),
mActiveState(false)
{
{
mCheckState = checkState;
DevelControl::EnableVisual( *this, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, true );
- if( Self().OnStage() )
+ if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
if( checkState )
{
Actor self = Self();
}
-void ShadowButton::OnStageConnection( int depth )
+void ShadowButton::OnSceneConnection( int depth )
{
- Control::OnStageConnection( depth );
+ Control::OnSceneConnection( depth );
}
-void ShadowButton::OnStageDisconnection()
+void ShadowButton::OnSceneDisconnection()
{
- Control::OnStageDisconnection();
+ Control::OnSceneDisconnection();
}
void ShadowButton::OnSizeSet( const Vector3& targetSize )
}
// Extract transform maps out of the visual definition and store them
- 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( target )
{
// Convert to index
- Property::Index index;
+ Property::Index index = Property::INVALID_INDEX;
if( Scripting::GetEnumerationProperty( *target, VISUAL_PROPERTIES_TABLE, VISUAL_PROPERTIES_TABLE_COUNT, index ) )
{
ShadowButton::Transforms::iterator iter = FindTransform( index );