END_TEST;
}
-
int UtcDaliLayouting_AbsoluteLayout01(void)
{
ToolkitTestApplication application;
END_TEST;
}
+
+int UtcDaliLayouting_AbsoluteLayout_SetPosition(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliLayouting_AbsoluteLayout_GetWorldPosition - Testing WorldPosition");
+
+ Stage stage = Stage::GetCurrent();
+
+ Dali::Toolkit::Control layoutControl = Dali::Toolkit::Control::New();
+ layoutControl.SetName("AsoluteLayout");
+ layoutControl.SetAnchorPoint( Dali::AnchorPoint::CENTER );
+ layoutControl.SetParentOrigin( Dali::ParentOrigin::CENTER );
+
+ Dali::Toolkit::AbsoluteLayout absoluteLayout = Dali::Toolkit::AbsoluteLayout::New();
+ Dali::Toolkit::DevelControl::SetLayout( layoutControl, absoluteLayout );
+
+ stage.GetRootLayer().Add( layoutControl );
+
+ // Ensure layouting happens
+ application.SendNotification();
+ application.Render(0);
+
+ Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
+ control.SetSize( 100.0f, 100.0f );
+ control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetAnchorPoint( AnchorPoint::CENTER );
+ Vector3 parentPosition( 1.0f, 2.0f, 3.0f );
+ control.SetPosition( parentPosition );
+
+ layoutControl.Add( control );
+
+ // Ensure layouting happens
+ application.SendNotification();
+ application.Render(0);
+
+ // The value of z should not be zero
+ DALI_TEST_EQUALS( control.GetCurrentPosition(), parentPosition, TEST_LOCATION );
+
+ END_TEST;
+}
Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "red" );
- underlineMapSet.Insert( "height", "1" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
editor.SetProperty( TextEditor::Property::UNDERLINE, underlineMapSet );
// Check the input underline property
Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "blue" );
- underlineMapSet.Insert( "height", "2" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::BLUE );
+ underlineMapSet.Insert( "height", 2 );
editor.SetProperty( TextEditor::Property::UNDERLINE, underlineMapSet );
underlineMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::UNDERLINE );
Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "red" );
- underlineMapSet.Insert( "height", "1" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
// Check the underline property
field.SetProperty( TextField::Property::UNDERLINE, underlineMapSet );
Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "false" );
- underlineMapSet.Insert( "color", "blue" );
- underlineMapSet.Insert( "height", "0" );
+ underlineMapSet.Insert( "enable", false );
+ underlineMapSet.Insert( "color", Color::BLUE );
+ underlineMapSet.Insert( "height", 0 );
underlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION );
// Check the underline property
underlineMapSet.Clear();
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "red" );
- underlineMapSet.Insert( "height", "1" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet ), true, TEST_LOCATION );
underlineMapSet.Clear();
- underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::ENABLE, "true" );
- underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::COLOR, "green" );
- underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::HEIGHT, "2" );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::ENABLE, true );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::COLOR, Color::GREEN );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::HEIGHT, 2 );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
underlineMapSet.Clear();
Property::Map underlineDisabledMapGet;
- underlineDisabledMapGet.Insert( "enable", "false" );
- underlineDisabledMapGet.Insert( "color", "green" );
- underlineDisabledMapGet.Insert( "height", "2" );
+ underlineDisabledMapGet.Insert( "enable", false );
+ underlineDisabledMapGet.Insert( "color", Color::GREEN );
+ underlineDisabledMapGet.Insert( "height", 2 );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
label.SetProperty( TextLabel::Property::MULTI_LINE, true );
Property::Map underlineMap;
- underlineMap.Insert( "enable", "true" );
- underlineMap.Insert( "color", "red" );
+ underlineMap.Insert( "enable", true );
+ underlineMap.Insert( "color", Color::RED );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMap );
Property::Map shadowMap;
propertyMap.Insert( "shadow", shadowMapSet.Add("color", Color::RED).Add("offset", Vector2(2.0f, 2.0f)).Add("blurRadius", 3.0f) );
Property::Map underlineMapSet;
- propertyMap.Insert( "underline", underlineMapSet.Add("enable", "true").Add("color", "green").Add("height", "1") );
+ propertyMap.Insert( "underline", underlineMapSet.Add("enable", true).Add("color", Color::GREEN).Add("height", 1) );
Property::Map outlineMapSet;
propertyMap.Insert( "outline", outlineMapSet.Add("color", Color::YELLOW).Add("width", 1) );
{
if( !layoutPositionData.animated )
{
- actor.SetPosition( layoutPositionData.left, layoutPositionData.top );
- actor.SetSize( layoutPositionData.right - layoutPositionData.left, layoutPositionData.bottom - layoutPositionData.top );
+ actor.SetX( layoutPositionData.left );
+ actor.SetY( layoutPositionData.top );
+
+ actor.SetProperty( Actor::Property::SIZE_WIDTH, layoutPositionData.right - layoutPositionData.left );
+ actor.SetProperty( Actor::Property::SIZE_HEIGHT, layoutPositionData.bottom - layoutPositionData.top );
}
else
{
- actor.SetPosition( actor.GetCurrentPosition() );
- actor.SetSize( actor.GetCurrentSize() );
+ actor.SetX( actor.GetCurrentPosition().x );
+ actor.SetY( actor.GetCurrentPosition().y );
+
+ actor.SetProperty( Actor::Property::SIZE_WIDTH, actor.GetCurrentSize().x );
+ actor.SetProperty( Actor::Property::SIZE_HEIGHT, actor.GetCurrentSize().y );
}
}
}
{
Property::Map map;
- const std::string enabledStr = enabled ? TRUE_TOKEN : FALSE_TOKEN;
- map.Insert( ENABLE_KEY, enabledStr );
-
- std::string colorStr;
- Vector4ToColorString( color, colorStr );
- map.Insert( COLOR_KEY, colorStr );
-
- std::string heightStr;
- FloatToString( height, heightStr );
- map.Insert( HEIGHT_KEY, heightStr );
+ map.Insert( ENABLE_KEY, enabled );
+ map.Insert( COLOR_KEY, color );
+ map.Insert( HEIGHT_KEY, height );
value = map;
}