- propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
- propertyMap.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE);
-
- tet_infoline( "Register visual, should have depth index of 0.0f" );
- Visual::Base testVisual = factory.CreateVisual( propertyMap );
- dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, testVisual );
- DALI_TEST_EQUALS( testVisual.GetDepthIndex(), 0, TEST_LOCATION );
-
- tet_infoline( "Register more visuals, each added one should have a depth index greater than previous" );
-
- Visual::Base testVisual2 = factory.CreateVisual( propertyMap );
- dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, testVisual2 );
- DALI_TEST_CHECK( testVisual2.GetDepthIndex() > testVisual.GetDepthIndex() );
-
- Visual::Base foregroundVisual = factory.CreateVisual( propertyMap );
- dummyImpl.RegisterVisual( DummyControl::Property::FOREGROUND_VISUAL, foregroundVisual );
- DALI_TEST_CHECK( foregroundVisual.GetDepthIndex() > testVisual2.GetDepthIndex() );
-
- Visual::Base focusVisual = factory.CreateVisual( propertyMap );
- dummyImpl.RegisterVisual( DummyControl::Property::FOCUS_VISUAL, focusVisual );
- DALI_TEST_CHECK( focusVisual.GetDepthIndex() > foregroundVisual.GetDepthIndex() );
-
- tet_infoline( "Set depth index on a new visual before registering, the depth index should not have been changed" );
- Visual::Base labelVisual = factory.CreateVisual( propertyMap );
- labelVisual.SetDepthIndex( -2000 );
- dummyImpl.RegisterVisual( DummyControl::Property::LABEL_VISUAL, labelVisual );
- DALI_TEST_EQUALS( labelVisual.GetDepthIndex(), -2000, TEST_LOCATION );
-
- tet_infoline( "Replace visual, the depth index should be the same as what was previously set" );
- const int testVisual2DepthIndex = testVisual2.GetDepthIndex();
- Visual::Base testVisual2Replacement = factory.CreateVisual( propertyMap );
- DALI_TEST_CHECK( testVisual2Replacement.GetDepthIndex() != testVisual2DepthIndex );
- dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, testVisual2Replacement );
- DALI_TEST_EQUALS( testVisual2Replacement.GetDepthIndex(), testVisual2DepthIndex, TEST_LOCATION );
-
- tet_infoline( "Replace visual and set a depth index on the replacement, the depth index of the replacement should be honoured" );
- Visual::Base anotherTestVisual2Replacement = factory.CreateVisual( propertyMap );
- anotherTestVisual2Replacement.SetDepthIndex( 2000 );
- dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, anotherTestVisual2Replacement );
- DALI_TEST_EQUALS( anotherTestVisual2Replacement.GetDepthIndex(), 2000, TEST_LOCATION );
-
- dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
- application.GetScene().Add( dummyControl );
+ propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
+ propertyMap.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE);
+
+ tet_infoline("Register visual, should have depth index of 0.0f");
+ Visual::Base testVisual = factory.CreateVisual(propertyMap);
+ dummyImpl.RegisterVisual(DummyControl::Property::TEST_VISUAL, testVisual);
+ DALI_TEST_EQUALS(testVisual.GetDepthIndex(), 0, TEST_LOCATION);
+
+ tet_infoline("Register more visuals, each added one should have a depth index greater than previous");
+
+ Visual::Base testVisual2 = factory.CreateVisual(propertyMap);
+ dummyImpl.RegisterVisual(DummyControl::Property::TEST_VISUAL2, testVisual2);
+ DALI_TEST_CHECK(testVisual2.GetDepthIndex() > testVisual.GetDepthIndex());
+
+ Visual::Base foregroundVisual = factory.CreateVisual(propertyMap);
+ dummyImpl.RegisterVisual(DummyControl::Property::FOREGROUND_VISUAL, foregroundVisual);
+ DALI_TEST_CHECK(foregroundVisual.GetDepthIndex() > testVisual2.GetDepthIndex());
+
+ Visual::Base focusVisual = factory.CreateVisual(propertyMap);
+ dummyImpl.RegisterVisual(DummyControl::Property::FOCUS_VISUAL, focusVisual);
+ DALI_TEST_CHECK(focusVisual.GetDepthIndex() > foregroundVisual.GetDepthIndex());
+
+ tet_infoline("Set depth index on a new visual before registering, the depth index should not have been changed");
+ Visual::Base labelVisual = factory.CreateVisual(propertyMap);
+ labelVisual.SetDepthIndex(-2000);
+ dummyImpl.RegisterVisual(DummyControl::Property::LABEL_VISUAL, labelVisual);
+ DALI_TEST_EQUALS(labelVisual.GetDepthIndex(), -2000, TEST_LOCATION);
+
+ tet_infoline("Replace visual, the depth index should be the same as what was previously set");
+ const int testVisual2DepthIndex = testVisual2.GetDepthIndex();
+ Visual::Base testVisual2Replacement = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK(testVisual2Replacement.GetDepthIndex() != testVisual2DepthIndex);
+ dummyImpl.RegisterVisual(DummyControl::Property::TEST_VISUAL2, testVisual2Replacement);
+ DALI_TEST_EQUALS(testVisual2Replacement.GetDepthIndex(), testVisual2DepthIndex, TEST_LOCATION);
+
+ tet_infoline("Replace visual and set a depth index on the replacement, the depth index of the replacement should be honoured");
+ Visual::Base anotherTestVisual2Replacement = factory.CreateVisual(propertyMap);
+ anotherTestVisual2Replacement.SetDepthIndex(2000);
+ dummyImpl.RegisterVisual(DummyControl::Property::TEST_VISUAL2, anotherTestVisual2Replacement);
+ DALI_TEST_EQUALS(anotherTestVisual2Replacement.GetDepthIndex(), 2000, TEST_LOCATION);
+
+ dummyControl.SetProperty(Actor::Property::SIZE, Vector2(200.f, 200.f));
+ application.GetScene().Add(dummyControl);