Change-Id: I2c703e035e338a0879c5ce71d88484d0b7dd9131
61 files changed:
- * Copyright (c) 2018 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tableView.AddChild( ImageView::New( TEST_RESOURCE_DIR "/gallery-small-1.jpg" ), TableView::CellPosition( 1, 1 ) );
tableView.AddChild( TextLabel::New("Stuff"), TableView::CellPosition( 1, 2 ) );
tableView.AddChild( ImageView::New( TEST_RESOURCE_DIR "/gallery-small-1.jpg" ), TableView::CellPosition( 1, 1 ) );
tableView.AddChild( TextLabel::New("Stuff"), TableView::CellPosition( 1, 2 ) );
- Stage::GetCurrent().Add( tableView );
+ application.GetScene().Add( tableView );
Property::Value v(Matrix3::IDENTITY);
tableView.RegisterProperty( "SomeMatrix3", v);
std::ostringstream oss;
Property::Value v(Matrix3::IDENTITY);
tableView.RegisterProperty( "SomeMatrix3", v);
std::ostringstream oss;
- Dali::Toolkit::Internal::DumpControlHierarchy( oss, Stage::GetCurrent().GetRootLayer() );
+ Dali::Toolkit::Internal::DumpControlHierarchy( oss, application.GetScene().GetRootLayer() );
DALI_TEST_CHECK( oss.str().length() != 0 );
tet_printf("Control hierarchy: \n%s\n", oss.str().c_str() );
DALI_TEST_CHECK( oss.str().length() != 0 );
tet_printf("Control hierarchy: \n%s\n", oss.str().c_str() );
const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
-void TestDebugVisual( Visual::Base& visual, Visual::Type actualType, Vector2 expectedNaturalSize )
+void TestDebugVisual( Integration::Scene scene, Visual::Base& visual, Visual::Type actualType, Vector2 expectedNaturalSize )
{
{
auto& impl = GetImplementation( visual );
{
{
auto& impl = GetImplementation( visual );
DummyControl actor = DummyControl::New();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
DummyControl actor = DummyControl::New();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- Stage::GetCurrent().Add( actor );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1, TEST_LOCATION );
if( actor.GetRendererCount() > 0 )
DALI_TEST_EQUALS( actor.GetRendererCount(), 1, TEST_LOCATION );
if( actor.GetRendererCount() > 0 )
propertyMap1.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE);
Visual::Base colorVisual = factory.CreateVisual(propertyMap1);
DALI_TEST_CHECK( colorVisual );
propertyMap1.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE);
Visual::Base colorVisual = factory.CreateVisual(propertyMap1);
DALI_TEST_CHECK( colorVisual );
- TestDebugVisual( colorVisual, Visual::COLOR, Vector2::ZERO );
+ TestDebugVisual( application.GetScene(), colorVisual, Visual::COLOR, Vector2::ZERO );
// Test that border visual is replaced with debug visual
Property::Map propertyMap2;
// Test that border visual is replaced with debug visual
Property::Map propertyMap2;
propertyMap2.Insert(BorderVisual::Property::SIZE, 2.f);
Visual::Base borderVisual = factory.CreateVisual(propertyMap2);
DALI_TEST_CHECK( borderVisual );
propertyMap2.Insert(BorderVisual::Property::SIZE, 2.f);
Visual::Base borderVisual = factory.CreateVisual(propertyMap2);
DALI_TEST_CHECK( borderVisual );
- TestDebugVisual( borderVisual, Visual::BORDER, Vector2::ZERO );
+ TestDebugVisual( application.GetScene(), borderVisual, Visual::BORDER, Vector2::ZERO );
// Test that gradient visual is replaced with debug visual
Property::Map propertyMap3;
// Test that gradient visual is replaced with debug visual
Property::Map propertyMap3;
propertyMap3.Insert(GradientVisual::Property::STOP_COLOR, stopColors);
Visual::Base gradientVisual = factory.CreateVisual(propertyMap3);
DALI_TEST_CHECK( gradientVisual );
propertyMap3.Insert(GradientVisual::Property::STOP_COLOR, stopColors);
Visual::Base gradientVisual = factory.CreateVisual(propertyMap3);
DALI_TEST_CHECK( gradientVisual );
- TestDebugVisual( gradientVisual, Visual::GRADIENT, Vector2::ZERO );
+ TestDebugVisual( application.GetScene(), gradientVisual, Visual::GRADIENT, Vector2::ZERO );
// Test that image visual is replaced with debug visual
Property::Map propertyMap4;
// Test that image visual is replaced with debug visual
Property::Map propertyMap4;
propertyMap4.Insert( ImageVisual::Property::DESIRED_HEIGHT, 100.f );
Visual::Base imageVisual = factory.CreateVisual( propertyMap4 );
DALI_TEST_CHECK( imageVisual );
propertyMap4.Insert( ImageVisual::Property::DESIRED_HEIGHT, 100.f );
Visual::Base imageVisual = factory.CreateVisual( propertyMap4 );
DALI_TEST_CHECK( imageVisual );
- TestDebugVisual( imageVisual, Visual::IMAGE, Vector2( 50.f, 100.f ) );
+ TestDebugVisual( application.GetScene(), imageVisual, Visual::IMAGE, Vector2( 50.f, 100.f ) );
// Test that SVG visual is replaced with debug visual
// TEST_SVG_FILE:
// Test that SVG visual is replaced with debug visual
// TEST_SVG_FILE:
propertyMap5.Insert( ImageVisual::Property::URL, TEST_SVG_FILE_NAME );
Visual::Base svgVisual = factory.CreateVisual( propertyMap5 );
DALI_TEST_CHECK( svgVisual );
propertyMap5.Insert( ImageVisual::Property::URL, TEST_SVG_FILE_NAME );
Visual::Base svgVisual = factory.CreateVisual( propertyMap5 );
DALI_TEST_CHECK( svgVisual );
- TestDebugVisual( svgVisual, Visual::SVG, Vector2(100.f, 100.f) );
+ TestDebugVisual( application.GetScene(), svgVisual, Visual::SVG, Vector2(100.f, 100.f) );
// Test that AnimatedImageVisual is replaced with debug visual
// TEST_GIF_FILE: anim.gif
// Test that AnimatedImageVisual is replaced with debug visual
// TEST_GIF_FILE: anim.gif
propertyMap6.Insert( ImageVisual::Property::URL, TEST_GIF_FILE_NAME );
Visual::Base animatedImageVisual = factory.CreateVisual( propertyMap6 );
DALI_TEST_CHECK( animatedImageVisual );
propertyMap6.Insert( ImageVisual::Property::URL, TEST_GIF_FILE_NAME );
Visual::Base animatedImageVisual = factory.CreateVisual( propertyMap6 );
DALI_TEST_CHECK( animatedImageVisual );
- TestDebugVisual( animatedImageVisual, Visual::ANIMATED_IMAGE, Vector2(50.f, 50.f) );
+ TestDebugVisual( application.GetScene(), animatedImageVisual, Visual::ANIMATED_IMAGE, Vector2(50.f, 50.f) );
// Test that text visual is replaced with debug visual
// Test that text visual is replaced with debug visual
propertyMap8.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME );
Visual::Base nPatchVisual = factory.CreateVisual( propertyMap8 );
DALI_TEST_CHECK( nPatchVisual );
propertyMap8.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME );
Visual::Base nPatchVisual = factory.CreateVisual( propertyMap8 );
DALI_TEST_CHECK( nPatchVisual );
- TestDebugVisual( nPatchVisual, Visual::N_PATCH, Vector2::ZERO );
+ TestDebugVisual( application.GetScene(), nPatchVisual, Visual::N_PATCH, Vector2::ZERO );
EnvironmentVariable::SetTestingEnvironmentVariable(false);
END_TEST;
EnvironmentVariable::SetTestingEnvironmentVariable(false);
END_TEST;
Visual::Base colorVisual = factory.CreateVisual( map);
DALI_TEST_CHECK( colorVisual );
Visual::Base colorVisual = factory.CreateVisual( map);
DALI_TEST_CHECK( colorVisual );
- TestDebugVisual( colorVisual, Visual::COLOR, Vector2::ZERO );
+ TestDebugVisual( application.GetScene(), colorVisual, Visual::COLOR, Vector2::ZERO );
// Test that border visual is replaced with debug visual
map.Clear();
// Test that border visual is replaced with debug visual
map.Clear();
map[ BorderVisual::Property::SIZE ] = 2.f;
Visual::Base borderVisual = factory.CreateVisual( map );
DALI_TEST_CHECK( borderVisual );
map[ BorderVisual::Property::SIZE ] = 2.f;
Visual::Base borderVisual = factory.CreateVisual( map );
DALI_TEST_CHECK( borderVisual );
- TestDebugVisual( borderVisual, Visual::BORDER, Vector2::ZERO );
+ TestDebugVisual( application.GetScene(), borderVisual, Visual::BORDER, Vector2::ZERO );
// Test that image visual is replaced with debug visual
map.Clear();
// Test that image visual is replaced with debug visual
map.Clear();
map[ ImageVisual::Property::URL ] = TEST_IMAGE_FILE_NAME;
Visual::Base imageVisual = factory.CreateVisual( map );
DALI_TEST_CHECK( imageVisual );
map[ ImageVisual::Property::URL ] = TEST_IMAGE_FILE_NAME;
Visual::Base imageVisual = factory.CreateVisual( map );
DALI_TEST_CHECK( imageVisual );
- TestDebugVisual( imageVisual, Visual::IMAGE, Vector2(64.0f, 64.0f /* Broken Image Size */ ));
+ TestDebugVisual( application.GetScene(), imageVisual, Visual::IMAGE, Vector2(64.0f, 64.0f /* Broken Image Size */ ));
// Test that n patch visual is replaced with debug visual
Visual::Base nPatchVisual = factory.CreateVisual( TEST_NPATCH_FILE_NAME, ImageDimensions() );
DALI_TEST_CHECK( nPatchVisual );
// Test that n patch visual is replaced with debug visual
Visual::Base nPatchVisual = factory.CreateVisual( TEST_NPATCH_FILE_NAME, ImageDimensions() );
DALI_TEST_CHECK( nPatchVisual );
- TestDebugVisual( nPatchVisual, Visual::N_PATCH, Vector2::ZERO );
+ TestDebugVisual( application.GetScene(), nPatchVisual, Visual::N_PATCH, Vector2::ZERO );
EnvironmentVariable::SetTestingEnvironmentVariable(false);
END_TEST;
EnvironmentVariable::SetTestingEnvironmentVariable(false);
END_TEST;
try
{
Toolkit::TextLabel label = TextLabel::New( "Hello" );
try
{
Toolkit::TextLabel label = TextLabel::New( "Hello" );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
DALI_TEST_CHECK( true );
} catch( ... )
{
DALI_TEST_CHECK( true );
} catch( ... )
{
Dali::Toolkit::Internal::GridLayout* gridLayout = dynamic_cast<Dali::Toolkit::Internal::GridLayout*>(view.GetLayout(0).Get());
Dali::Toolkit::Internal::GridLayout* gridLayout = dynamic_cast<Dali::Toolkit::Internal::GridLayout*>(view.GetLayout(0).Get());
- Dali::Stage stage = Dali::Stage::GetCurrent();
- Vector3 stageSize(stage.GetSize());
+ Dali::Integration::Scene scene = application.GetScene();
+ Vector3 stageSize(scene.GetSize());
//Check if the number of columns is equals to 6 which is set before.
DALI_TEST_EQUALS(gridLayout->GetNumberOfColumns(), 6, TEST_LOCATION );
//Check if the number of columns is equals to 6 which is set before.
DALI_TEST_EQUALS(gridLayout->GetNumberOfColumns(), 6, TEST_LOCATION );
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
tet_infoline(" UtcDaliTextCircularN");
ToolkitTestApplication application;
tet_infoline(" UtcDaliTextCircularN");
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
- stage.SetBackgroundColor( Color::WHITE );
- stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
+ auto scene = application.GetScene();
+ scene.SetBackgroundColor( Color::WHITE );
+ scene.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
const std::string image1 = "<item 'width'=26 'height'=26 'url'='" + TEST_IMAGE_FILE_NAME1 + "'/>";
const std::string image1 = "<item 'width'=26 'height'=26 'url'='" + TEST_IMAGE_FILE_NAME1 + "'/>";
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
TextSelectionPopup::CLIPBOARD );
textPopup.EnableButtons( buttonsToEnable );
TextSelectionPopup::CLIPBOARD );
textPopup.EnableButtons( buttonsToEnable );
- Stage::GetCurrent().Add( textPopup );
+ application.GetScene().Add( textPopup );
textPopup.ShowPopup();
// Render and notify
textPopup.ShowPopup();
// Render and notify
tet_infoline(" UtcDaliTextControllerSetGetLineSpacingProperty");
ToolkitTestApplication application;
tet_infoline(" UtcDaliTextControllerSetGetLineSpacingProperty");
ToolkitTestApplication application;
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
// single line text
const std::string textSingle("A Quick Brown Fox Jumps Over The Lazy Dog");
// single line text
const std::string textSingle("A Quick Brown Fox Jumps Over The Lazy Dog");
mImpl.mOperationsPending = Controller::ALL_OPERATIONS;
// Perform a relayout
mImpl.mOperationsPending = Controller::ALL_OPERATIONS;
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
tet_result(TET_PASS);
controller->Relayout(size);
tet_result(TET_PASS);
DALI_TEST_EQUALS( Controller::COLOR, static_cast<Controller::OperationsMask>( mImpl.mOperationsPending & Controller::COLOR ), TEST_LOCATION );
// Perform a relayout
DALI_TEST_EQUALS( Controller::COLOR, static_cast<Controller::OperationsMask>( mImpl.mOperationsPending & Controller::COLOR ), TEST_LOCATION );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
tet_result(TET_PASS);
controller->Relayout(size);
tet_result(TET_PASS);
TEST_LOCATION );
// Perform a relayout
TEST_LOCATION );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
tet_result(TET_PASS);
controller->Relayout(size);
tet_result(TET_PASS);
TEST_LOCATION );
// Perform a relayout
TEST_LOCATION );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
tet_result(TET_PASS);
controller->Relayout(size);
tet_result(TET_PASS);
TEST_LOCATION );
// Perform a relayout
TEST_LOCATION );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
tet_result(TET_PASS);
controller->Relayout(size);
tet_result(TET_PASS);
TEST_LOCATION );
// Perform a relayout
TEST_LOCATION );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
tet_result(TET_PASS);
controller->Relayout(size);
tet_result(TET_PASS);
TEST_LOCATION );
// Perform a relayout
TEST_LOCATION );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
tet_result(TET_PASS);
controller->Relayout(size);
tet_result(TET_PASS);
controller->SelectEvent( 0.f, 0.f, SelectionType::INTERACTIVE );
// Perform a relayout
controller->SelectEvent( 0.f, 0.f, SelectionType::INTERACTIVE );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
// Get the implementation of the text controller
controller->Relayout(size);
// Get the implementation of the text controller
DALI_TEST_EQUALS( EventData::EDITING, mImpl.mEventData->mState, TEST_LOCATION );
// Perform a relayout
DALI_TEST_EQUALS( EventData::EDITING, mImpl.mEventData->mState, TEST_LOCATION );
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout( size );
tet_result(TET_PASS);
controller->Relayout( size );
tet_result(TET_PASS);
application.Render();
// Perform a relayout
application.Render();
// Perform a relayout
- const Size size( Dali::Stage::GetCurrent().GetSize() );
+ const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
// simulate a key event.
controller->Relayout(size);
// simulate a key event.
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Add the text field to the stage
textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Add the text field to the stage
- Stage::GetCurrent().Add( textField );
+ application.GetScene().Add( textField );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * Copyright (c) 2018 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( colorVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( colorVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Add 2 buttons to test how many times the signal is sent
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
// Add 2 buttons to test how many times the signal is sent
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
- Stage::GetCurrent().Add( testButton );
- Stage::GetCurrent().Add( testButton2 );
+ application.GetScene().Add( testButton );
+ application.GetScene().Add( testButton2 );
StyleChangedSignalChecker styleChangedSignalHandler;
StyleChangedSignalChecker styleChangedSignalHandler2;
StyleManager styleManager = StyleManager::Get();
StyleChangedSignalChecker styleChangedSignalHandler;
StyleChangedSignalChecker styleChangedSignalHandler2;
StyleManager styleManager = StyleManager::Get();
ToolkitTestApplication application;
Test::TestButton testButton = Test::TestButton::New();
ToolkitTestApplication application;
Test::TestButton testButton = Test::TestButton::New();
- Stage::GetCurrent().Add( testButton );
+ application.GetScene().Add( testButton );
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
// Add 2 buttons
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
// Add 2 buttons
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
- Stage::GetCurrent().Add( testButton );
- Stage::GetCurrent().Add( testButton2 );
+ application.GetScene().Add( testButton );
+ application.GetScene().Add( testButton2 );
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
// Add 2 buttons
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
// Add 2 buttons
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
- Stage::GetCurrent().Add( testButton );
- Stage::GetCurrent().Add( testButton2 );
+ application.GetScene().Add( testButton );
+ application.GetScene().Add( testButton2 );
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
// Add 2 buttons
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
// Add 2 buttons
Test::TestButton testButton = Test::TestButton::New();
Test::TestButton testButton2 = Test::TestButton::New();
- Stage::GetCurrent().Add( testButton );
- Stage::GetCurrent().Add( testButton2 );
+ application.GetScene().Add( testButton );
+ application.GetScene().Add( testButton2 );
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
StyleChangedSignalChecker styleChangedSignalHandler;
StyleManager styleManager = StyleManager::Get();
std::string labelStr("Label");
Toolkit::TextLabel label = Toolkit::TextLabel::New(labelStr);
std::string labelStr("Label");
Toolkit::TextLabel label = Toolkit::TextLabel::New(labelStr);
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
Toolkit::TextField field = Toolkit::TextField::New();
Toolkit::TextField field = Toolkit::TextField::New();
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
StyleChangedSignalChecker styleChangedSignalHandler;
Dali::StyleMonitor styleMonitor = Dali::StyleMonitor::Get();
StyleChangedSignalChecker styleChangedSignalHandler;
Dali::StyleMonitor styleMonitor = Dali::StyleMonitor::Get();
std::string labelStr("Label");
Toolkit::TextLabel label = Toolkit::TextLabel::New(labelStr);
std::string labelStr("Label");
Toolkit::TextLabel label = Toolkit::TextLabel::New(labelStr);
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
Toolkit::TextLabel label2 = Toolkit::TextLabel::New(labelStr);
Toolkit::TextLabel label2 = Toolkit::TextLabel::New(labelStr);
- Stage::GetCurrent().Add( label2 );
+ application.GetScene().Add( label2 );
StyleChangedSignalChecker styleChangedSignalHandler;
StyleMonitor styleMonitor = StyleMonitor::Get();
StyleChangedSignalChecker styleChangedSignalHandler;
StyleMonitor styleMonitor = StyleMonitor::Get();
std::string fieldStr("Field");
Toolkit::TextField field = Toolkit::TextField::New();
field.SetProperty( Toolkit::TextField::Property::TEXT, fieldStr );
std::string fieldStr("Field");
Toolkit::TextField field = Toolkit::TextField::New();
field.SetProperty( Toolkit::TextField::Property::TEXT, fieldStr );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
Toolkit::TextField field2 = Toolkit::TextField::New();
Toolkit::TextField field2 = Toolkit::TextField::New();
- Stage::GetCurrent().Add( field2 );
+ application.GetScene().Add( field2 );
field2.SetProperty( Toolkit::TextField::Property::TEXT, fieldStr );
StyleChangedSignalChecker styleChangedSignalHandler;
field2.SetProperty( Toolkit::TextField::Property::TEXT, fieldStr );
StyleChangedSignalChecker styleChangedSignalHandler;
std::string editorStr("Editor");
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, editorStr );
std::string editorStr("Editor");
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, editorStr );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
Toolkit::TextEditor editor2 = Toolkit::TextEditor::New();
Toolkit::TextEditor editor2 = Toolkit::TextEditor::New();
- Stage::GetCurrent().Add( editor2 );
+ application.GetScene().Add( editor2 );
editor2.SetProperty( Toolkit::TextEditor::Property::TEXT, editorStr );
StyleChangedSignalChecker styleChangedSignalHandler;
editor2.SetProperty( Toolkit::TextEditor::Property::TEXT, editorStr );
StyleChangedSignalChecker styleChangedSignalHandler;
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("BasicControl");
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("BasicControl");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("BasicControl");
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("BasicControl");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("NoStyles");
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("NoStyles");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Property::Map propertyMap;
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Property::Map propertyMap;
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("NoStateStyle");
DummyControl actor = DummyControl::New(true);
actor.SetStyleName("NoStateStyle");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Property::Map propertyMap;
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
Property::Map propertyMap;
actor.SetProperty(DevelControl::Property::STATE, "NORMAL");
actor.SetProperty(DevelControl::Property::SUB_STATE, "SELECTED");
actor.SetStyleName("ComplexControl");
actor.SetProperty(DevelControl::Property::STATE, "NORMAL");
actor.SetProperty(DevelControl::Property::SUB_STATE, "SELECTED");
actor.SetStyleName("ComplexControl");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
tet_infoline( "Setting state to NORMAL/SELECTED before re-styling\n");
actor.SetStyleName("ComplexControl");
tet_infoline( "Setting state to NORMAL/SELECTED before re-styling\n");
actor.SetStyleName("ComplexControl");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
Integration::ResourcePointer ninePatch = CustomizeNinePatch( application, 30, 30 );
// For coverage
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
editor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
// For coverage
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
editor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
DALI_TEST_CHECK(manager.GetActorByFocusOrder(3) == Actor());
// Add the actors to the stage
DALI_TEST_CHECK(manager.GetActorByFocusOrder(3) == Actor());
// Add the actors to the stage
- Stage::GetCurrent().Add(first);
- Stage::GetCurrent().Add(second);
- Stage::GetCurrent().Add(third);
+ application.GetScene().Add(first);
+ application.GetScene().Add(second);
+ application.GetScene().Add(third);
// Check that we get an empty handle because focus order 0 means undefined.
DALI_TEST_CHECK(manager.GetActorByFocusOrder(0) == Actor());
// Check that we get an empty handle because focus order 0 means undefined.
DALI_TEST_CHECK(manager.GetActorByFocusOrder(0) == Actor());
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Create the third actor but don't add it to the stage
Actor third = Actor::New();
// Create the third actor but don't add it to the stage
Actor third = Actor::New();
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
// Add the third actor to the stage
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
// Add the third actor to the stage
- Stage::GetCurrent().Add(third);
+ application.GetScene().Add(third);
// make the third actor invisible
third.SetProperty( Actor::Property::VISIBLE,false);
// make the third actor invisible
third.SetProperty( Actor::Property::VISIBLE,false);
Actor secondChild = Actor::New();
parent.Add(firstChild);
parent.Add(secondChild);
Actor secondChild = Actor::New();
parent.Add(firstChild);
parent.Add(secondChild);
- Stage::GetCurrent().Add(parent);
+ application.GetScene().Add(parent);
// Create three actors and add them as the children of the first child actor
Actor firstGrandChild = Actor::New();
// Create three actors and add them as the children of the first child actor
Actor firstGrandChild = Actor::New();
accAdaptor.HandleActionEnableEvent();
Actor first = Actor::New();
accAdaptor.HandleActionEnableEvent();
Actor first = Actor::New();
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
Actor second = Actor::New();
Actor second = Actor::New();
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
Actor third = Actor::New();
Actor third = Actor::New();
- Stage::GetCurrent().Add(third);
+ application.GetScene().Add(third);
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
accAdaptor.HandleActionNextEvent(true);
Actor first = Actor::New();
accAdaptor.HandleActionNextEvent(true);
Actor first = Actor::New();
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
Actor second = Actor::New();
Actor second = Actor::New();
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
Actor third = Actor::New();
Actor third = Actor::New();
- Stage::GetCurrent().Add(third);
+ application.GetScene().Add(third);
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
accAdaptor.HandleActionEnableEvent();
Actor first = Actor::New();
accAdaptor.HandleActionEnableEvent();
Actor first = Actor::New();
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
Actor second = Actor::New();
Actor second = Actor::New();
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
Actor third = Actor::New();
Actor third = Actor::New();
- Stage::GetCurrent().Add(third);
+ application.GetScene().Add(third);
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
Actor secondChild = Actor::New();
parent.Add(firstChild);
parent.Add(secondChild);
Actor secondChild = Actor::New();
parent.Add(firstChild);
parent.Add(secondChild);
- Stage::GetCurrent().Add(parent);
+ application.GetScene().Add(parent);
// Create three actors and add them as the children of the first child actor
Actor firstGrandChild = Actor::New();
// Create three actors and add them as the children of the first child actor
Actor firstGrandChild = Actor::New();
DALI_TEST_CHECK(defaultFocusIndicatorActor);
Actor focusedActor = Actor::New();
DALI_TEST_CHECK(defaultFocusIndicatorActor);
Actor focusedActor = Actor::New();
- Stage::GetCurrent().Add( focusedActor );
+ application.GetScene().Add( focusedActor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
// Create the first actor and add it to the stage
Actor first = Actor::New();
manager.SetFocusOrder(first, 1);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
// Create the second actor and add it to the stage
Actor second = Actor::New();
manager.SetFocusOrder(second, 2);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Check that the wrap mode is disabled
DALI_TEST_CHECK(manager.GetWrapMode() == false);
// Check that the wrap mode is disabled
DALI_TEST_CHECK(manager.GetWrapMode() == false);
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
- Stage::GetCurrent().Add(button);
+ application.GetScene().Add(button);
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
DummyControl dummyControl = DummyControl::New(true);
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
manager.SetFocusOrder( dummyControl, 1 );
DummyControl dummyControl = DummyControl::New(true);
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
manager.SetFocusOrder( dummyControl, 1 );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
manager.SetCurrentFocusActor( dummyControl );
accessibilityAdaptor.HandleActionUpEvent();
manager.SetCurrentFocusActor( dummyControl );
accessibilityAdaptor.HandleActionUpEvent();
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
- Stage::GetCurrent().Add(button);
+ application.GetScene().Add(button);
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
- Stage::GetCurrent().Add(button);
+ application.GetScene().Add(button);
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
manager.SetFocusOrder( dummyControl, 1 );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
manager.SetFocusOrder( dummyControl, 1 );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
manager.SetCurrentFocusActor( dummyControl );
TouchPoint point( 0, TouchPoint::Started, 100.0f, 200.0f );
manager.SetCurrentFocusActor( dummyControl );
TouchPoint point( 0, TouchPoint::Started, 100.0f, 200.0f );
Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
DummyControl dummyControl = DummyControl::New(true);
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
DummyControl dummyControl = DummyControl::New(true);
dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
AccessibilityGestureEvent panGestureEvent(AccessibilityGestureEvent::Started);
panGestureEvent.previousPosition = Vector2(0.f, 0.f);
AccessibilityGestureEvent panGestureEvent(AccessibilityGestureEvent::Started);
panGestureEvent.previousPosition = Vector2(0.f, 0.f);
- * Copyright (c) 2015 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New();
DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New();
DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalLeft);
DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalLeft);
DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalRight);
DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalRight);
DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop);
DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop);
DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop);
DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop);
DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop);
DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop);
DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom);
DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom);
DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom);
DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom);
DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom);
DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom);
DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
application.Render();
application.SendNotification();
}
application.Render();
application.SendNotification();
}
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
DALI_TEST_EQUALS(size, alignment.GetTargetSize().GetVectorXY(), TEST_LOCATION);
DALI_TEST_EQUALS(size, alignment.GetTargetSize().GetVectorXY(), TEST_LOCATION);
- Stage::GetCurrent().Remove(alignment);
+ application.GetScene().Remove(alignment);
Alignment alignment = Alignment::New();
alignment.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
alignment.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Alignment alignment = Alignment::New();
alignment.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
alignment.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
alignment.TouchSignal().Connect(&TouchCallback);
alignment.TouchSignal().Connect(&TouchCallback);
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
alignment.SetKeyInputFocus();
alignment.SetKeyInputFocus();
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
- Stage::GetCurrent().Add(alignment);
+ application.GetScene().Add(alignment);
Animation animation = Animation::New(100.0f);
animation.AnimateTo( Property( alignment, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
Animation animation = Animation::New(100.0f);
animation.AnimateTo( Property( alignment, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(20);
application.SendNotification();
application.Render(20);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(20);
application.SendNotification();
application.Render(20);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
Impl::DummyControl& dummyImpl1 = static_cast<Impl::DummyControl&>(dummyControl1.GetImplementation());
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, animatedImageVisual1 );
dummyControl1.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
Impl::DummyControl& dummyImpl1 = static_cast<Impl::DummyControl&>(dummyControl1.GetImplementation());
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, animatedImageVisual1 );
dummyControl1.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl1 );
+ application.GetScene().Add( dummyControl1 );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(dummyControl2.GetImplementation());
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, animatedImageVisual2 );
dummyControl2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(dummyControl2.GetImplementation());
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, animatedImageVisual2 );
dummyControl2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl2 );
+ application.GetScene().Add( dummyControl2 );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
textureTrace.Enable(true);
dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
textureTrace.Enable(true);
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
- * Copyright (c) 2018 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline( "Test Play action" );
DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
tet_infoline( "Test Play action" );
DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render( 16 );
application.SendNotification();
application.Render( 16 );
DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::STOPPED );
tet_infoline( "On stage again" );
DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::STOPPED );
tet_infoline( "On stage again" );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Vector2 controlSize( 20.f, 30.f );
Vector2 naturalSize;
Vector2 controlSize( 20.f, 30.f );
Vector2 naturalSize;
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
Property::Map attributes;
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
actor.SetProperty( Actor::Property::SIZE, controlSize );
actor.SetProperty( Actor::Property::SCALE, controlScale );
actor.SetProperty( Actor::Property::SIZE, controlSize );
actor.SetProperty( Actor::Property::SCALE, controlScale );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Vector2 controlSize( 20.f, 30.f );
actor1.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor1.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor1 );
+ application.GetScene().Add( actor1 );
propertyMap.Clear();
propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
propertyMap.Clear();
propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
actor2.SetProperty( Actor::Property::SIZE, controlSize );
actor2.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor2 );
+ application.GetScene().Add( actor2 );
DevelControl::DoAction( actor2, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, Property::Map() );
DevelControl::DoAction( actor2, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, Property::Map() );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
Vector2 controlSize( 20.f, 30.f );
actor.SetProperty( Actor::Property::SIZE, controlSize );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
Toolkit::BloomView view = Toolkit::BloomView::New();
DALI_TEST_CHECK( view );
Toolkit::BloomView view = Toolkit::BloomView::New();
DALI_TEST_CHECK( view );
- RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
- RenderTaskList taskList2 = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList2 = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
view.Deactivate();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
view.Deactivate();
- RenderTaskList taskList3 = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList3 = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList3.GetTaskCount() );
END_TEST;
}
DALI_TEST_CHECK( 1u == taskList3.GetTaskCount() );
END_TEST;
}
BloomView view = Toolkit::BloomView::New();
BloomView view = Toolkit::BloomView::New();
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Texture shapeImage = CreateSolidColorTexture( application, Color::GREEN, 5, 5 );
BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 200, Vector2( 5.f, 10.f ));
Texture shapeImage = CreateSolidColorTexture( application, Color::GREEN, 5, 5 );
BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 200, Vector2( 5.f, 10.f ));
- RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList = application.GetScene().GetRenderTaskList();
unsigned int taskCount = taskList.GetTaskCount();
Texture bgImage = CreateSolidColorTexture( application, Color::RED, 50, 50 );
unsigned int taskCount = taskList.GetTaskCount();
Texture bgImage = CreateSolidColorTexture( application, Color::RED, 50, 50 );
BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 150, Vector2( 5.f, 10.f ));
DALI_TEST_CHECK(emitter);
Actor root = emitter.GetRootActor();
BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 150, Vector2( 5.f, 10.f ));
DALI_TEST_CHECK(emitter);
Actor root = emitter.GetRootActor();
- Stage::GetCurrent().Add( root );
+ application.GetScene().Add( root );
root.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
root.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Actor root = emitter.GetRootActor();
Renderer bubbleRenderer = root.GetRendererAt( 0 );
Actor root = emitter.GetRootActor();
Renderer bubbleRenderer = root.GetRendererAt( 0 );
- Stage::GetCurrent().Add( root );
+ application.GetScene().Add( root );
DALI_TEST_CHECK( bubbleRenderer );
Property::Index propertyIndex0 = bubbleRenderer.GetPropertyIndex( "uPercentage[0]" );
DALI_TEST_CHECK( bubbleRenderer );
Property::Index propertyIndex0 = bubbleRenderer.GetPropertyIndex( "uPercentage[0]" );
Texture shapeImage = CreateSolidColorTexture( application, Color::GREEN, 5, 5 );
BubbleEmitter emitter = BubbleEmitter::New( movementArea,shapeImage, 90, Vector2( 5.f, 10.f ));
Actor root = emitter.GetRootActor();
Texture shapeImage = CreateSolidColorTexture( application, Color::GREEN, 5, 5 );
BubbleEmitter emitter = BubbleEmitter::New( movementArea,shapeImage, 90, Vector2( 5.f, 10.f ));
Actor root = emitter.GetRootActor();
- Stage::GetCurrent().Add( root );
+ application.GetScene().Add( root );
root.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
root.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- * Copyright (c) 2018 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
);
Builder builder = Builder::New();
builder.LoadFromString( json );
);
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( application.GetScene().GetRootLayer() );
// Connect to builder's quit signal
bool functorCalled( false );
// Connect to builder's quit signal
bool functorCalled( false );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors( application.GetScene().GetRootLayer() );
Animation anim = builder.CreateAnimation("animate");
Animation anim = builder.CreateAnimation("animate");
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors( application.GetScene().GetRootLayer() );
Animation anim = builder.CreateAnimation("animate");
Animation anim = builder.CreateAnimation("animate");
DALI_TEST_CHECK(anim);
// alternative actor to use for FindChildByName
DALI_TEST_CHECK(anim);
// alternative actor to use for FindChildByName
- anim = builder.CreateAnimation("animate2", Dali::Stage::GetCurrent().GetRootLayer());
+ anim = builder.CreateAnimation("animate2", application.GetScene().GetRootLayer());
DALI_TEST_CHECK(anim);
// alternative actor to use for FindChildByName
DALI_TEST_CHECK(anim);
// alternative actor to use for FindChildByName
- anim = builder.CreateAnimation("animate2", map, Dali::Stage::GetCurrent().GetRootLayer());
+ anim = builder.CreateAnimation("animate2", map, application.GetScene().GetRootLayer());
DALI_TEST_CHECK( value.GetType() != Property::NONE );
DALI_TEST_CHECK( value.GetType() != Property::NONE );
- builder.AddActors ( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( application.GetScene().GetRootLayer() );
DALI_TEST_CHECK( builder );
DALI_TEST_CHECK( builder );
- Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("image");
+ Actor actor = application.GetScene().GetRootLayer().FindChildByName("image");
DALI_TEST_CHECK( actor );
END_TEST;
DALI_TEST_CHECK( actor );
END_TEST;
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- unsigned int count = Stage::GetCurrent().GetRenderTaskList().GetTaskCount();
+ unsigned int count = application.GetScene().GetRenderTaskList().GetTaskCount();
// coverage
builder.CreateRenderTask( "task0" );
DALI_TEST_CHECK( count <
// coverage
builder.CreateRenderTask( "task0" );
DALI_TEST_CHECK( count <
- Stage::GetCurrent().GetRenderTaskList().GetTaskCount() );
+ application.GetScene().GetRenderTaskList().GetTaskCount() );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( application.GetScene().GetRootLayer() );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("subActor");
+ Actor actor = application.GetScene().GetRootLayer().FindChildByName("subActor");
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( application.GetScene().GetRootLayer() );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("subActor");
+ Actor actor = application.GetScene().GetRootLayer().FindChildByName("subActor");
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( application.GetScene().GetRootLayer() );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("actor");
+ Actor actor = application.GetScene().GetRootLayer().FindChildByName("actor");
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( application.GetScene().GetRootLayer() );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("actor");
+ Actor actor = application.GetScene().GetRootLayer().FindChildByName("actor");
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
{
Builder builder = Builder::New();
builder.LoadFromString( json );
{
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( application.GetScene().GetRootLayer() );
DALI_TEST_CHECK( false );
}
catch(...)
DALI_TEST_CHECK( false );
}
catch(...)
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( "stage", Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( "stage", application.GetScene().GetRootLayer() );
// Render and notify
application.SendNotification();
application.Render();
// Render and notify
application.SendNotification();
application.Render();
- Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("Image1");
+ Actor actor = application.GetScene().GetRootLayer().FindChildByName("Image1");
// coverage
DALI_TEST_CHECK( actor );
// coverage
DALI_TEST_CHECK( actor );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors ( "arbitarysection", Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors ( "arbitarysection", application.GetScene().GetRootLayer() );
// Render and notify
application.SendNotification();
application.Render();
// Render and notify
application.SendNotification();
application.Render();
- Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("subActor");
+ Actor actor = application.GetScene().GetRootLayer().FindChildByName("subActor");
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
DALI_TEST_CHECK( actor );
DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
// For coverage
Actor actor = Actor::New();
// For coverage
Actor actor = Actor::New();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
builder.AddActors( actor );
// Render and notify
builder.AddActors( actor );
// Render and notify
builder.LoadFromString( json );
Test::TestButton testButton = Test::TestButton::New();
builder.LoadFromString( json );
Test::TestButton testButton = Test::TestButton::New();
- Stage::GetCurrent().Add( testButton );
+ application.GetScene().Add( testButton );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
builder.LoadFromString( json );
Test::TestButton testButton = Test::TestButton::New();
builder.LoadFromString( json );
Test::TestButton testButton = Test::TestButton::New();
- Stage::GetCurrent().Add( testButton );
+ application.GetScene().Add( testButton );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
);
Actor rootActor = Actor::New();
);
Actor rootActor = Actor::New();
- Stage::GetCurrent().Add( rootActor );
+ application.GetScene().Add( rootActor );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
);
Actor rootActor = Actor::New();
);
Actor rootActor = Actor::New();
- Stage::GetCurrent().Add( rootActor );
+ application.GetScene().Add( rootActor );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
);
Actor rootActor = Actor::New();
);
Actor rootActor = Actor::New();
- Stage::GetCurrent().Add( rootActor );
+ application.GetScene().Add( rootActor );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
Builder builder = Builder::New();
builder.LoadFromString( json );
- builder.AddActors( Stage::GetCurrent().GetRootLayer() );
+ builder.AddActors( application.GetScene().GetRootLayer() );
DALI_TEST_CHECK( true ); // For Coverage
DALI_TEST_CHECK( true ); // For Coverage
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
button.SetProperty( Button::Property::TOGGLABLE, true);
button.SetProperty( Button::Property::TOGGLABLE, true);
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
- Stage::GetCurrent().Add( parentButton );
+ application.GetScene().Add( parentButton );
Button childButton = PushButton::New();
childButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Button childButton = PushButton::New();
childButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
- Stage::GetCurrent().Add( parentButton );
+ application.GetScene().Add( parentButton );
parentButton.ReleasedSignal().Connect( &ButtonCallback );
// Reset signal flags
parentButton.ReleasedSignal().Connect( &ButtonCallback );
// Reset signal flags
button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
button.ReleasedSignal().Connect( &ButtonCallback );
// Reset signal flags
button.ReleasedSignal().Connect( &ButtonCallback );
// Reset signal flags
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
ToolkitTestApplication application;
CheckBoxButton checkBox = CheckBoxButton::New();
ToolkitTestApplication application;
CheckBoxButton checkBox = CheckBoxButton::New();
- Stage::GetCurrent().Add( checkBox );
+ application.GetScene().Add( checkBox );
checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) );
checkBox.SetProperty(checkBox.GetPropertyIndex("disabledUnselectedBackgroundVisual"), "Image.jpg" );
checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) );
checkBox.SetProperty(checkBox.GetPropertyIndex("disabledUnselectedBackgroundVisual"), "Image.jpg" );
ToolkitTestApplication application;
CheckBoxButton checkBox = CheckBoxButton::New();
ToolkitTestApplication application;
CheckBoxButton checkBox = CheckBoxButton::New();
- Stage::GetCurrent().Add( checkBox );
+ application.GetScene().Add( checkBox );
checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) );
checkBox.SetProperty(Button::Property::DISABLED_UNSELECTED_VISUAL, "Image.jpg" );
checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) );
checkBox.SetProperty(Button::Property::DISABLED_UNSELECTED_VISUAL, "Image.jpg" );
- * Copyright (c) 2015 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DALI_TEST_CHECK( !gSignalReceivedCancel );
// Provoke the signal.
DALI_TEST_CHECK( !gSignalReceivedCancel );
// Provoke the signal.
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
// Check the signal has occurred.
DALI_TEST_CHECK( gSignalReceivedOK );
// Check the signal has occurred.
DALI_TEST_CHECK( gSignalReceivedOK );
DALI_TEST_CHECK( !gSignalReceivedCancel );
// Provoke the signal.
DALI_TEST_CHECK( !gSignalReceivedCancel );
// Provoke the signal.
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
// Check the cancel signal has occurred.
DALI_TEST_CHECK( gSignalReceivedOK );
// Check the cancel signal has occurred.
DALI_TEST_CHECK( gSignalReceivedOK );
DALI_TEST_CHECK( !gSignalReceivedOK );
// Provoke the signal.
DALI_TEST_CHECK( !gSignalReceivedOK );
// Provoke the signal.
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
// Check the signal has still not occurred, as our button was incorrectly named.
DALI_TEST_CHECK( !gSignalReceivedOK );
// Check the signal has still not occurred, as our button was incorrectly named.
DALI_TEST_CHECK( !gSignalReceivedOK );
Toolkit::Popup popup = Toolkit::Popup::DownCast( baseHandle );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
Toolkit::Popup popup = Toolkit::Popup::DownCast( baseHandle );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Toolkit::Popup::SHOWN );
application.SendNotification();
popup.SetDisplayState( Toolkit::Popup::SHOWN );
application.SendNotification();
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
ToolkitTestApplication application;
Control control = Control::New();
ToolkitTestApplication application;
Control control = Control::New();
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
DALI_TEST_EQUALS( -1, control.GetProperty( DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID ).Get< int >(), TEST_LOCATION );
DALI_TEST_EQUALS( -1, control.GetProperty( DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID ).Get< int >(), TEST_LOCATION );
DALI_TEST_EQUALS( -1, control.GetProperty( DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID ).Get< int >(), TEST_LOCATION );
DALI_TEST_EQUALS( -1, control.GetProperty( DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID ).Get< int >(), TEST_LOCATION );
int UtcDaliControlKeyInputFocus(void)
{
ToolkitTestApplication application;
int UtcDaliControlKeyInputFocus(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
dummyImpl->mCustomSlot1Called = false;
actor.OnStageSignal().Disconnect( dummyImpl, &DummyControlImpl::CustomSlot1 );
DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
dummyImpl->mCustomSlot1Called = false;
actor.OnStageSignal().Disconnect( dummyImpl, &DummyControlImpl::CustomSlot1 );
DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Remove( actor );
+ application.GetScene().Add( actor );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
}
END_TEST;
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
}
END_TEST;
DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
}
// dummyControl automatically disconnects
}
// dummyControl automatically disconnects
test.SetProperty( Actor::Property::SIZE, Vector3( 0.7f, 0.7f, 0.7f ) );
test.SetProperty( Actor::Property::SIZE, Vector3( 0.7f, 0.7f, 0.7f ) );
- Stage::GetCurrent().Add( test );
+ application.GetScene().Add( test );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
ToolkitTestApplication application;
Control control = Control::New();
ToolkitTestApplication application;
Control control = Control::New();
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
tet_infoline( "Set transparent, no renderers should be created" );
control.SetBackgroundColor( Color::TRANSPARENT );
tet_infoline( "Set transparent, no renderers should be created" );
control.SetBackgroundColor( Color::TRANSPARENT );
ToolkitTestApplication application;
Control control = Control::New();
ToolkitTestApplication application;
Control control = Control::New();
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
DALI_TEST_EQUALS( control.HasKeyInputFocus(), control.GetProperty( Control::Property::KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
DALI_TEST_EQUALS( control.HasKeyInputFocus(), control.GetProperty( Control::Property::KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
ToolkitTestApplication application;
Control control = Control::New();
ToolkitTestApplication application;
Control control = Control::New();
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
gKeyInputFocusCallBackCalled = false;
control.KeyInputFocusGainedSignal().Connect(&TestKeyInputFocusCallback);
gKeyInputFocusCallBackCalled = false;
control.KeyInputFocusGainedSignal().Connect(&TestKeyInputFocusCallback);
ToolkitTestApplication application;
Control control = Control::New();
ToolkitTestApplication application;
Control control = Control::New();
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
gKeyInputFocusCallBackCalled = false;
control.KeyInputFocusLostSignal().Connect(&TestKeyInputFocusCallback);
gKeyInputFocusCallBackCalled = false;
control.KeyInputFocusLostSignal().Connect(&TestKeyInputFocusCallback);
control.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
control.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
control.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
control.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( 0, control.GetRendererCount(), TEST_LOCATION );
DALI_TEST_EQUALS( 0, control.GetRendererCount(), TEST_LOCATION );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( 0, control.GetRendererCount(), TEST_LOCATION );
DALI_TEST_EQUALS( 0, control.GetRendererCount(), TEST_LOCATION );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline( "Test to ensure that the control background transform does not get overwritten when adding to the stage" );
tet_infoline( "Test to ensure that the control background transform does not get overwritten when adding to the stage" );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( static_cast<int>(resourceStatus), static_cast<int>(Toolkit::Visual::ResourceStatus::PREPARING), TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( static_cast<int>(resourceStatus), static_cast<int>(Toolkit::Visual::ResourceStatus::PREPARING), TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
propertyMap.Insert( ImageVisual::Property::URL, "invalid.jpg" );
control.SetProperty( Control::Property::BACKGROUND, propertyMap );
propertyMap.Insert( ImageVisual::Property::URL, "invalid.jpg" );
control.SetProperty( Control::Property::BACKGROUND, propertyMap );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
control.SetProperty( Control::Property::MARGIN, Extents( 20, 10, 0, 0 ) );
control.SetProperty( Control::Property::MARGIN, Extents( 20, 10, 0, 0 ) );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
control.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
control.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
tet_infoline( "Adding control to stage will in turn add the visual to the stage" );
tet_infoline( "Adding control to stage will in turn add the visual to the stage" );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
tet_infoline( "No change in textures could occurs as already loaded and cached texture will be used" );
application.SendNotification();
application.Render();
tet_infoline( "No change in textures could occurs as already loaded and cached texture will be used" );
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
dummy.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
// Render and notify a couple of times
application.SendNotification();
// Render and notify a couple of times
application.SendNotification();
DALI_TEST_CHECK( dummyImpl.longPressCalled == true );
DALI_TEST_CHECK( dummyImpl.longPressCalled == true );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
{
DummyControl dummy = DummyControl::New( true );
{
DummyControl dummy = DummyControl::New( true );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
application.Render();
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
application.Render();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
DALI_TEST_EQUALS( dummyImpl.stageConnectionCalled, false, TEST_LOCATION );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
DALI_TEST_EQUALS( dummyImpl.stageConnectionCalled, false, TEST_LOCATION );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
DALI_TEST_EQUALS( dummyImpl.stageConnectionCalled, true, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.stageDisconnectionCalled, false, TEST_LOCATION );
application.Render();
application.SendNotification();
DALI_TEST_EQUALS( dummyImpl.stageConnectionCalled, true, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.stageDisconnectionCalled, false, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
application.Render();
application.SendNotification();
DALI_TEST_EQUALS( dummyImpl.stageDisconnectionCalled, true, TEST_LOCATION );
application.Render();
application.SendNotification();
DALI_TEST_EQUALS( dummyImpl.stageDisconnectionCalled, true, TEST_LOCATION );
// Ensure full code coverage
{
// Ensure full code coverage
{
- unsigned int stageChildren = Stage::GetCurrent().GetLayer(0).GetChildCount();
+ unsigned int stageChildren = application.GetScene().GetLayer(0).GetChildCount();
DummyControl dummy = DummyControl::New();
DummyControl dummy = DummyControl::New();
- DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer(0).GetChildCount(), stageChildren, TEST_LOCATION );
- Stage::GetCurrent().Add(dummy);
+ DALI_TEST_EQUALS( application.GetScene().GetLayer(0).GetChildCount(), stageChildren, TEST_LOCATION );
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer(0).GetChildCount(), stageChildren + 1, TEST_LOCATION );
+ DALI_TEST_EQUALS( application.GetScene().GetLayer(0).GetChildCount(), stageChildren + 1, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer(0).GetChildCount(), stageChildren, TEST_LOCATION );
+ DALI_TEST_EQUALS( application.GetScene().GetLayer(0).GetChildCount(), stageChildren, TEST_LOCATION );
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
DALI_TEST_EQUALS( size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION );
DALI_TEST_EQUALS( size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
{
DummyControl dummy = DummyControl::New();
{
DummyControl dummy = DummyControl::New();
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
Vector2 size(100.0f, 200.0f);
DALI_TEST_CHECK( size != dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY() );
Vector2 size(100.0f, 200.0f);
DALI_TEST_CHECK( size != dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY() );
DALI_TEST_EQUALS(size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION);
DALI_TEST_EQUALS(size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION);
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, false, TEST_LOCATION );
Animation animation = Animation::New(1.0f);
DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, false, TEST_LOCATION );
Animation animation = Animation::New(1.0f);
DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, true, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
Animation animation = Animation::New(1.0f);
animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
Animation animation = Animation::New(1.0f);
animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.ProcessEvent(touchEvent);
DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
application.ProcessEvent(touchEvent);
DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
}
// Ensure full code coverage
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
touchEvent.AddPoint(point);
application.ProcessEvent(touchEvent);
touchEvent.AddPoint(point);
application.ProcessEvent(touchEvent);
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
application.ProcessEvent( event );
DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, true, TEST_LOCATION );
application.ProcessEvent( event );
DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
}
// Ensure full code coverage
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
event.AddPoint(point);
application.ProcessEvent( event );
event.AddPoint(point);
application.ProcessEvent( event );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
dummy.SetKeyInputFocus();
application.Render();
dummy.SetKeyInputFocus();
application.Render();
application.ProcessEvent(keyEvent);
DALI_TEST_EQUALS( dummyImpl.keyEventCalled, true, TEST_LOCATION );
application.ProcessEvent(keyEvent);
DALI_TEST_EQUALS( dummyImpl.keyEventCalled, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
dummy.SetKeyInputFocus();
application.Render();
dummy.SetKeyInputFocus();
application.Render();
Integration::KeyEvent keyEvent;
application.ProcessEvent(keyEvent);
Integration::KeyEvent keyEvent;
application.ProcessEvent(keyEvent);
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
DALI_TEST_EQUALS( dummyImpl.keyInputFocusGained, false, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.keyInputFocusGained, false, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.keyInputFocusGained, true, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.keyInputFocusGained, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
dummy.SetKeyInputFocus();
dummy.SetKeyInputFocus();
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
DALI_TEST_EQUALS( dummyImpl.keyInputFocusLost, false, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.keyInputFocusLost, false, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.keyInputFocusLost, true, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.keyInputFocusLost, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
}
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
dummy.SetKeyInputFocus();
dummy.ClearKeyInputFocus();
dummy.SetKeyInputFocus();
dummy.ClearKeyInputFocus();
dummyImpl.IsKeyboardNavigationSupported();
dummyImpl.IsKeyboardFocusGroup();
dummyImpl.IsKeyboardNavigationSupported();
dummyImpl.IsKeyboardFocusGroup();
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
dummy.WheelEventSignal().Connect(&WheelEventCallback);
dummy.WheelEventSignal().Connect(&WheelEventCallback);
application.ProcessEvent( event );
DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, true, TEST_LOCATION );
application.ProcessEvent( event );
DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, true, TEST_LOCATION );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
}
// Ensure full code coverage
}
// Ensure full code coverage
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
dummy.WheelEventSignal().Connect(&WheelEventCallback);
dummy.WheelEventSignal().Connect(&WheelEventCallback);
Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
application.ProcessEvent( event );
Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
application.ProcessEvent( event );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
dummy.SetStyleName("TestStyle");
DALI_TEST_CHECK( dummy.GetStyleName() == "TestStyle" );
dummy.SetStyleName("TestStyle");
DALI_TEST_CHECK( dummy.GetStyleName() == "TestStyle" );
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
dummyImpl.RegisterVisual( index, visual );
tet_infoline( "Add control with visual to stage and check renderer count is 1" );
dummyImpl.RegisterVisual( index, visual );
tet_infoline( "Add control with visual to stage and check renderer count is 1" );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyImpl.UnregisterVisual( index );
tet_infoline( "Remove control with visual from stage and check renderer count is 0" );
dummyImpl.UnregisterVisual( index );
tet_infoline( "Remove control with visual from stage and check renderer count is 0" );
- Stage::GetCurrent().Remove( dummy );
+ application.GetScene().Remove( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_CHECK( dummyImpl.GetVisual( TEST_PROPERTY ) == visual );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
DALI_TEST_CHECK( dummyImpl.GetVisual( TEST_PROPERTY ) == visual );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
// Register index with a color visual
dummyImpl.RegisterVisual( TEST_PROPERTY, visual );
// Register index with a color visual
dummyImpl.RegisterVisual( TEST_PROPERTY, visual );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
// Register index with a color visual
dummyImpl.RegisterVisual( TEST_PROPERTY, visual, false );
// Register index with a color visual
dummyImpl.RegisterVisual( TEST_PROPERTY, visual, false );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
// Render and notify
application.SendNotification();
application.Render();
// Render and notify
application.SendNotification();
application.Render();
DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
// Remove control from stage, visual should be removed from stage too
DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
// Remove control from stage, visual should be removed from stage too
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
// Render and notify
application.SendNotification();
application.Render();
DALI_TEST_CHECK( dummy.GetRendererCount() == 0u );
// Render and notify
application.SendNotification();
application.Render();
DALI_TEST_CHECK( dummy.GetRendererCount() == 0u );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
// Render and notify
application.SendNotification();
application.Render();
// Render and notify
application.SendNotification();
application.Render();
// Register second index with a color visual
dummyImpl.RegisterVisual( TEST_PROPERTY2, visual2 );
// Register second index with a color visual
dummyImpl.RegisterVisual( TEST_PROPERTY2, visual2 );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
// Render and notify
application.SendNotification();
application.Render();
// Render and notify
application.SendNotification();
application.Render();
DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
// Remove control from stage, visual should be removed from stage too
DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
// Remove control from stage, visual should be removed from stage too
- Stage::GetCurrent().Remove(dummy);
+ application.GetScene().Remove(dummy);
// Render and notify
application.SendNotification();
application.Render();
DALI_TEST_CHECK( dummy.GetRendererCount() == 0u );
// Render and notify
application.SendNotification();
application.Render();
DALI_TEST_CHECK( dummy.GetRendererCount() == 0u );
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
// Render and notify
application.SendNotification();
application.Render();
// Render and notify
application.SendNotification();
application.Render();
control.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
control.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( 0, control.GetRendererCount(), TEST_LOCATION );
DALI_TEST_EQUALS( 0, control.GetRendererCount(), TEST_LOCATION );
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
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 );
- Stage::GetCurrent().Add( controlWrapper );
+ application.GetScene().Add( controlWrapper );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
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 );
- Stage::GetCurrent().Add( controlWrapper );
+ application.GetScene().Add( controlWrapper );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
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 );
- Stage::GetCurrent().Add( controlWrapper );
+ application.GetScene().Add( controlWrapper );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
controlWrapper.SetProperty( Dali::Actor::Property::NAME,"Actor1");
controlWrapper.SetProperty( Actor::Property::COLOR,Color::CYAN);
controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
controlWrapper.SetProperty( Dali::Actor::Property::NAME,"Actor1");
controlWrapper.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(controlWrapper);
+ application.GetScene().Add(controlWrapper);
Animation anim = controlWrapperImpl->CreateTransition( transition );
DALI_TEST_CHECK( ! anim );
Animation anim = controlWrapperImpl->CreateTransition( transition );
DALI_TEST_CHECK( ! anim );
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 );
- Stage::GetCurrent().Add( controlWrapper );
+ application.GetScene().Add( controlWrapper );
// "background" property
Property::Map rendererMap;
// "background" property
Property::Map rendererMap;
// Register to self
controlWrapperImpl->TestRegisterVisual( index, visual );
// Register to self
controlWrapperImpl->TestRegisterVisual( index, visual );
- Stage::GetCurrent().Add( controlWrapper );
+ application.GetScene().Add( controlWrapper );
controlWrapper.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
application.SendNotification();
application.Render(0); // Trigger animation start
controlWrapper.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
application.SendNotification();
application.Render(0); // Trigger animation start
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 );
- Stage::GetCurrent().Remove( controlWrapper );
+ application.GetScene().Remove( controlWrapper );
}
DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), true, TEST_LOCATION ); // Should be destroyed
}
DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), true, TEST_LOCATION ); // Should be destroyed
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
waveEffect.SetCurrentTexture( texture );
waveEffect.SetTargetTexture( texture );
waveEffect.SetCurrentTexture( texture );
waveEffect.SetTargetTexture( texture );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
- Stage::GetCurrent().Add( crossEffect );
+ application.GetScene().Add( crossEffect );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
- Stage::GetCurrent().Add( foldEffect );
+ application.GetScene().Add( foldEffect );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
DALI_TEST_CHECK( !foldEffect.IsTransitioning() );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
DALI_TEST_CHECK( !foldEffect.IsTransitioning() );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetCurrentTexture( texture );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetCurrentTexture( texture );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
waveEffect.SetCurrentTexture( texture );
waveEffect.SetTargetTexture( texture );
waveEffect.SetCurrentTexture( texture );
waveEffect.SetTargetTexture( texture );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
waveEffect.SetCurrentTexture( texture );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
waveEffect.SetCurrentTexture( texture );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
crossEffect.SetCurrentTexture( texture );
crossEffect.SetTargetTexture( texture );
crossEffect.SetCurrentTexture( texture );
crossEffect.SetTargetTexture( texture );
- Stage::GetCurrent().Add( crossEffect );
+ application.GetScene().Add( crossEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
foldEffect.SetCurrentTexture( texture );
foldEffect.SetTargetTexture( texture );
foldEffect.SetCurrentTexture( texture );
foldEffect.SetTargetTexture( texture );
- Stage::GetCurrent().Add( foldEffect );
+ application.GetScene().Add( foldEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
- Stage::GetCurrent().Add( crossEffect );
+ application.GetScene().Add( crossEffect );
CubeTransitionEffect foldEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
CubeTransitionEffect foldEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
- Stage::GetCurrent().Add( foldEffect );
+ application.GetScene().Add( foldEffect );
bool signalVerified = false;
CubeTransitionEffect currentEffect;
bool signalVerified = false;
CubeTransitionEffect currentEffect;
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
- Stage::GetCurrent().Add( crossEffect );
+ application.GetScene().Add( crossEffect );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
- Stage::GetCurrent().Add( foldEffect );
+ application.GetScene().Add( foldEffect );
bool signalVerified = false;
CubeTransitionEffect currentEffect;
bool signalVerified = false;
CubeTransitionEffect currentEffect;
waveEffect.SetCurrentTexture( firstTexture );
waveEffect.SetTargetTexture( secondTexture );
waveEffect.SetCurrentTexture( firstTexture );
waveEffect.SetTargetTexture( secondTexture );
- Stage::GetCurrent().Add( waveEffect );
+ application.GetScene().Add( waveEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
crossEffect.SetCurrentTexture( firstTexture );
crossEffect.SetTargetTexture( secondTexture );
crossEffect.SetCurrentTexture( firstTexture );
crossEffect.SetTargetTexture( secondTexture );
- Stage::GetCurrent().Add( crossEffect );
+ application.GetScene().Add( crossEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
foldEffect.SetCurrentTexture( firstTexture );
foldEffect.SetTargetTexture( secondTexture );
foldEffect.SetCurrentTexture( firstTexture );
foldEffect.SetTargetTexture( secondTexture );
- Stage::GetCurrent().Add( foldEffect );
+ application.GetScene().Add( foldEffect );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Control control = Control::New();
control.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
control.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Control control = Control::New();
control.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
control.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(control);
+ application.GetScene().Add(control);
detector.Attach(control);
application.SendNotification();
detector.Attach(control);
application.SendNotification();
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
- Stage::GetCurrent().Add(control1);
- Stage::GetCurrent().Add(control2);
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
detector.Attach(control1);
detector.Attach(control2);
detector.Attach(control1);
detector.Attach(control2);
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
- Stage::GetCurrent().Add(control1);
- Stage::GetCurrent().Add(control2);
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
detector.Attach(control1);
detector.Attach(control2);
detector.Attach(control1);
detector.Attach(control2);
control1.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
control2.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
control1.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
control2.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
- Stage::GetCurrent().Add(control1);
- Stage::GetCurrent().Add(control2);
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
detector.Attach(control1);
detector.Attach(control2);
detector.Attach(control1);
detector.Attach(control2);
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
- Stage::GetCurrent().Add(control1);
- Stage::GetCurrent().Add(control2);
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
detector.Attach(control1);
detector.Attach(control2);
detector.Attach(control1);
detector.Attach(control2);
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
- Stage::GetCurrent().Add(control1);
- Stage::GetCurrent().Add(control2);
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
- Stage::GetCurrent().Add(control1);
- Stage::GetCurrent().Add(control2);
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
detector.Attach(control1);
detector.Attach(control2);
detector.Attach(control1);
detector.Attach(control2);
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
view = EffectsView::New( EffectsView::DROP_SHADOW );
DALI_TEST_CHECK( view );
view = EffectsView::New( EffectsView::DROP_SHADOW );
DALI_TEST_CHECK( view );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
view.Reset();
view = EffectsView::New( EffectsView::EMBOSS );
view.Reset();
view = EffectsView::New( EffectsView::EMBOSS );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( actor.GetParent() );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( actor.GetParent() );
tet_infoline("Checking number of render tasks = 1");
application.SendNotification();
application.Render();
tet_infoline("Checking number of render tasks = 1");
application.SendNotification();
application.Render();
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION );
tet_infoline("Create effects view");
DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION );
tet_infoline("Create effects view");
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::EMBOSS );
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::EMBOSS );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET );
Vector3 offsetValue;
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET );
Vector3 offsetValue;
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW );
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_COLOR );
Vector4 colorValue;
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_COLOR );
Vector4 colorValue;
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
stage.Add( view );
application.SendNotification();
application.Render();
stage.Add( view );
application.SendNotification();
application.Render();
int UtcDaliEffectsViewSizeSet(void)
{
ToolkitTestApplication application;
int UtcDaliEffectsViewSizeSet(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- * Copyright (c) 2016 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
- Stage::GetCurrent().Add( flexContainer );
+ application.GetScene().Add( flexContainer );
// Create two actors and add them to the container
Actor actor1 = Actor::New();
// Create two actors and add them to the container
Actor actor1 = Actor::New();
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
- Stage::GetCurrent().Add( flexContainer );
+ application.GetScene().Add( flexContainer );
// Create two actors and add them to the container
Actor actor1 = Actor::New();
// Create two actors and add them to the container
Actor actor1 = Actor::New();
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
- Stage::GetCurrent().Add( flexContainer );
+ application.GetScene().Add( flexContainer );
// Create an actor and add it to the container
Actor actor = Actor::New();
// Create an actor and add it to the container
Actor actor = Actor::New();
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
DALI_TEST_CHECK( flexContainer );
// Add flex container to the stage
- Stage::GetCurrent().Add( flexContainer );
+ application.GetScene().Add( flexContainer );
RelayoutSignalHandler relayoutSignal(flexContainer);
flexContainer.OnRelayoutSignal().Connect(&relayoutSignal, &RelayoutSignalHandler::RelayoutCallback );
RelayoutSignalHandler relayoutSignal(flexContainer);
flexContainer.OnRelayoutSignal().Connect(&relayoutSignal, &RelayoutSignalHandler::RelayoutCallback );
flexContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW );
// Add flex container to the stage
flexContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW );
// Add flex container to the stage
- Stage::GetCurrent().Add( flexContainer );
- Size stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( flexContainer );
+ Size stageSize = application.GetScene().GetSize();
RelayoutSignalHandler relayoutSignal(flexContainer);
flexContainer.OnRelayoutSignal().Connect(&relayoutSignal, &RelayoutSignalHandler::RelayoutCallback );
RelayoutSignalHandler relayoutSignal(flexContainer);
flexContainer.OnRelayoutSignal().Connect(&relayoutSignal, &RelayoutSignalHandler::RelayoutCallback );
Actor actor0 = Actor::New();
Actor actor0 = Actor::New();
- Stage::GetCurrent().Add( actor0 );
+ application.GetScene().Add( actor0 );
actor0.Add( flexContainer );
// Create two actors and add them to the container
actor0.Add( flexContainer );
// Create two actors and add them to the container
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
Toolkit::GaussianBlurView view = Toolkit::GaussianBlurView::New();
DALI_TEST_CHECK( view );
Toolkit::GaussianBlurView view = Toolkit::GaussianBlurView::New();
DALI_TEST_CHECK( view );
- RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
- RenderTaskList taskList2 = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList2 = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
DALI_TEST_CHECK( 2u == view.GetChildCount() );
view.Deactivate();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
DALI_TEST_CHECK( 2u == view.GetChildCount() );
view.Deactivate();
- RenderTaskList taskList3 = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList3 = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList3.GetTaskCount() );
DALI_TEST_CHECK( 1u == view.GetChildCount() );
DALI_TEST_CHECK( 1u == taskList3.GetTaskCount() );
DALI_TEST_CHECK( 1u == view.GetChildCount() );
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
view.Activate();
application.SendNotification();
view.Activate();
application.SendNotification();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
view.Activate();
PixelData pixels = Toolkit::SyncImageLoader::Load( TEST_IMAGE_FILE_NAME );
view.Activate();
PixelData pixels = Toolkit::SyncImageLoader::Load( TEST_IMAGE_FILE_NAME );
Toolkit::GaussianBlurView view = Toolkit::GaussianBlurView::New(5, 1.5f, Pixel::RGB888, 0.5f, 0.5f, true);
DALI_TEST_CHECK( view );
Toolkit::GaussianBlurView view = Toolkit::GaussianBlurView::New(5, 1.5f, Pixel::RGB888, 0.5f, 0.5f, true);
DALI_TEST_CHECK( view );
- RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
- RenderTaskList taskList2 = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList2 = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
application.Render();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
application.Render();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
view.ActivateOnce();
application.SendNotification();
view.ActivateOnce();
application.SendNotification();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
view.Activate();
TestCallback callback( view );
view.Activate();
TestCallback callback( view );
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
imageView2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
application.GetPlatform().SetClosestImageSize( Vector2(34, 34) );
imageView2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
application.GetPlatform().SetClosestImageSize( Vector2(34, 34) );
- Stage::GetCurrent().Add( imageView1 );
+ application.GetScene().Add( imageView1 );
application.GetPlatform().SetClosestImageSize( Vector2(50, 50) );
application.GetPlatform().SetClosestImageSize( Vector2(50, 50) );
- Stage::GetCurrent().Add( imageView2 );
+ application.GetScene().Add( imageView2 );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
// remove the imageView2 from stage, the second image will also be removed from atlas
// then the space on the atlas will be used by the third image added.
// remove the imageView2 from stage, the second image will also be removed from atlas
// then the space on the atlas will be used by the third image added.
- Stage::GetCurrent().Remove( imageView2 );
+ application.GetScene().Remove( imageView2 );
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
imageView3.SetProperty( ImageView::Property::IMAGE, imageMap3 );
application.GetPlatform().SetClosestImageSize( Vector2(100, 100) );
imageView3.SetProperty( ImageView::Property::IMAGE, imageMap3 );
application.GetPlatform().SetClosestImageSize( Vector2(100, 100) );
- Stage::GetCurrent().Add( imageView3 );
+ application.GetScene().Add( imageView3 );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
ImageView imageView1 = ImageView::New();
imageView1.SetProperty( ImageView::Property::IMAGE, imageMap );
ImageView imageView1 = ImageView::New();
imageView1.SetProperty( ImageView::Property::IMAGE, imageMap );
- Stage::GetCurrent().Add( imageView1 );
+ application.GetScene().Add( imageView1 );
Property::Value value = imageView1.GetProperty( ImageView::Property::PRE_MULTIPLIED_ALPHA );
bool enable;
Property::Value value = imageView1.GetProperty( ImageView::Property::PRE_MULTIPLIED_ALPHA );
bool enable;
ImageView imageView2 = ImageView::New();
imageView2.SetProperty( ImageView::Property::IMAGE, imageMap );
ImageView imageView2 = ImageView::New();
imageView2.SetProperty( ImageView::Property::IMAGE, imageMap );
- Stage::GetCurrent().Add( imageView2 );
+ application.GetScene().Add( imageView2 );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
ImageView imageView1 = ImageView::New();
imageView1.SetProperty( ImageView::Property::IMAGE, imageMap );
ImageView imageView1 = ImageView::New();
imageView1.SetProperty( ImageView::Property::IMAGE, imageMap );
- Stage::GetCurrent().Add( imageView1 );
+ application.GetScene().Add( imageView1 );
Property::Value value = imageView1.GetProperty( ImageView::Property::PRE_MULTIPLIED_ALPHA );
bool enable;
Property::Value value = imageView1.GetProperty( ImageView::Property::PRE_MULTIPLIED_ALPHA );
bool enable;
// Disable pre-multiplied alpha blending
imageView2.SetProperty( ImageView::Property::PRE_MULTIPLIED_ALPHA, false );
// Disable pre-multiplied alpha blending
imageView2.SetProperty( ImageView::Property::PRE_MULTIPLIED_ALPHA, false );
- Stage::GetCurrent().Add( imageView2 );
+ application.GetScene().Add( imageView2 );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
.Add( ImageVisual::Property::PIXEL_AREA, pixelAreaVisual ) );
// Add to stage
.Add( ImageVisual::Property::PIXEL_AREA, pixelAreaVisual ) );
// Add to stage
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
stage.Add( gifView );
// loading started
stage.Add( gifView );
// loading started
ImageView imageView = ImageView::New( gImage_600_RGB );
// By default, Aysnc loading is used
ImageView imageView = ImageView::New( gImage_600_RGB );
// By default, Aysnc loading is used
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
imageView.SetProperty( Actor::Property::SIZE, Vector2(100, 100) );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
imageView.SetProperty( Actor::Property::SIZE, Vector2(100, 100) );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// By default, Aysnc loading is used
// loading is not started if the actor is offStage
// By default, Aysnc loading is used
// loading is not started if the actor is offStage
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render(16);
application.Render(16);
application.SendNotification();
application.Render(16);
application.Render(16);
ImageView imageView = ImageView::New();
imageView.SetProperty( ImageView::Property::IMAGE, asyncLoadingMap );
ImageView imageView = ImageView::New();
imageView.SetProperty( ImageView::Property::IMAGE, asyncLoadingMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render(16);
application.Render(16);
application.SendNotification();
application.Render(16);
application.Render(16);
syncLoadingMap[ ImageVisual::Property::DESIRED_WIDTH ] = 34;
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
syncLoadingMap[ ImageVisual::Property::DESIRED_WIDTH ] = 34;
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
syncLoadingMap[ "atlasing" ] = true;
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
syncLoadingMap[ "atlasing" ] = true;
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
propertyMap[ImageVisual::Property::URL] = url;
imageView.SetProperty(ImageView::Property::IMAGE, propertyMap);
propertyMap[ImageVisual::Property::URL] = url;
imageView.SetProperty(ImageView::Property::IMAGE, propertyMap);
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetImage( gImage_600_RGB ); // 1 to 1 ratio, 600x600 pixels
imageView.SetImage( gImage_600_RGB ); // 1 to 1 ratio, 600x600 pixels
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetImage( gImage_600_RGB ); // 1 to 1 ratio
imageView.SetImage( gImage_600_RGB ); // 1 to 1 ratio
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// loading started, this waits for the loader thread
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// loading started, this waits for the loader thread
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
ImageView imageView = ImageView::New();
Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( imageView );
ImageView imageView = ImageView::New();
Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( imageView );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
std::string url;
Property::Map map;
std::string url;
Property::Map map;
imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render(16);
application.SendNotification();
application.Render(16);
dummyControl.Add( imageView );
dummyImpl.SetRelayoutCallback( &OnRelayoutOverride );
dummyControl.Add( imageView );
dummyImpl.SetRelayoutCallback( &OnRelayoutOverride );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline("Connect to ResourceReady signal for second ImageView, it should still fire as resource is ready");
imageViewWithExistingImage.ResourceReadySignal().Connect( &ResourceReadySignal);
tet_infoline("Connect to ResourceReady signal for second ImageView, it should still fire as resource is ready");
imageViewWithExistingImage.ResourceReadySignal().Connect( &ResourceReadySignal);
- Stage::GetCurrent().Add( imageViewWithExistingImage );
+ application.GetScene().Add( imageViewWithExistingImage );
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageMap[ Toolkit::ImageVisual::Property::URL ] = gImage_34_RGBA;
imageMap[ Toolkit::ImageVisual::Property::ATLASING ] = true;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageMap[ Toolkit::ImageVisual::Property::URL ] = gImage_34_RGBA;
imageMap[ Toolkit::ImageVisual::Property::ATLASING ] = true;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,500) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,500) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 );
imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,600) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
imageView.SetProperty( Actor::Property::SIZE, Vector2(600,600) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
// Trigger a potential relayout
application.SendNotification();
// Trigger a potential relayout
application.SendNotification();
ImageView imageView = ImageView::New();
imageView.SetProperty( ImageView::Property::IMAGE, properties );
ImageView imageView = ImageView::New();
imageView.SetProperty( ImageView::Property::IMAGE, properties );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
ImageView imageView = ImageView::New( TEST_IMAGE_FILE_NAME );
imageView.SetProperty( ImageView::Property::IMAGE, properties );
ImageView imageView = ImageView::New( TEST_IMAGE_FILE_NAME );
imageView.SetProperty( ImageView::Property::IMAGE, properties );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( ImageView::Property::IMAGE, properties );
imageView.SetProperty( ImageView::Property::IMAGE, TEST_IMAGE_FILE_NAME );
imageView.SetProperty( ImageView::Property::IMAGE, properties );
imageView.SetProperty( ImageView::Property::IMAGE, TEST_IMAGE_FILE_NAME );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( ImageView::Property::IMAGE, properties1 );
imageView.SetProperty( ImageView::Property::IMAGE, properties );
imageView.SetProperty( ImageView::Property::IMAGE, properties1 );
imageView.SetProperty( ImageView::Property::IMAGE, properties );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( ImageView::Property::IMAGE, properties );
imageView.SetProperty( ImageView::Property::IMAGE, properties1 );
imageView.SetProperty( ImageView::Property::IMAGE, properties );
imageView.SetProperty( ImageView::Property::IMAGE, properties1 );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
imageView.SetProperty( Actor::Property::SIZE, Vector2(300, 300) );
imageView.SetProperty( Actor::Property::POSITION, Vector3( 150.0f , 150.0f , 0.0f ) );
imageView.SetProperty( Actor::Property::SIZE, Vector2(300, 300) );
imageView.SetProperty( Actor::Property::POSITION, Vector3( 150.0f , 150.0f , 0.0f ) );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
DALI_TEST_CHECK( imageView );
DALI_TEST_CHECK( imageView );
syncLoadingMap.Insert( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, true);
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
syncLoadingMap.Insert( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, true);
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
DALI_TEST_CHECK( imageView );
application.SendNotification();
DALI_TEST_CHECK( imageView );
application.SendNotification();
syncLoadingMap.Insert( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, false);
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
syncLoadingMap.Insert( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, false);
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
DALI_TEST_CHECK( imageView );
application.SendNotification();
DALI_TEST_CHECK( imageView );
application.SendNotification();
syncLoadingMap.Insert( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, std::to_string(5) );
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
syncLoadingMap.Insert( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, std::to_string(5) );
imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
DALI_TEST_CHECK( imageView );
application.SendNotification();
DALI_TEST_CHECK( imageView );
application.SendNotification();
DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.SendNotification();
DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
application.SendNotification();
application.SendNotification();
ImageView imageView = ImageView::New( gImage_34_RGBA );
imageView.ResourceReadySignal().Connect( &OnResourceReadySignal );
ImageView imageView = ImageView::New( gImage_34_RGBA );
imageView.ResourceReadySignal().Connect( &OnResourceReadySignal );
- Stage::GetCurrent().Add( imageView );
+ application.GetScene().Add( imageView );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification(); // Send messages to update
application.Render(); // process update and render
application.SendNotification(); // Send messages to update
application.Render(); // process update and render
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( preMultipliedAlpha2, true, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
DALI_TEST_EQUALS( preMultipliedAlpha2, true, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
newActor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( newActor.GetRendererCount(), 0u, TEST_LOCATION );
newActor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( newActor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( newActor );
+ application.GetScene().Add( newActor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_CHECK( srcFactorAlpha == BlendFactor::ONE );
DALI_TEST_CHECK( destFactorAlpha == BlendFactor::ONE_MINUS_SRC_ALPHA );
DALI_TEST_CHECK( srcFactorAlpha == BlendFactor::ONE );
DALI_TEST_CHECK( destFactorAlpha == BlendFactor::ONE_MINUS_SRC_ALPHA );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
application.SendNotification();
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
drawTrace.Enable(true);
Actor actor = CreateActorWithImageVisual( propertyMap );
drawTrace.Enable(true);
Actor actor = CreateActorWithImageVisual( propertyMap );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
// Wait for image to load
application.SendNotification();
// Wait for image to load
drawTrace.Reset();
Actor actor2 = CreateActorWithImageVisual( propertyMap );
drawTrace.Reset();
Actor actor2 = CreateActorWithImageVisual( propertyMap );
- Stage::GetCurrent().Add(actor2);
+ application.GetScene().Add(actor2);
application.SendNotification(); // Send messages to update
application.Render(); // process update and render
application.SendNotification(); // Send messages to update
application.Render(); // process update and render
tet_infoline("Test that removing 1 actor doesn't delete the texture\n");
tet_infoline("Test that removing 1 actor doesn't delete the texture\n");
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline("Test that removing last actor does delete the texture\n");
tet_infoline("Test that removing last actor does delete the texture\n");
- Stage::GetCurrent().Remove( actor2 ); // Detaches remaining ImageVisual
+ application.GetScene().Remove( actor2 ); // Detaches remaining ImageVisual
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
drawTrace.Enable(true);
Actor actor = CreateActorWithImageVisual( propertyMap );
drawTrace.Enable(true);
Actor actor = CreateActorWithImageVisual( propertyMap );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
// Wait for image to load
application.SendNotification();
// Wait for image to load
propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, 100 );
propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, 100 );
Actor actor2 = CreateActorWithImageVisual( propertyMap );
propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, 100 );
propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, 100 );
Actor actor2 = CreateActorWithImageVisual( propertyMap );
- Stage::GetCurrent().Add(actor2);
+ application.GetScene().Add(actor2);
application.SendNotification();
application.SendNotification();
tet_infoline("Test that removing 1 actor deletes it's texture\n");
tet_infoline("Test that removing 1 actor deletes it's texture\n");
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline("Test that removing last actor deletes it's texture\n");
tet_infoline("Test that removing last actor deletes it's texture\n");
- Stage::GetCurrent().Remove( actor2 );
+ application.GetScene().Remove( actor2 );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// loading started
application.SendNotification();
// loading started
application.SendNotification();
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// loading started
application.SendNotification();
// loading started
application.SendNotification();
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
Dali::Toolkit::TransitionData transition = TransitionData::New( array );
Animation animation = dummyImpl.CreateTransition( transition );
Dali::Toolkit::TransitionData transition = TransitionData::New( array );
Animation animation = dummyImpl.CreateTransition( transition );
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
application.Render(0); // Ensure animation starts
application.SendNotification();
application.Render(0); // Ensure animation starts
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
drawTrace.Enable(true);
Actor actor = CreateActorWithImageVisual( propertyMap );
drawTrace.Enable(true);
Actor actor = CreateActorWithImageVisual( propertyMap );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.SendNotification();
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
application.SendNotification();
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
application.SendNotification();
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( Control::Property::BACKGROUND, visual );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( Control::Property::BACKGROUND, visual );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Create another visual with the same image
visual = factory.CreateVisual( propertyMap );
// Create another visual with the same image
visual = factory.CreateVisual( propertyMap );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
application.SendNotification();
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
application.SendNotification();
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Do not wait for any EventThreadTrigger in synchronous alpha mask.
// Do not wait for any EventThreadTrigger in synchronous alpha mask.
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
textureTrace.Reset();
DALI_TEST_EQUALS( textureTrace.FindMethod("GenTextures"), false, TEST_LOCATION );
textureTrace.Reset();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// Wait for image to load
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// 2.Remove actor from stage. In this case, renderer also is deleted.
tet_infoline( "Remove actor from stage" );
// 2.Remove actor from stage. In this case, renderer also is deleted.
tet_infoline( "Remove actor from stage" );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
application.SendNotification();
application.Render();
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
application.SendNotification();
application.Render();
// 3.Add actor in stage. In this case, renderer is created.
tet_infoline( "Add actor in stage" );
// 3.Add actor in stage. In this case, renderer is created.
tet_infoline( "Add actor in stage" );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
application.SendNotification();
application.Render();
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
application.SendNotification();
application.Render();
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
tet_infoline( "Ensure nothing triggers another load as texure already loaded" );
const unsigned int TIME_OUT_3_SECONDS = 3;
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, TIME_OUT_3_SECONDS ), false, TEST_LOCATION );
tet_infoline( "Ensure nothing triggers another load as texure already loaded" );
const unsigned int TIME_OUT_3_SECONDS = 3;
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, TIME_OUT_3_SECONDS ), false, TEST_LOCATION );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
tet_infoline( "Allow image time to load" );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
tet_infoline( "Allow image time to load" );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
tet_infoline( "Create visual with ATTACHED load policy" );
Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::ATTACHED );
tet_infoline( "Create visual with ATTACHED load policy" );
Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::ATTACHED );
tet_infoline( "Create control for visual, need to loaded it" );
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
tet_infoline( "Create control for visual, need to loaded it" );
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
// Wait for image to load
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
// Wait for image to load
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 );
dummy1.SetProperty( Actor::Property::SIZE, Vector2( 200, 200 ) );
dummy1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 );
dummy1.SetProperty( Actor::Property::SIZE, Vector2( 200, 200 ) );
dummy1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy1 );
+ application.GetScene().Add( dummy1 );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
glAbstraction.EnableEnableDisableCallTrace( true );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
glAbstraction.EnableEnableDisableCallTrace( true );
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
tet_infoline( "Create visual with IMMEDIATE load policy" );
Visual::Base imageVisual1 = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
tet_infoline( "Create visual with IMMEDIATE load policy" );
Visual::Base imageVisual1 = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
- Stage::GetCurrent().Add(actor2);
+ application.GetScene().Add(actor2);
tet_infoline( "Wait for loading thread to finish");
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
tet_infoline( "Wait for loading thread to finish");
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
layout->SetItemSize(itemSize);
Vector3 itemSize1;
layout->SetItemSize(itemSize);
Vector3 itemSize1;
- layout->GetItemSize(0u, Vector3(Stage::GetCurrent().GetSize()), itemSize1);
+ layout->GetItemSize(0u, Vector3(application.GetScene().GetSize()), itemSize1);
DALI_TEST_CHECK(itemSize == itemSize1);
DALI_TEST_CHECK(itemSize == itemSize1);
- float position = layout->GetClosestOnScreenLayoutPosition(0, 0.0f, Vector3(Stage::GetCurrent().GetSize()));
+ float position = layout->GetClosestOnScreenLayoutPosition(0, 0.0f, Vector3(application.GetScene().GetSize()));
DALI_TEST_EQUALS(position, 0.0f, TEST_LOCATION);
DALI_TEST_EQUALS(position, 0.0f, TEST_LOCATION);
DALI_TEST_EQUALS(swipSpeed, 30.0f, TEST_LOCATION );
}
}
DALI_TEST_EQUALS(swipSpeed, 30.0f, TEST_LOCATION );
}
}
- Dali::Stage stage = Dali::Stage::GetCurrent();
- Vector3 stageSize(stage.GetSize());
- view.ActivateLayout(0, stageSize, 0.5f);
- view.ActivateLayout(1, stageSize, 0.5f);
- view.ActivateLayout(2, stageSize, 0.5f);
+ Dali::Integration::Scene scene = application.GetScene();
+ Vector3 sceneSize(scene.GetSize());
+ view.ActivateLayout(0, sceneSize, 0.5f);
+ view.ActivateLayout(1, sceneSize, 0.5f);
+ view.ActivateLayout(2, sceneSize, 0.5f);
DALI_TEST_CHECK(view.GetActiveLayout() == NULL);
// Activate the depth layout
DALI_TEST_CHECK(view.GetActiveLayout() == NULL);
// Activate the depth layout
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(1, stageSize, 0.5f);
// Check the current active layout is the depth layout
view.ActivateLayout(1, stageSize, 0.5f);
// Check the current active layout is the depth layout
DALI_TEST_CHECK(view.GetActiveLayout() == NULL);
// Activate the grid layout
DALI_TEST_CHECK(view.GetActiveLayout() == NULL);
// Activate the grid layout
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
// Check the current active layout is the grid layout
view.ActivateLayout(0, stageSize, 0.5f);
// Check the current active layout is the grid layout
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
// Get the item given the item ID
view.ActivateLayout(0, stageSize, 0.5f);
// Get the item given the item ID
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
// Get the item given the item ID 2 and 3
view.ActivateLayout(0, stageSize, 0.5f);
// Get the item given the item ID 2 and 3
view.AddLayout(*depthLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*depthLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.0f);
// Check the current layout position for the 10th items is 9.0f
view.ActivateLayout(0, stageSize, 0.0f);
// Check the current layout position for the 10th items is 9.0f
view.AddLayout(*layout);
view.SetProperty( Actor::Property::SIZE, vec );
view.AddLayout(*layout);
view.SetProperty( Actor::Property::SIZE, vec );
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
layout->SetOrientation(ControlOrientation::Down);
view.ActivateLayout(0, vec, 0.0f);
layout->SetOrientation(ControlOrientation::Down);
view.ActivateLayout(0, vec, 0.0f);
- Stage::GetCurrent().Remove(view);
+ application.GetScene().Remove(view);
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.0f);
// Get the specified item where new item to be inserted before that
view.ActivateLayout(0, stageSize, 0.0f);
// Get the specified item where new item to be inserted before that
view.AddLayout(*depthLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*depthLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
unsigned int itemCount = view.GetChildCount();
view.ActivateLayout(0, stageSize, 0.5f);
unsigned int itemCount = view.GetChildCount();
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
Actor newActor = Actor::New();
view.ActivateLayout(0, stageSize, 0.5f);
Actor newActor = Actor::New();
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
ItemContainer replaceList;
view.ActivateLayout(0, stageSize, 0.5f);
ItemContainer replaceList;
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
ItemRange itemRange(0, 0);
view.ActivateLayout(0, stageSize, 0.5f);
ItemRange itemRange(0, 0);
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*spiralLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
Vector3 anchorPoint(10.0f, 10.0f, 0.0f);
view.ActivateLayout(0, stageSize, 0.5f);
Vector3 anchorPoint(10.0f, 10.0f, 0.0f);
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
view.AddLayout(*gridLayout);
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.5f);
Vector3 parentOrigin(10.0f, 10.0f, 0.0f);
view.ActivateLayout(0, stageSize, 0.5f);
Vector3 parentOrigin(10.0f, 10.0f, 0.0f);
ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::GRID );
view.AddLayout(*gridLayout);
ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::GRID );
view.AddLayout(*gridLayout);
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
// Connect the layout activated signal
view.LayoutActivatedSignal().Connect( &OnLayoutActivated );
// Connect the layout activated signal
view.LayoutActivatedSignal().Connect( &OnLayoutActivated );
application.Render();
// Activate the grid layout so that the items will be created and added to ItemView
application.Render();
// Activate the grid layout so that the items will be created and added to ItemView
- Vector3 stageSize(Dali::Stage::GetCurrent().GetSize());
+ Vector3 stageSize(application.GetScene().GetSize());
view.ActivateLayout(0, stageSize, 0.1f);
// Wait for 0.1 second
view.ActivateLayout(0, stageSize, 0.1f);
// Wait for 0.1 second
int UtcDaliItemViewOvershootVertical(void)
{
ToolkitTestApplication application;
int UtcDaliItemViewOvershootVertical(void)
{
ToolkitTestApplication application;
- Dali::Stage stage = Dali::Stage::GetCurrent();
+ Dali::Integration::Scene stage = application.GetScene();
// Create the ItemView actor
TestItemFactory factory;
// Create the ItemView actor
TestItemFactory factory;
int UtcDaliItemViewOvershootHorizontal(void)
{
ToolkitTestApplication application;
int UtcDaliItemViewOvershootHorizontal(void)
{
ToolkitTestApplication application;
- Dali::Stage stage = Dali::Stage::GetCurrent();
+ Dali::Integration::Scene stage = application.GetScene();
// Create the ItemView actor
TestItemFactory factory;
// Create the ItemView actor
TestItemFactory factory;
int UtcDaliItemEnableDisableRefresh(void)
{
ToolkitTestApplication application;
int UtcDaliItemEnableDisableRefresh(void)
{
ToolkitTestApplication application;
- Dali::Stage stage = Dali::Stage::GetCurrent();
+ Dali::Integration::Scene stage = application.GetScene();
// Create the ItemView actor
TestItemFactory factory;
// Create the ItemView actor
TestItemFactory factory;
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
int UtcDaliKeyInputFocusManagerSetFocus01(void)
{
ToolkitTestApplication application;
int UtcDaliKeyInputFocusManagerSetFocus01(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Check that there is no focused control. Set focus to control. Check it is now the focused actor and receives KeyInputFocusGained signal");
tet_infoline(" Check that there is no focused control. Set focus to control. Check it is now the focused actor and receives KeyInputFocusGained signal");
int UtcDaliKeyInputFocusManagerSetFocus02(void)
{
ToolkitTestApplication application;
int UtcDaliKeyInputFocusManagerSetFocus02(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Set focus to control. Check it is now the focused actor and receives KeyInputFocusGained signal. Set focuse to another control - check that the first control receives KeyInputFocusLost");
tet_infoline(" Set focus to control. Check it is now the focused actor and receives KeyInputFocusGained signal. Set focuse to another control - check that the first control receives KeyInputFocusLost");
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline("Test KeyEvent propagation. If focused control doesn't consume KeyEvent, KeyEvent will be recursively delivered to the control and its parents, until the event is consumed or the stage is reached. In this case, KeyEvent is delivered to KeyboardFocusManager via Stage's KeyEventSignal");
tet_infoline("Test KeyEvent propagation. If focused control doesn't consume KeyEvent, KeyEvent will be recursively delivered to the control and its parents, until the event is consumed or the stage is reached. In this case, KeyEvent is delivered to KeyboardFocusManager via Stage's KeyEventSignal");
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline("Test KeyEvent propagation. If focused control doesn't consume KeyEvent, KeyEvent will be recursively delivered to the control and its parents, until the event is consumed or the stage is reached. In this case, KeyEvent is delivered from dummy3 to dummy2");
tet_infoline("Test KeyEvent propagation. If focused control doesn't consume KeyEvent, KeyEvent will be recursively delivered to the control and its parents, until the event is consumed or the stage is reached. In this case, KeyEvent is delivered from dummy3 to dummy2");
int UtcDaliKeyInputFocusManagerGetCurrentFocusControl(void)
{
ToolkitTestApplication application;
int UtcDaliKeyInputFocusManagerGetCurrentFocusControl(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Add 2 controls, check they each get focused. Re-focus the first control - ensure it's now got focus (check signals)");
tet_infoline(" Add 2 controls, check they each get focused. Re-focus the first control - ensure it's now got focus (check signals)");
int UtcDaliKeyInputFocusManagerRemoveFocus(void)
{
ToolkitTestApplication application;
int UtcDaliKeyInputFocusManagerRemoveFocus(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Add focus controls. Test that removing focus from control which has focus. ");
tet_infoline(" Add focus controls. Test that removing focus from control which has focus. ");
{
ToolkitTestApplication application;
KeyInputFocusManager manager = KeyInputFocusManager::Get();
{
ToolkitTestApplication application;
KeyInputFocusManager manager = KeyInputFocusManager::Get();
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" UtcDaliKeyInputFocusManagerSignalKeyInputFocusChanged");
tet_infoline(" UtcDaliKeyInputFocusManagerSignalKeyInputFocusChanged");
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Create the third actor but don't add it to the stage
Actor third = Actor::New();
// Create the third actor but don't add it to the stage
Actor third = Actor::New();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
// Add the third actor to the stage
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
// Add the third actor to the stage
- Stage::GetCurrent().Add(third);
+ application.GetScene().Add(third);
// Check that it will fail to set focus on the third actor as it's not focusable
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
// Check that it will fail to set focus on the third actor as it's not focusable
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Move the focus to the right
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
// Move the focus to the right
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
// Create a 2x2 table view and try to move focus inside it
TableView tableView = TableView::New( 2, 2 );
// Create a 2x2 table view and try to move focus inside it
TableView tableView = TableView::New( 2, 2 );
- Stage::GetCurrent().Add(tableView);
+ application.GetScene().Add(tableView);
// Create the third actor
Actor third = Actor::New();
// Create the third actor
Actor third = Actor::New();
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Move the focus to the right
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
// Move the focus to the right
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
PushButton button2 = PushButton::New();
button1.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
button2.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
PushButton button2 = PushButton::New();
button1.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
button2.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(button1);
- Stage::GetCurrent().Add(button2);
+ application.GetScene().Add(button1);
+ application.GetScene().Add(button2);
// Set the focus to the button1
DALI_TEST_CHECK(manager.SetCurrentFocusActor(button1) == true);
// Set the focus to the button1
DALI_TEST_CHECK(manager.SetCurrentFocusActor(button1) == true);
// Create a 1x1 table view and try to move focus inside it
TableView tableView = TableView::New( 1, 1 );
// Create a 1x1 table view and try to move focus inside it
TableView tableView = TableView::New( 1, 1 );
- Stage::GetCurrent().Add(tableView);
+ application.GetScene().Add(tableView);
PushButton button = PushButton::New();
button.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
PushButton button = PushButton::New();
button.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Check that the focus is set on the first actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
// Check that the focus is set on the first actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
Actor parent = Actor::New();
Actor child = Actor::New();
parent.Add(child);
Actor parent = Actor::New();
Actor child = Actor::New();
parent.Add(child);
- Stage::GetCurrent().Add(parent);
+ application.GetScene().Add(parent);
// Create three actors and add them as the children of the first child actor
Actor grandChild = Actor::New();
// Create three actors and add them as the children of the first child actor
Actor grandChild = Actor::New();
// Create the first button and add it to the stage
PushButton firstPushButton = PushButton::New();
firstPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first button and add it to the stage
PushButton firstPushButton = PushButton::New();
firstPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(firstPushButton);
+ application.GetScene().Add(firstPushButton);
// Create the second button and add it to the stage
PushButton secondPushButton = PushButton::New();
secondPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second button and add it to the stage
PushButton secondPushButton = PushButton::New();
secondPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(secondPushButton);
+ application.GetScene().Add(secondPushButton);
// Check that the focus is set on the first button
DALI_TEST_CHECK(manager.SetCurrentFocusActor(firstPushButton) == true);
// Check that the focus is set on the first button
DALI_TEST_CHECK(manager.SetCurrentFocusActor(firstPushButton) == true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second actor and add it to the stage
Actor second = Actor::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Create the third actor and add it to the stage
Actor third = Actor::New();
third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the third actor and add it to the stage
Actor third = Actor::New();
third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(third);
+ application.GetScene().Add(third);
// Create the fourth actor and add it to the stage
Actor fourth = Actor::New();
fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the fourth actor and add it to the stage
Actor fourth = Actor::New();
fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(fourth);
+ application.GetScene().Add(fourth);
// Check that the focus is set on the second actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
// Check that the focus is set on the second actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
{
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
{
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
manager.SetCurrentFocusActor(actor);
}
manager.SetCurrentFocusActor(actor);
}
// Create a 2x2 table view and try to move focus inside it
TableView tableView = TableView::New( 2, 2 );
// Create a 2x2 table view and try to move focus inside it
TableView tableView = TableView::New( 2, 2 );
- Stage::GetCurrent().Add(tableView);
+ application.GetScene().Add(tableView);
// Create the first actor
Actor first = Actor::New();
// Create the first actor
Actor first = Actor::New();
// Create the first actor and add it to the stage
Control first = Control::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the first actor and add it to the stage
Control first = Control::New();
first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(first);
+ application.GetScene().Add(first);
// Create the second actor and add it to the stage
Control second = Control::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second actor and add it to the stage
Control second = Control::New();
second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
- Stage::GetCurrent().Add(second);
+ application.GetScene().Add(second);
// Move the focus to the right
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
// Move the focus to the right
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
// Create a 2x2 table view and try to move focus inside it
TableView tableView = TableView::New( 2, 2 );
// Create a 2x2 table view and try to move focus inside it
TableView tableView = TableView::New( 2, 2 );
- Stage::GetCurrent().Add(tableView);
+ application.GetScene().Add(tableView);
// Create the third actor
Control third = Control::New();
// Create the third actor
Control third = Control::New();
DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
tet_infoline( "Add actor to stage and attempt to set, our actor should be returned from KeyboardFocusManager" );
DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
tet_infoline( "Add actor to stage and attempt to set, our actor should be returned from KeyboardFocusManager" );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
manager.SetCurrentFocusActor( actor );
DALI_TEST_CHECK( manager.GetCurrentFocusActor() == actor );
manager.SetCurrentFocusActor( actor );
DALI_TEST_CHECK( manager.GetCurrentFocusActor() == actor );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
manager.SetCurrentFocusActor( actor );
// Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
manager.SetCurrentFocusActor( actor );
// Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
magnifier = Magnifier::New();
DALI_TEST_CHECK( magnifier );
magnifier = Magnifier::New();
DALI_TEST_CHECK( magnifier );
- Stage::GetCurrent().Add( magnifier );
+ application.GetScene().Add( magnifier );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Magnifier view = Magnifier::New();
stage.Add( view );
Magnifier view = Magnifier::New();
stage.Add( view );
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Magnifier view = Magnifier::New();
stage.Add( view );
Magnifier view = Magnifier::New();
stage.Add( view );
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Magnifier view = Magnifier::New();
stage.Add( view );
Magnifier view = Magnifier::New();
stage.Add( view );
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Magnifier view = Magnifier::New();
stage.Add( view );
Magnifier view = Magnifier::New();
stage.Add( view );
Magnifier view = Magnifier::New();
Magnifier view = Magnifier::New();
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * Copyright (c) 2015 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DALI_TEST_CHECK( val.Get( obj_file_name ) );
DALI_TEST_EQUALS( obj_file_name, TEST_RESOURCE_LOCATION, TEST_LOCATION );
DALI_TEST_CHECK( val.Get( obj_file_name ) );
DALI_TEST_EQUALS( obj_file_name, TEST_RESOURCE_LOCATION, TEST_LOCATION );
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
Model3dView view = Toolkit::Model3dView::New();
Model3dView view = Toolkit::Model3dView::New();
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
navigationView = NavigationView::New();
DALI_TEST_CHECK( navigationView );
navigationView = NavigationView::New();
DALI_TEST_CHECK( navigationView );
- Stage::GetCurrent().Add( navigationView );
+ application.GetScene().Add( navigationView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
// 1 Create and Add Navigation View to stage, actor count should be zero
NavigationView naviView = NavigationView::New();
// 1 Create and Add Navigation View to stage, actor count should be zero
NavigationView naviView = NavigationView::New();
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
// 1 Create Navigation View
NavigationView naviView = NavigationView::New();
// 1 Create Navigation View
NavigationView naviView = NavigationView::New();
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
// 1 Create Navigation View
NavigationView naviView = NavigationView::New();
// 1 Create Navigation View
NavigationView naviView = NavigationView::New();
{
ToolkitTestApplication application;
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
// 1 Create Navigation View
NavigationView naviView = NavigationView::New();
// 1 Create Navigation View
NavigationView naviView = NavigationView::New();
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
PageTurnView landscapeView = PageTurnLandscapeView::New( factory, VIEW_PAGE_SIZE );
DALI_TEST_CHECK( landscapeView );
PageTurnView landscapeView = PageTurnLandscapeView::New( factory, VIEW_PAGE_SIZE );
DALI_TEST_CHECK( landscapeView );
- Stage::GetCurrent().Add( landscapeView );
+ application.GetScene().Add( landscapeView );
// Test "viewPageSize" property
DALI_TEST_CHECK( landscapeView.GetPropertyIndex("viewPageSize") == PageTurnView::Property::VIEW_PAGE_SIZE );
// Test "viewPageSize" property
DALI_TEST_CHECK( landscapeView.GetPropertyIndex("viewPageSize") == PageTurnView::Property::VIEW_PAGE_SIZE );
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
TestPageFactory factory;
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
TestPageFactory factory;
- Vector2 size = Stage::GetCurrent().GetSize();
+ Vector2 size = application.GetScene().GetSize();
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
portraitView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
portraitView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( portraitView );
+ application.GetScene().Add( portraitView );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
*/
TestPageFactory factory;
*/
TestPageFactory factory;
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
PageTurnView landscapeView = PageTurnLandscapeView::New( factory, Vector2(stageSize.x*0.5f, stageSize.x*0.8f) );
landscapeView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
PageTurnView landscapeView = PageTurnLandscapeView::New( factory, Vector2(stageSize.x*0.5f, stageSize.x*0.8f) );
landscapeView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( landscapeView );
+ application.GetScene().Add( landscapeView );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
TestPageFactory factory( false /* returns empty handles */ );
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
TestPageFactory factory( false /* returns empty handles */ );
- Vector2 size = Stage::GetCurrent().GetSize();
+ Vector2 size = application.GetScene().GetSize();
try
{
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
portraitView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
try
{
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
portraitView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( portraitView );
+ application.GetScene().Add( portraitView );
// Create the Popup actor
Popup popup = Popup::New();
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
// Create the Popup actor
Popup popup = Popup::New();
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
popup.SetDisplayState( Popup::SHOWN );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
popup.SetDisplayState( Popup::SHOWN );
// Create the Popup actor
Popup popup = Popup::New();
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
popup.SetDisplayState( Popup::SHOWN );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
popup.SetDisplayState( Popup::SHOWN );
// Create the Popup actor
Popup popup = Popup::New();
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Popup::Property::TAIL_VISIBILITY, false );
popup.SetDisplayState( Popup::SHOWN );
popup.SetProperty( Popup::Property::TAIL_VISIBILITY, false );
popup.SetDisplayState( Popup::SHOWN );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
popup.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
popup.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.OutsideTouchedSignal().Connect( &OnPopupTouchedOutside );
popup.SetDisplayState( Popup::SHOWN );
popup.OutsideTouchedSignal().Connect( &OnPopupTouchedOutside );
popup.SetDisplayState( Popup::SHOWN );
DALI_TEST_CHECK( popup.GetProperty( Popup::Property::AUTO_HIDE_DELAY ).Get( getAutoHideDelay ) );
DALI_TEST_EQUALS( getAutoHideDelay, 200, TEST_LOCATION );
DALI_TEST_CHECK( popup.GetProperty( Popup::Property::AUTO_HIDE_DELAY ).Get( getAutoHideDelay ) );
DALI_TEST_EQUALS( getAutoHideDelay, 200, TEST_LOCATION );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
DALI_TEST_EQUALS( gPopupState, Popup::HIDDEN, TEST_LOCATION );
DALI_TEST_EQUALS( gPopupState, Popup::HIDDEN, TEST_LOCATION );
Popup popup = Popup::New();
ConnectStateSignals( popup );
popup.SetTitle( TextLabel::New( "Title" ) );
Popup popup = Popup::New();
ConnectStateSignals( popup );
popup.SetTitle( TextLabel::New( "Title" ) );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
std::string animationModes[] = { "NONE", "ZOOM", "FADE", "CUSTOM" };
std::string animationModes[] = { "NONE", "ZOOM", "FADE", "CUSTOM" };
placement.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
placement.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
placement.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
placement.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
placement.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
placement.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( placement );
+ application.GetScene().Add( placement );
// Create the Popup actor
Popup popup = Popup::New();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
// Create the Popup actor
Popup popup = Popup::New();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
Actor backing = popup.FindChildByName( "popupBacking" );
DALI_TEST_CHECK( backing );
Actor backing = popup.FindChildByName( "popupBacking" );
DALI_TEST_CHECK( backing );
// Create the Popup actor
Popup popup = Popup::New();
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
// Check setting an image
popup.SetProperty( Toolkit::Popup::Property::POPUP_BACKGROUND_IMAGE, "invalid-image.png" );
// Check setting an image
popup.SetProperty( Toolkit::Popup::Property::POPUP_BACKGROUND_IMAGE, "invalid-image.png" );
DALI_TEST_CHECK( popup.GetProperty( Toolkit::Popup::Property::EXIT_ANIMATION ).Get( resultMap ) );
DALI_TEST_EQUALS( resultMap.Count(), 0u, TEST_LOCATION );
DALI_TEST_CHECK( popup.GetProperty( Toolkit::Popup::Property::EXIT_ANIMATION ).Get( resultMap ) );
DALI_TEST_EQUALS( resultMap.Count(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Popup::SHOWN );
for( int i = 0; i < RENDER_ANIMATION_TEST_DURATION_FRAMES; i++ )
popup.SetDisplayState( Popup::SHOWN );
for( int i = 0; i < RENDER_ANIMATION_TEST_DURATION_FRAMES; i++ )
button.ClickedSignal().Connect( &PushButtonClicked );
button.ClickedSignal().Connect( &PushButtonClicked );
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
DALI_TEST_CHECK( popup.GetProperty( Popup::Property::TAIL_POSITION ).Get( vectorResult ) );
DALI_TEST_EQUALS( vectorResult, tailPosition, TEST_LOCATION );
DALI_TEST_CHECK( popup.GetProperty( Popup::Property::TAIL_POSITION ).Get( vectorResult ) );
DALI_TEST_EQUALS( vectorResult, tailPosition, TEST_LOCATION );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 1.0f );
popup.SetTitle( Toolkit::TextLabel::New( "This is a Toast Popup.\nIt will auto-hide itself" ) );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 1.0f );
popup.SetTitle( Toolkit::TextLabel::New( "This is a Toast Popup.\nIt will auto-hide itself" ) );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Toolkit::Popup::SHOWN );
for( int i = 0; i < RENDER_ANIMATION_TEST_DURATION_FRAMES; i++ )
popup.SetDisplayState( Toolkit::Popup::SHOWN );
for( int i = 0; i < RENDER_ANIMATION_TEST_DURATION_FRAMES; i++ )
ConnectStateSignals( popup );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
ConnectStateSignals( popup );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Toolkit::Popup::SHOWN );
application.SendNotification();
popup.SetDisplayState( Toolkit::Popup::SHOWN );
application.SendNotification();
// Create the Popup actor
Popup popup = Popup::New();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
// Create the Popup actor
Popup popup = Popup::New();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Create the ProgressBar actor
ProgressBar progressBar = ProgressBar::New();
// Create the ProgressBar actor
ProgressBar progressBar = ProgressBar::New();
- Stage::GetCurrent().Add( progressBar );
+ application.GetScene().Add( progressBar );
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ progressBar.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, 20.0f ) );
progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
ProgressBar progressBar = ProgressBar::New();
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
ProgressBar progressBar = ProgressBar::New();
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ progressBar.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, 20.0f ) );
progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
- Stage::GetCurrent().Add(progressBar);
+ application.GetScene().Add(progressBar);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
ProgressBar progressBar = ProgressBar::New();
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
ProgressBar progressBar = ProgressBar::New();
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ progressBar.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, 20.0f ) );
progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
- Stage::GetCurrent().Add(progressBar);
+ application.GetScene().Add(progressBar);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, 0.3f);
progressBar.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, 0.3f);
progressBar.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
- Stage::GetCurrent().Add(progressBar);
+ progressBar.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, 20.0f ) );
+ application.GetScene().Add(progressBar);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
ProgressBar progressBar = ProgressBar::New();
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT);
ProgressBar progressBar = ProgressBar::New();
progressBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
progressBar.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT);
- progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y ) );
- Stage::GetCurrent().Add( progressBar );
+ progressBar.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, application.GetScene().GetSize().y ) );
+ application.GetScene().Add( progressBar );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
pushButton.SetProperty( Toolkit::DevelButton::Property::LABEL_RELATIVE_ALIGNMENT, "BEGIN" );
pushButton.SetProperty( Toolkit::DevelButton::Property::LABEL_RELATIVE_ALIGNMENT, "BEGIN" );
pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
// Add a label and get size of control
pushButton.SetProperty( Toolkit::Button::Property::LABEL, "Label" );
// Add a label and get size of control
pushButton.SetProperty( Toolkit::Button::Property::LABEL, "Label" );
PushButton pushButton = PushButton::New();
pushButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ) );
PushButton pushButton = PushButton::New();
pushButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ) );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
Property::Map propertyMap;
propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
tet_printf("Remove button from stage\n" );
tet_printf("Remove button from stage\n" );
- Stage::GetCurrent().Remove( pushButton );
+ application.GetScene().Remove( pushButton );
rendererCount = pushButton.GetRendererCount();
tet_printf("After removing pushbutton from stage the renderer count is(%d)\n ", rendererCount );
rendererCount = pushButton.GetRendererCount();
tet_printf("After removing pushbutton from stage the renderer count is(%d)\n ", rendererCount );
tet_printf("Added UNSELECTED_VISUAL and add button back to Stage\n");
tet_printf("Added UNSELECTED_VISUAL and add button back to Stage\n");
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
tet_printf("With UNSELECTED_BACKGROUND_VISUAL and UNSELECTED_VISUAL the renderer count is(%d)\n", pushButton.GetRendererCount() );
tet_printf("With UNSELECTED_BACKGROUND_VISUAL and UNSELECTED_VISUAL the renderer count is(%d)\n", pushButton.GetRendererCount() );
pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
tet_printf("RendererCount prior to adding visual(%d)\n",preRendererCount);
DALI_TEST_EQUALS( preRendererCount, 0, TEST_LOCATION );
tet_printf("RendererCount prior to adding visual(%d)\n",preRendererCount);
DALI_TEST_EQUALS( preRendererCount, 0, TEST_LOCATION );
- Stage::GetCurrent().Remove( pushButton );
+ application.GetScene().Remove( pushButton );
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
colorMap.Insert(BorderVisual::Property::SIZE, 5.f);
pushButton.SetProperty( Toolkit::Button::Property::UNSELECTED_VISUAL, colorMap );
colorMap.Insert(BorderVisual::Property::SIZE, 5.f);
pushButton.SetProperty( Toolkit::Button::Property::UNSELECTED_VISUAL, colorMap );
- Stage::GetCurrent().Add( pushButton );
+ application.GetScene().Add( pushButton );
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
SetupButtonForTestTouchEvents( application, button, true );
SetupButtonForTestTouchEvents( application, button, true );
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Create the RadioButton actor
RadioButton radioButton = RadioButton::New();
// Create the RadioButton actor
RadioButton radioButton = RadioButton::New();
- Stage::GetCurrent().Add( radioButton );
+ application.GetScene().Add( radioButton );
radioButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
radioButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
radioButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
radioButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
radioButton3.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 40.0f ));
Actor radioGroup = Actor::New();
radioButton3.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 40.0f ));
Actor radioGroup = Actor::New();
- Stage::GetCurrent().Add( radioGroup );
+ application.GetScene().Add( radioGroup );
radioGroup.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
radioGroup.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioGroup.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
radioGroup.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
radioGroup.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioGroup.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Create another source actor
Actor newSourceActor = Actor::New();
// Create another source actor
Actor newSourceActor = Actor::New();
- Stage::GetCurrent().Add( newSourceActor );
+ application.GetScene().Add( newSourceActor );
// Register the scroll properties
Property::Index newPropertyScrollPosition = newSourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index newPropertyScrollPosition = newSourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect to the ScrollPositionIntervalReached signal
scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
// Connect to the ScrollPositionIntervalReached signal
scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
scrollBar.SetIndicatorFixedHeight(50.0f);
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
scrollBar.SetIndicatorFixedHeight(50.0f);
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect the pan finished signal
ConnectionTracker connectionTracker;
// Connect the pan finished signal
ConnectionTracker connectionTracker;
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
scrollBar.SetIndicatorFixedHeight(50.0f);
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
scrollBar.SetIndicatorFixedHeight(50.0f);
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect the pan finished signal
ConnectionTracker connectionTracker;
// Connect the pan finished signal
ConnectionTracker connectionTracker;
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
ConnectionTracker connectionTracker;
// Connect to the ScrollPositionIntervalReached signal
ConnectionTracker connectionTracker;
// Connect to the ScrollPositionIntervalReached signal
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect to the ScrollPositionIntervalReached signal
scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
// Connect to the ScrollPositionIntervalReached signal
scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Create the ScrollView actor
ScrollView scrollView = ScrollView::New();
// Create the ScrollView actor
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
const Vector2 target = Vector2(100.0f, 200.0f);
const Vector2 target2 = Vector2(300.0f, 100.0f);
const Vector2 target = Vector2(100.0f, 200.0f);
const Vector2 target2 = Vector2(300.0f, 100.0f);
tet_infoline(" UtcDaliToolkitScrollViewScrollToPositionWithDirectionBiasP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewScrollToPositionWithDirectionBiasP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 200.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 200.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
// Create the ScrollView actor
ScrollView scrollView = ScrollView::New();
// Create the ScrollView actor
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
const Vector2 target = Vector2(100.0f, 200.0f);
const Vector2 target2 = Vector2(300.0f, 100.0f);
const Vector2 target = Vector2(100.0f, 200.0f);
const Vector2 target2 = Vector2(300.0f, 100.0f);
tet_infoline(" UtcDaliToolkitScrollViewScrollToPositionWithAlphaFunctionAndDirectionBiasP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewScrollToPositionWithAlphaFunctionAndDirectionBiasP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 200.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 200.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
tet_infoline(" UtcDaliToolkitScrollViewScrollToPageP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewScrollToPageP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
// Set up a gesture to perform.
Vector2 startPos( 50.0f, 0.0f );
// Set up a gesture to perform.
Vector2 startPos( 50.0f, 0.0f );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
// Set up a gesture to perform.
Vector2 startPos( 0.0f, 50.0f );
// Set up a gesture to perform.
Vector2 startPos( 0.0f, 50.0f );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
// Set up a gesture to perform.
Vector2 startPos( 0.0f, 50.0f );
// Set up a gesture to perform.
Vector2 startPos( 0.0f, 50.0f );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
Vector2 START_POSITION = Vector2(10.0f, 10.0f);
Vector2 START_POSITION = Vector2(10.0f, 10.0f);
tet_infoline(" UtcDaliToolkitScrollViewScrollToPageWithDirectionBiasP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewScrollToPageWithDirectionBiasP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 200.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 200.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
tet_infoline(" UtcDaliToolkitScrollViewScrollToActorP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewScrollToActorP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
Actor actorA = Actor::New();
const Vector3 positionA = Vector3(100.0f, 400.0f, 0.0f);
Actor actorA = Actor::New();
const Vector3 positionA = Vector3(100.0f, 400.0f, 0.0f);
tet_infoline(" UtcDaliToolkitScrollViewScrollToSnapPointP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewScrollToSnapPointP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
tet_infoline(" UtcDaliToolkitScrollViewSetWrapModeP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewSetWrapModeP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
Actor actor = Actor::New();
scrollView.Add( actor );
Actor actor = Actor::New();
scrollView.Add( actor );
tet_infoline(" UtcDaliToolkitScrollViewActorAutoSnap");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewActorAutoSnap");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
gOnScrollCompleteCalled = false;
ScrollView scrollView = ScrollView::New();
gOnScrollCompleteCalled = false;
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
gOnScrollCompleteCalled = false;
ScrollView scrollView = ScrollView::New();
gOnScrollCompleteCalled = false;
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
gOnScrollCompleteCalled = false;
ScrollView scrollView = ScrollView::New();
gOnScrollCompleteCalled = false;
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
DALI_TEST_CHECK(scrollUpdated);
DALI_TEST_CHECK(scrollCompleted);
DALI_TEST_CHECK(scrollUpdated);
DALI_TEST_CHECK(scrollCompleted);
- Stage::GetCurrent().Remove( scrollView );
+ application.GetScene().Remove( scrollView );
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
scrollView.SetOvershootEnabled(true);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
scrollView.SetOvershootEnabled(true);
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, overshootSize );
DALI_TEST_EQUALS( scrollView.GetProperty(Scrollable::Property::OVERSHOOT_SIZE).Get<Vector2>(), overshootSize, TEST_LOCATION );
scrollView.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, overshootSize );
DALI_TEST_EQUALS( scrollView.GetProperty(Scrollable::Property::OVERSHOOT_SIZE).Get<Vector2>(), overshootSize, TEST_LOCATION );
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
tet_infoline(" UtcDaliToolkitScrollViewGetCurrentPageP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewGetCurrentPageP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
RulerPtr rulerY = new FixedRuler( 100.0f );
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
tet_infoline(" UtcDaliToolkitScrollViewSetRulerXP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewSetRulerXP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
RulerPtr rulerX = new FixedRuler( 100.0f );
rulerX->SetDomain( RulerDomain(0.0f, 800.0f, true) );
tet_infoline(" UtcDaliToolkitScrollViewSetRulerYP");
ScrollView scrollView = ScrollView::New();
tet_infoline(" UtcDaliToolkitScrollViewSetRulerYP");
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
RulerPtr rulerY = new FixedRuler( 200.0f );
rulerY->SetDomain( RulerDomain(0.0f, 400.0f, true) );
RulerPtr rulerY = new FixedRuler( 200.0f );
rulerY->SetDomain( RulerDomain(0.0f, 400.0f, true) );
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- Stage::GetCurrent().Add( scrollView );
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ application.GetScene().Add( scrollView );
+ Vector2 stageSize = application.GetScene().GetSize();
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
scrollView.SetWrapMode( false );
scrollView.SetScrollSensitive( true );
- Stage::GetCurrent().Add( scrollView );
+ application.GetScene().Add( scrollView );
// Set up a gesture to perform.
Vector2 startPos( 50.0f, 0.0f );
// Set up a gesture to perform.
Vector2 startPos( 50.0f, 0.0f );
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
gOnScrollCompleteCalled = true;
}
gOnScrollCompleteCalled = true;
}
-ScrollView SetupTestScrollView(int rows, int columns, Vector2 size)
+ScrollView SetupTestScrollView(Integration::Scene scene, int rows, int columns, Vector2 size)
scrollView.ScrollStartedSignal().Connect( &OnScrollStart );
scrollView.ScrollUpdatedSignal().Connect( &OnScrollUpdate );
scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete );
scrollView.ScrollStartedSignal().Connect( &OnScrollStart );
scrollView.ScrollUpdatedSignal().Connect( &OnScrollUpdate );
scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete );
- Stage::GetCurrent().Add( scrollView );
+ scene.Add( scrollView );
RulerPtr rulerX = CreateRuler(size.width);
RulerPtr rulerY = CreateRuler(size.height);
if(columns > 1)
RulerPtr rulerX = CreateRuler(size.width);
RulerPtr rulerY = CreateRuler(size.height);
if(columns > 1)
scrollView.SetRulerX( rulerX );
scrollView.SetRulerY( rulerY );
scrollView.SetRulerX( rulerX );
scrollView.SetRulerY( rulerY );
- Stage::GetCurrent().Add( scrollView );
+ scene.Add( scrollView );
Actor container = Actor::New();
container.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Actor container = Actor::New();
container.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
ToolkitTestApplication application;
tet_infoline(" UtcDaliScrollViewPagePathEffectTest");
ToolkitTestApplication application;
tet_infoline(" UtcDaliScrollViewPagePathEffectTest");
- Vector2 size = Stage::GetCurrent().GetSize();
+ Vector2 size = application.GetScene().GetSize();
- ScrollView scrollView = SetupTestScrollView(1, 3, size);
+ ScrollView scrollView = SetupTestScrollView(application.GetScene(), 1, 3, size);
Actor testPage = gPages[2];
Wait(application, 500);
Actor testPage = gPages[2];
Wait(application, 500);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
Toolkit::ShadowView view = Toolkit::ShadowView::New();
DALI_TEST_CHECK( view );
Toolkit::ShadowView view = Toolkit::ShadowView::New();
DALI_TEST_CHECK( view );
- RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize());
- Stage::GetCurrent().Add(view);
+ application.GetScene().Add(view);
- RenderTaskList taskList2 = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList2 = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
view.Deactivate();
DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() );
view.Deactivate();
- RenderTaskList taskList3 = Stage::GetCurrent().GetRenderTaskList();
+ RenderTaskList taskList3 = application.GetScene().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList3.GetTaskCount() );
END_TEST;
}
DALI_TEST_CHECK( 1u == taskList3.GetTaskCount() );
END_TEST;
}
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Create the Popup actor
Slider slider = Slider::New();
// Create the Popup actor
Slider slider = Slider::New();
- Stage::GetCurrent().Add( slider );
+ application.GetScene().Add( slider );
slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ slider.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, 20.0f ) );
slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
const float MIN_BOUND = 0.0f;
slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
const float MIN_BOUND = 0.0f;
// Create the Popup actor
Slider slider = Slider::New();
// Create the Popup actor
Slider slider = Slider::New();
- Stage::GetCurrent().Add( slider );
+ application.GetScene().Add( slider );
slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ slider.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, 20.0f ) );
slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
const float MIN_BOUND = 0.0f;
slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
const float MIN_BOUND = 0.0f;
Slider slider = Slider::New();
slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
Slider slider = Slider::New();
slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ slider.SetProperty( Actor::Property::SIZE, Vector2( application.GetScene().GetSize().x, 20.0f ) );
slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
- Stage::GetCurrent().Add(slider);
+ application.GetScene().Add(slider);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * Copyright (c) 2016 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 );
blurView.SetTexture( inputTexture );
// start multiple guassian blur call, each guassian blur creates two render tasks
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 );
blurView.SetTexture( inputTexture );
// start multiple guassian blur call, each guassian blur creates two render tasks
- DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
+ DALI_TEST_CHECK( application.GetScene().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
{
// create renderers for the original image and each blurred image
{
// create renderers for the original image and each blurred image
- Stage::GetCurrent().Add( blurView );
+ application.GetScene().Add( blurView );
Wait(application);
DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
Wait(application);
Wait(application);
DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
Wait(application);
- Stage::GetCurrent().Remove( blurView );
+ application.GetScene().Remove( blurView );
int UtcDaliSuperBlurViewSetTexture2(void)
{
ToolkitTestApplication application;
int UtcDaliSuperBlurViewSetTexture2(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" UtcDaliSuperBlurViewSetTexture2 - test setting a second texture ");
tet_infoline(" UtcDaliSuperBlurViewSetTexture2 - test setting a second texture ");
blurView.SetTexture( inputTexture );
// start multiple guassian blur call, each guassian blur creates two render tasks
blurView.SetTexture( inputTexture );
// start multiple guassian blur call, each guassian blur creates two render tasks
- DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
+ DALI_TEST_CHECK( application.GetScene().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
{
// create renderers for the original image and each blurred image
stage.Add( blurView );
{
// create renderers for the original image and each blurred image
stage.Add( blurView );
Wait(application, 1000);
tet_infoline("Remove from stage");
Wait(application, 1000);
tet_infoline("Remove from stage");
- Stage::GetCurrent().Remove( blurView );
+ application.GetScene().Remove( blurView );
}
tet_infoline("Test that there are no render tasks remaining");
}
tet_infoline("Test that there are no render tasks remaining");
Texture inputTexture2 = CreateSolidColorTexture( application, Color::CYAN, 50, 50 );
blurView.SetTexture( inputTexture2 );
// start multiple guassian blur call, each guassian blur creates two render tasks
Texture inputTexture2 = CreateSolidColorTexture( application, Color::CYAN, 50, 50 );
blurView.SetTexture( inputTexture2 );
// start multiple guassian blur call, each guassian blur creates two render tasks
- DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
+ DALI_TEST_CHECK( application.GetScene().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
{
// create renderers for the original image and each blurred image
{
// create renderers for the original image and each blurred image
- Stage::GetCurrent().Add( blurView );
+ application.GetScene().Add( blurView );
Wait(application);
DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
Wait(application);
DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
Wait(application, 1000);
tet_infoline("Remove from stage");
Wait(application, 1000);
tet_infoline("Remove from stage");
- Stage::GetCurrent().Remove( blurView );
+ application.GetScene().Remove( blurView );
}
tet_infoline("Test that there are no render tasks remaining");
}
tet_infoline("Test that there are no render tasks remaining");
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
// create renderers for the original image and each blurred image
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
// create renderers for the original image and each blurred image
- Stage::GetCurrent().Add( blurView );
+ application.GetScene().Add( blurView );
blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
// Will create ResourceImage
blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
// Will create ResourceImage
// start multiple guassian blur call, each guassian blur creates two render tasks
// start multiple guassian blur call, each guassian blur creates two render tasks
- unsigned int count = Stage::GetCurrent().GetRenderTaskList().GetTaskCount();
+ unsigned int count = application.GetScene().GetRenderTaskList().GetTaskCount();
DALI_TEST_CHECK( count == 1+BLUR_LEVELS*2 );
Wait(application);
DALI_TEST_CHECK( count == 1+BLUR_LEVELS*2 );
Wait(application);
Wait(application);
// create renderers for the original image and each blurred image
Wait(application);
// create renderers for the original image and each blurred image
- Stage::GetCurrent().Add( blurView );
+ application.GetScene().Add( blurView );
std::string imageUrl = blurView.GetProperty<std::string>( SuperBlurView::Property::IMAGE_URL );
DALI_TEST_EQUALS( imageUrl, TEST_IMAGE_FILE_NAME, TEST_LOCATION );
std::string imageUrl = blurView.GetProperty<std::string>( SuperBlurView::Property::IMAGE_URL );
DALI_TEST_EQUALS( imageUrl, TEST_IMAGE_FILE_NAME, TEST_LOCATION );
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 );
blurView.SetTexture( inputTexture );
// start multiple guassian blur call, each guassian blur creates two render tasks
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 );
blurView.SetTexture( inputTexture );
// start multiple guassian blur call, each guassian blur creates two render tasks
- DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
+ DALI_TEST_CHECK( application.GetScene().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
SignalHandler signalHandler;
blurView.BlurFinishedSignal().Connect(&signalHandler, &SignalHandler::Callback);
// create renderers for the original image and each blurred image
SignalHandler signalHandler;
blurView.BlurFinishedSignal().Connect(&signalHandler, &SignalHandler::Callback);
// create renderers for the original image and each blurred image
- Stage::GetCurrent().Add( blurView );
+ application.GetScene().Add( blurView );
Wait(application, 1000);
DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
Wait(application, 1000);
DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
};
// Convenience function to quickly set up a 10x10 table with each cell being 10x10 pixels in size by default.
};
// Convenience function to quickly set up a 10x10 table with each cell being 10x10 pixels in size by default.
-static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor& actor2, Actor& actor3)
+static void SetupTableViewAndActors(Integration::Scene scene, TableView& tableView, Actor& actor1, Actor& actor2, Actor& actor3)
{
tableView = TableView::New( 10, 10 ); // 10 by 10 grid.
DALI_TEST_CHECK( tableView );
{
tableView = TableView::New( 10, 10 ); // 10 by 10 grid.
DALI_TEST_CHECK( tableView );
- Stage::GetCurrent().Add( tableView );
+ scene.Add( tableView );
tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
actor1 = Actor::New();
tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
actor1 = Actor::New();
Actor actor2;
Actor actor3;
Actor actor2;
Actor actor3;
- SetupTableViewAndActors(tableView, actor1, actor2, actor3);
+ SetupTableViewAndActors(application.GetScene(), tableView, actor1, actor2, actor3);
// 1. check that padding works. no padding:
tableView.SetCellPadding(Size(0.0f, 0.0f));
// 1. check that padding works. no padding:
tableView.SetCellPadding(Size(0.0f, 0.0f));
Actor actor2;
Actor actor3;
Actor actor2;
Actor actor3;
- SetupTableViewAndActors(tableView, actor1, actor2, actor3);
+ SetupTableViewAndActors(application.GetScene(), tableView, actor1, actor2, actor3);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Actor actor2;
Actor actor3;
Actor actor2;
Actor actor3;
- SetupTableViewAndActors(tableView, actor1, actor2, actor3);
+ SetupTableViewAndActors(application.GetScene(), tableView, actor1, actor2, actor3);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
Actor actor2;
Actor actor3;
Actor actor2;
Actor actor3;
- SetupTableViewAndActors(tableView, actor1, actor2, actor3);
+ SetupTableViewAndActors(application.GetScene(), tableView, actor1, actor2, actor3);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
// Create a 10x10 table-view
TableView tableView = TableView::New(10,10);
// Create a 10x10 table-view
TableView tableView = TableView::New(10,10);
- Stage::GetCurrent().Add( tableView );
+ application.GetScene().Add( tableView );
tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
DALI_TEST_CHECK( tableView );
tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
DALI_TEST_CHECK( tableView );
- Stage::GetCurrent().Add( tableView );
+ application.GetScene().Add( tableView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- Stage::GetCurrent().Add( tableView );
+ application.GetScene().Add( tableView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline(" UtcDaliToolkitTextEditorSetPropertyP");
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
tet_infoline(" UtcDaliToolkitTextEditorSetPropertyP");
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
// Note - we can't check the defaults since the stylesheets are platform-specific
// Note - we can't check the defaults since the stylesheets are platform-specific
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
// connect to the text changed signal.
ConnectionTracker* testTracker = new ConnectionTracker();
// connect to the text changed signal.
ConnectionTracker* testTracker = new ConnectionTracker();
bool inputStyleChangedSignal = false;
editor.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
bool inputStyleChangedSignal = false;
editor.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
bool inputStyleChangedSignal = false;
editor.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
bool inputStyleChangedSignal = false;
editor.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
editor2.SetProperty( Actor::Property::POSITION, Vector2( 100.f, 100.f ));
editor2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
editor2.SetProperty( Actor::Property::POSITION, Vector2( 100.f, 100.f ));
- Stage::GetCurrent().Add( editor2 );
+ application.GetScene().Add( editor2 );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
DALI_TEST_CHECK( editor );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::TEXT, "This is a long text for the size of the text-editor." );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::TEXT, "This is a long text for the size of the text-editor." );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::TEXT, "DALi" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::TEXT, "DALi" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::TEXT, "This is a long text for the size of the text-editor." );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( TextEditor::Property::TEXT, "This is a long text for the size of the text-editor." );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
std::string underlineSettings1( "{\"enable\":\"true\",\"color\":\"red\",\"height\":\"1\"}" );
std::string underlineSettings1( "{\"enable\":\"true\",\"color\":\"red\",\"height\":\"1\"}" );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::UNDERLINE, underlineSettings1 );
DALI_TEST_EQUALS( editor.GetProperty<std::string>( TextEditor::Property::UNDERLINE ), underlineSettings1, TEST_LOCATION );
editor.SetProperty( TextEditor::Property::UNDERLINE, underlineSettings1 );
DALI_TEST_EQUALS( editor.GetProperty<std::string>( TextEditor::Property::UNDERLINE ), underlineSettings1, TEST_LOCATION );
std::string shadowSettings( "{\"color\":\"green\",\"offset\":\"2 2\",\"blurRadius\":\"0\"}" );
std::string shadowSettings( "{\"color\":\"green\",\"offset\":\"2 2\",\"blurRadius\":\"0\"}" );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::SHADOW, "{\"color\":\"green\",\"offset\":\"2 2\",\"blurRadius\":\"0\"}" );
editor.SetProperty( TextEditor::Property::SHADOW, "{\"color\":\"green\",\"offset\":\"2 2\",\"blurRadius\":\"0\"}" );
std::string fontStyleSettings( "{\"weight\":\"bold\",\"width\":\"condensed\",\"slant\":\"italic\"}" );
std::string fontStyleSettings( "{\"weight\":\"bold\",\"width\":\"condensed\",\"slant\":\"italic\"}" );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::FONT_STYLE, "{\"weight\":\"bold\",\"width\":\"condensed\",\"slant\":\"italic\"}" );
editor.SetProperty( TextEditor::Property::FONT_STYLE, "{\"weight\":\"bold\",\"width\":\"condensed\",\"slant\":\"italic\"}" );
editor.SetProperty( TextEditor::Property::TEXT,
"TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST ");
editor.SetProperty( TextEditor::Property::TEXT,
"TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST ");
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 50.f ) );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 50.f ) );
editor.SetProperty( Actor::Property::SIZE, Vector2( 150.0f, 300.f ) );
editor.SetProperty( TextEditor::Property::TEXT, "Hello world Hello world" );
editor.SetProperty( Actor::Property::SIZE, Vector2( 150.0f, 300.f ) );
editor.SetProperty( TextEditor::Property::TEXT, "Hello world Hello world" );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
editor.SetProperty( TextEditor::Property::LINE_WRAP_MODE, "WORD" );
DALI_TEST_EQUALS( editor.GetProperty< int >( TextEditor::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
editor.SetProperty( TextEditor::Property::LINE_WRAP_MODE, "WORD" );
DALI_TEST_EQUALS( editor.GetProperty< int >( TextEditor::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( editor );
+ application.GetScene().Add( editor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline(" UtcDaliToolkitTextFieldSetPropertyP");
TextField field = TextField::New();
DALI_TEST_CHECK( field );
tet_infoline(" UtcDaliToolkitTextFieldSetPropertyP");
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
// Note - we can't check the defaults since the stylesheets are platform-specific
// Note - we can't check the defaults since the stylesheets are platform-specific
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
// connect to the text changed signal.
ConnectionTracker* testTracker = new ConnectionTracker();
// connect to the text changed signal.
ConnectionTracker* testTracker = new ConnectionTracker();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
// connect to the text changed signal.
ConnectionTracker* testTracker = new ConnectionTracker();
// connect to the text changed signal.
ConnectionTracker* testTracker = new ConnectionTracker();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
const int maxNumberOfCharacters = 1;
field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
const int maxNumberOfCharacters = 1;
field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
const int maxNumberOfCharacters = 3;
field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
const int maxNumberOfCharacters = 3;
field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
bool inputStyleChangedSignal = false;
field.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
bool inputStyleChangedSignal = false;
field.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
bool inputStyleChangedSignal = false;
field.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
bool inputStyleChangedSignal = false;
field.ConnectSignal( testTracker, "inputStyleChanged", CallbackFunctor(&inputStyleChangedSignal) );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
field2.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
field2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
field2.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
- Stage::GetCurrent().Add( field2 );
+ application.GetScene().Add( field2 );
// Render and notify
application.SendNotification();
// Render and notify
application.SendNotification();
DALI_TEST_CHECK( field );
LoadMarkerImages(application, field);
DALI_TEST_CHECK( field );
LoadMarkerImages(application, field);
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Layer layer = stage.GetRootLayer();
Actor actor = layer.FindChildByName("optionPaste");
Layer layer = stage.GetRootLayer();
Actor actor = layer.FindChildByName("optionPaste");
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
LoadMarkerImages(application, field);
// Render and notify
application.SendNotification();
// Checks some special keys when the text is selected.
TextField field = TextField::New();
DALI_TEST_CHECK( field );
// Checks some special keys when the text is selected.
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
float previousHeight = 0.0f;
float currentHeight = 0.0f;
float previousHeight = 0.0f;
float currentHeight = 0.0f;
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
tet_infoline("UtcDaliTextFieldFontStylePorpertyCoverage");
TextField field = TextField::New();
DALI_TEST_CHECK( field );
tet_infoline("UtcDaliTextFieldFontStylePorpertyCoverage");
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
Property::Map fontStyleMapGet;
Property::Map fontStyleMapGet;
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
// Check the placeholder property with pixel size
Property::Map placeholderPixelSizeMapSet;
// Check the placeholder property with pixel size
Property::Map placeholderPixelSizeMapSet;
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
+ application.GetScene().Add( field );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
TextField textField = TextField::New();
TextField textField = TextField::New();
- Stage::GetCurrent().Add( textField );
+ application.GetScene().Add( textField );
textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
TextField textField = TextField::New();
TextField textField = TextField::New();
- Stage::GetCurrent().Add( textField );
+ application.GetScene().Add( textField );
textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Note - we can't check the defaults since the stylesheets are platform-specific
label.SetProperty( DevelTextLabel::Property::RENDERING_BACKEND, DevelText::RENDERING_SHARED_ATLAS );
// Note - we can't check the defaults since the stylesheets are platform-specific
label.SetProperty( DevelTextLabel::Property::RENDERING_BACKEND, DevelText::RENDERING_SHARED_ATLAS );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Turn on all the effects
label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
// Turn on all the effects
label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
const std::string scripts( " привет мир, γειά σου Κόσμε, Hello world, مرحبا بالعالم, שלום עולם, "
"բարեւ աշխարհը, მსოფლიოში, 안녕하세요, 你好世界, ひらがな, カタカナ, "
const std::string scripts( " привет мир, γειά σου Κόσμε, Hello world, مرحبا بالعالم, שלום עולם, "
"բարեւ աշխարհը, მსოფლიოში, 안녕하세요, 你好世界, ひらがな, カタカナ, "
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
DALI_TEST_CHECK( labelFinished );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
DALI_TEST_CHECK( labelFinished );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelImmediate );
+ application.GetScene().Add( labelImmediate );
// Turn on all the effects
labelImmediate.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
// Turn on all the effects
labelImmediate.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelFinished );
+ application.GetScene().Add( labelFinished );
// Turn on all the effects
labelFinished.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelFinished.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
// Turn on all the effects
labelFinished.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelFinished.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
DALI_TEST_CHECK( label );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
DALI_TEST_CHECK( label );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
label.SetProperty( Actor::Property::SIZE, Vector2( 360.0f, 20.f ) );
// Turn on all the effects
label.SetProperty( TextLabel::Property::MULTI_LINE, false );
label.SetProperty( Actor::Property::SIZE, Vector2( 360.0f, 20.f ) );
// Turn on all the effects
label.SetProperty( TextLabel::Property::MULTI_LINE, false );
TextLabel label = TextLabel::New("Some text to scroll");
DALI_TEST_CHECK( label );
TextLabel label = TextLabel::New("Some text to scroll");
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
TextLabel label = TextLabel::New("Some text to scroll");
DALI_TEST_CHECK( label );
TextLabel label = TextLabel::New("Some text to scroll");
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Turn on all the effects
label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
// Turn on all the effects
label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
//label.SetProperty( TextLabel::Property::POINT_SIZE, 18 );
//label.SetProperty( TextLabel::Property::POINT_SIZE, 18 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "WORD" );
DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "WORD" );
DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
TraceCallStack& drawTrace = application.GetGlAbstraction().GetDrawTrace();
drawTrace.Enable( true );
TraceCallStack& drawTrace = application.GetGlAbstraction().GetDrawTrace();
drawTrace.Enable( true );
label.SetProperty( Actor::Property::SIZE, Vector2( 300.0f, 300.f ) );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 12 );
label.SetProperty( Actor::Property::SIZE, Vector2( 300.0f, 300.f ) );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 12 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
Property::Map outlineMapSet;
Property::Map outlineMapGet;
Property::Map outlineMapSet;
Property::Map outlineMapGet;
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world Hello world Hello world Hello world Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 20 );
label.SetProperty( TextLabel::Property::MULTI_LINE, false );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world Hello world Hello world Hello world Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 20 );
label.SetProperty( TextLabel::Property::MULTI_LINE, false );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 20 );
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 20 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Test LTR text
DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::TEXT_DIRECTION ), static_cast< int >( Toolkit::DevelText::TextDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
// Test LTR text
DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::TEXT_DIRECTION ), static_cast< int >( Toolkit::DevelText::TextDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 15 );
label.SetProperty( TextLabel::Property::LINE_SPACING, 12 );
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 15 );
label.SetProperty( TextLabel::Property::LINE_SPACING, 12 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT ), static_cast< int >( Toolkit::DevelText::VerticalLineAlignment::TOP ), TEST_LOCATION );
label.SetProperty( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT, DevelText::VerticalLineAlignment::MIDDLE );
DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT ), static_cast< int >( Toolkit::DevelText::VerticalLineAlignment::TOP ), TEST_LOCATION );
label.SetProperty( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT, DevelText::VerticalLineAlignment::MIDDLE );
// The text has been laid out with the bitmap font if the natural size is the sum of all the width (322) and 34 height.
DALI_TEST_EQUALS( label.GetNaturalSize(), Vector3(322.f, 34.f, 0.f), Math::MACHINE_EPSILON_1000, TEST_LOCATION );
// The text has been laid out with the bitmap font if the natural size is the sum of all the width (322) and 34 height.
DALI_TEST_EQUALS( label.GetNaturalSize(), Vector3(322.f, 34.f, 0.f), Math::MACHINE_EPSILON_1000, TEST_LOCATION );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
label.SetProperty( Toolkit::DevelTextLabel::Property::TEXT_FIT, textFitMapSet );
label.SetProperty( TextLabel::Property::POINT_SIZE, 120.f);
label.SetProperty( Toolkit::DevelTextLabel::Property::TEXT_FIT, textFitMapSet );
label.SetProperty( TextLabel::Property::POINT_SIZE, 120.f);
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLUE );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLUE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
TextSelectionToolbar toolbar = TextSelectionToolbar::New();
DALI_TEST_CHECK( toolbar );
TextSelectionToolbar toolbar = TextSelectionToolbar::New();
DALI_TEST_CHECK( toolbar );
- Stage::GetCurrent().Add( toolbar );
+ application.GetScene().Add( toolbar );
Property::Map map;
map["overshootEffectColor"] = Color::RED;
Property::Map map;
map["overshootEffectColor"] = Color::RED;
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
+ application.GetScene().Add( toggleButton );
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
+ application.GetScene().Add( toggleButton );
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
+ application.GetScene().Add( toggleButton );
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
);
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
);
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
application.Render();
rootActor.Add( control );
application.SendNotification();
application.Render();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
);
.Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
application.Render();
rootActor.Add( control );
application.SendNotification();
application.Render();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT )
);
.Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
application.Render();
rootActor.Add( control );
application.SendNotification();
application.Render();
- const Vector2 stageSize = Stage::GetCurrent().GetSize();
+ const Vector2 stageSize = application.GetScene().GetSize();
Vector2 hoverPoint = stageSize * 0.5f;
hoverPoint.x -= 10.0f;
hoverPoint.y -= 10.0f;
Vector2 hoverPoint = stageSize * 0.5f;
hoverPoint.x -= 10.0f;
hoverPoint.y -= 10.0f;
.Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
);
.Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
tet_infoline( "Start hover" );
int rootChildCount = rootActor.GetChildCount();
tet_infoline( "Start hover" );
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
application.SendNotification();
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
application.SendNotification();
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
tet_infoline( "Start hover" );
int rootChildCount = rootActor.GetChildCount();
tet_infoline( "Start hover" );
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
application.SendNotification();
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
application.SendNotification();
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
int rootChildCount = rootActor.GetChildCount();
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
Dali::Timer timer = Timer::New( 1u );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
);
.Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
int rootChildCount = rootActor.GetChildCount();
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
Dali::Timer timer = Timer::New( 1u );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
Dali::Timer timer = Timer::New( 1u );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
tet_infoline( "Change content while timer is running and ensure it matches the new value" );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
tet_infoline( "Change content while timer is running and ensure it matches the new value" );
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
tet_infoline( "Create a control and place it at the bottom of the screen, setting the tooltip to appear below" );
Control control = Control::New();
tet_infoline( "Create a control and place it at the bottom of the screen, setting the tooltip to appear below" );
Control control = Control::New();
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
tet_infoline( "Create a control and place it at the top of the screen, setting the tooltip to appear above" );
Control control = Control::New();
tet_infoline( "Create a control and place it at the top of the screen, setting the tooltip to appear above" );
Control control = Control::New();
.Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
);
.Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
Vector2 centerPoint = stageSize * 0.5f;
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the left of the screen" );
Vector2 centerPoint = stageSize * 0.5f;
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the left of the screen" );
);
control.SetProperty( Actor::Property::POSITION_X, -centerPoint.x );
);
control.SetProperty( Actor::Property::POSITION_X, -centerPoint.x );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
Vector2 centerPoint = stageSize * 0.5f;
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the right of the screen" );
Vector2 centerPoint = stageSize * 0.5f;
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the right of the screen" );
);
control.SetProperty( Actor::Property::POSITION_X, centerPoint.x );
);
control.SetProperty( Actor::Property::POSITION_X, centerPoint.x );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
rootActor.Add( control );
application.SendNotification();
- * Copyright (c) 2019 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Animation anim = dummyImpl.CreateTransition( transition );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Animation anim = dummyImpl.CreateTransition( transition );
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Animation anim = dummyImpl.CreateTransition( transition );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Animation anim = dummyImpl.CreateTransition( transition );
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Property::Map visualMap;
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Property::Map visualMap;
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Property::Map visualMap;
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Property::Map visualMap;
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Property::Map visualMap;
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Property::Map visualMap;
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(0), Vector3::ZAXIS), TEST_LOCATION);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(0), Vector3::ZAXIS), TEST_LOCATION);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
- * Copyright (c) 2015 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Toolkit::VideoView view = Toolkit::VideoView::New();
DALI_TEST_CHECK( view );
Toolkit::VideoView view = Toolkit::VideoView::New();
DALI_TEST_CHECK( view );
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
std::string file;
Property::Map map;
std::string file;
Property::Map map;
bool isUnderlay = videoView.GetProperty( Toolkit::VideoView::Property::UNDERLAY ).Get< bool >();
DALI_TEST_CHECK( !isUnderlay );
bool isUnderlay = videoView.GetProperty( Toolkit::VideoView::Property::UNDERLAY ).Get< bool >();
DALI_TEST_CHECK( !isUnderlay );
- Stage::GetCurrent().Add( videoView );
+ application.GetScene().Add( videoView );
videoView.SetProperty( VideoView::Property::VIDEO, "testvideo" );
Property::Map customShader;
videoView.SetProperty( VideoView::Property::VIDEO, "testvideo" );
Property::Map customShader;
windowSurfaceTarget.Insert( RENDERING_TYPE, "windowSurfaceTarget" );
windowSurfaceTarget.Insert( RENDERING_TYPE, "windowSurfaceTarget" );
- Stage::GetCurrent().Add( videoView );
+ application.GetScene().Add( videoView );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
VideoView view = VideoView::New();
DALI_TEST_CHECK( view );
VideoView view = VideoView::New();
DALI_TEST_CHECK( view );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
view.Play();
application.SendNotification();
view.Play();
application.SendNotification();
VideoView view = VideoView::New();
DALI_TEST_CHECK( view );
VideoView view = VideoView::New();
DALI_TEST_CHECK( view );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
view.Play();
application.SendNotification();
view.Play();
application.SendNotification();
VideoView view = VideoView::New( true );
DALI_TEST_CHECK( view );
VideoView view = VideoView::New( true );
DALI_TEST_CHECK( view );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
view.Play();
application.SendNotification();
view.Play();
application.SendNotification();
VideoView view2 = VideoView::New( "", false );
DALI_TEST_CHECK( view2 );
VideoView view2 = VideoView::New( "", false );
DALI_TEST_CHECK( view2 );
- Stage::GetCurrent().Add( view2 );
+ application.GetScene().Add( view2 );
view2.Play();
application.SendNotification();
view2.Play();
application.SendNotification();
VideoView view = VideoView::New();
DALI_TEST_CHECK( view );
VideoView view = VideoView::New();
DALI_TEST_CHECK( view );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
view.Play();
application.SendNotification();
view.Play();
application.SendNotification();
bool isUnderlay = view.GetProperty( Toolkit::VideoView::Property::UNDERLAY ).Get< bool >();
DALI_TEST_CHECK( !isUnderlay );
bool isUnderlay = view.GetProperty( Toolkit::VideoView::Property::UNDERLAY ).Get< bool >();
DALI_TEST_CHECK( !isUnderlay );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
view.SetProperty( VideoView::Property::VIDEO, "testvideo" );
/* insert custom shader */
view.SetProperty( VideoView::Property::VIDEO, "testvideo" );
/* insert custom shader */
view.SetProperty( VideoView::Property::VIDEO, map );
/* do render for check custom shader */
view.SetProperty( VideoView::Property::VIDEO, map );
/* do render for check custom shader */
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
view.Play();
application.SendNotification();
view.Play();
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
int depthIndex = dummyControl.GetRendererAt(0u).GetProperty<int>( Renderer::Property::DEPTH_INDEX );
int depthIndex = dummyControl.GetRendererAt(0u).GetProperty<int>( Renderer::Property::DEPTH_INDEX );
application.Render(0);
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
application.Render(0);
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render(0);
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
application.SendNotification();
application.Render(0);
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
// First on/off
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
// First on/off
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
auto textures = renderer.GetTextures();
DALI_TEST_CHECK( textures.GetTextureCount() != 0u );
auto textures = renderer.GetTextures();
DALI_TEST_CHECK( textures.GetTextureCount() != 0u );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
application.SendNotification();
application.Render(0);
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
// Second on/off
application.SendNotification();
application.Render(0);
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
// Second on/off
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
textures = renderer.GetTextures();
DALI_TEST_CHECK( textures.GetTextureCount() != 0u );
textures = renderer.GetTextures();
DALI_TEST_CHECK( textures.GetTextureCount() != 0u );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
DummyControl dummyControl = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
DummyControl dummyControl = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 1, TEST_LOCATION );
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 1, TEST_LOCATION );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
application.Render(0);
application.SendNotification();
application.Render(0);
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
application.Render( 0 );
application.SendNotification();
application.Render( 0 );
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
application.Render( 0 );
application.SendNotification();
application.Render( 0 );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transform );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transform );
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.SendNotification();
Renderer renderer = dummy.GetRendererAt( 0 );
application.SendNotification();
Renderer renderer = dummy.GetRendererAt( 0 );
DummyControl control = DummyControl::New(true);
control.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
DummyControl control = DummyControl::New(true);
control.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- Stage::GetCurrent().Add( control );
+ application.GetScene().Add( control );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>( control.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, opaqueGradientVisual );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>( control.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, opaqueGradientVisual );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
tet_infoline( "Add control with visual to stage and check renderer count is 1" );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
tet_infoline( "Add control with visual to stage and check renderer count is 1" );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 1, TEST_LOCATION );
tet_infoline( "Remove control with visual from stage and check renderer count is 0" );
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 1, TEST_LOCATION );
tet_infoline( "Remove control with visual from stage and check renderer count is 0" );
- Stage::GetCurrent().Remove( dummyControl );
+ application.GetScene().Remove( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
tet_infoline( "Re-add control with visual to stage and check renderer count is still 1" );
tet_infoline( "Re-add control with visual to stage and check renderer count is still 1" );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( anotherTestVisual2Replacement.GetDepthIndex(), 2000, TEST_LOCATION );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( anotherTestVisual2Replacement.GetDepthIndex(), 2000, TEST_LOCATION );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
DALI_TEST_CHECK( testVisual2.GetDepthIndex() > testVisual1.GetDepthIndex() );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_CHECK( testVisual2.GetDepthIndex() > testVisual1.GetDepthIndex() );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
DALI_TEST_EQUALS( DevelControl::IsVisualEnabled( dummyImpl, DummyControl::Property::TEST_VISUAL2 ), true, TEST_LOCATION );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( DevelControl::IsVisualEnabled( dummyImpl, DummyControl::Property::TEST_VISUAL2 ), true, TEST_LOCATION );
dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( dummyControl );
+ application.GetScene().Add( dummyControl );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( dummy );
+ application.GetScene().Add( dummy );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( actualValue, Vector3(testColor), TEST_LOCATION );
DALI_TEST_EQUALS( actualColor.a, testColor.a, TEST_LOCATION );
DALI_TEST_EQUALS( actualValue, Vector3(testColor), TEST_LOCATION );
DALI_TEST_EQUALS( actualColor.a, testColor.a, TEST_LOCATION );
- Stage::GetCurrent().Remove(actor);
+ application.GetScene().Remove(actor);
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f));
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f));
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f));
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f));
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
visual = factory.CreateVisual( map );
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
visual = factory.CreateVisual( map );
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
blendMode = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::BLEND_MODE );
DALI_TEST_EQUALS( static_cast<BlendMode::Type>(blendMode), BlendMode::ON, TEST_LOCATION );
blendMode = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::BLEND_MODE );
DALI_TEST_EQUALS( static_cast<BlendMode::Type>(blendMode), BlendMode::ON, TEST_LOCATION );
DummyControl actor = DummyControl::New(true);
TestVisualRender( application, actor, visual );
DummyControl actor = DummyControl::New(true);
TestVisualRender( application, actor, visual );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
Vector2 naturalSize( 0.0f, 0.0f );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
Vector2 naturalSize( 0.0f, 0.0f );
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, Vector2( imageSize.GetWidth() - 2.0f, imageSize.GetHeight() - 2.0f ), TEST_LOCATION );
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, Vector2( imageSize.GetWidth() - 2.0f, imageSize.GetHeight() - 2.0f ), TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, Vector2( imageSize.GetWidth() - 2.0f, imageSize.GetHeight() - 2.0f ), TEST_LOCATION );
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, Vector2( imageSize.GetWidth() - 2.0f, imageSize.GetHeight() - 2.0f ), TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, Vector2( imageSize.GetWidth() - 2.0f, imageSize.GetHeight() - 2.0f ), TEST_LOCATION );
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, Vector2( imageSize.GetWidth() - 2.0f, imageSize.GetHeight() - 2.0f ), TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.Unparent();
application.SendNotification();
actor.Unparent();
application.SendNotification();
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
dummy.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
dummy.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- Stage::GetCurrent().Add(dummy);
+ application.GetScene().Add(dummy);
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
application.SendNotification();
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
application.SendNotification();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); // Only rasterizes when it knows control size.
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); // Only rasterizes when it knows control size.
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
application.SendNotification();
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
application.SendNotification();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
//Ensure set on stage.
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
//Ensure set on stage.
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
//Ensure set on stage.
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
//Ensure set on stage.
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
//Ensure set on stage.
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
//Ensure set on stage.
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- * Copyright (c) 2018 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
application.SendNotification();
application.Render();
DALI_TEST_CHECK( view );
application.SendNotification();
application.Render();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();