*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
mTargetSize = targetSize;
Control::OnSizeAnimation( animation, targetSize );
}
mTargetSize = targetSize;
Control::OnSizeAnimation( animation, targetSize );
}
Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
Actor child = Actor::New();
child.SetResizePolicy( Dali::ResizePolicy::FIXED, Dali::Dimension::ALL_DIMENSIONS );
Actor child = Actor::New();
child.SetResizePolicy( Dali::ResizePolicy::FIXED, Dali::Dimension::ALL_DIMENSIONS );
DALI_TEST_EQUALS( controlWrapperImpl->GetVisual( TEST_PROPERTY ), visual, TEST_LOCATION );
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
DALI_TEST_EQUALS( controlWrapperImpl->GetVisual( TEST_PROPERTY ), visual, TEST_LOCATION );
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
DALI_TEST_EQUALS( visual.GetDepthIndex(), 10, TEST_LOCATION );
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
DALI_TEST_EQUALS( visual.GetDepthIndex(), 10, TEST_LOCATION );
//DummyControl actor = DummyControl::New();
controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
//DummyControl actor = DummyControl::New();
controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- controlWrapper.SetName("Actor1");
- controlWrapper.SetColor(Color::CYAN);
- Stage::GetCurrent().Add(controlWrapper);
+ controlWrapper.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ controlWrapper.SetProperty( Actor::Property::COLOR,Color::CYAN);
+ application.GetScene().Add(controlWrapper);
Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
tet_infoline("Test that the control wrapper's visuals can be animated by name when registered");
ToolkitTestApplication application;
tet_infoline("Test that the control wrapper's visuals can be animated by name when registered");
ToolkitTestApplication application;
- Stage::GetCurrent().Add( controlWrapper );
- controlWrapper.SetSize( 100, 100 );
+ application.GetScene().Add( controlWrapper );
+ controlWrapper.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), false, TEST_LOCATION ); // Control not destroyed yet
DALI_TEST_EQUALS( controlWrapperImpl->GetVisual( index ), visual, TEST_LOCATION );
DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), false, TEST_LOCATION ); // Control not destroyed yet
DALI_TEST_EQUALS( controlWrapperImpl->GetVisual( index ), visual, TEST_LOCATION );
}
DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), true, TEST_LOCATION ); // Should be destroyed
}
DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), true, TEST_LOCATION ); // Should be destroyed