(Vector) Ensure that all animation data is applied at once
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-PushButton.cpp
index a013d58..2b6921a 100644 (file)
@@ -133,9 +133,9 @@ Dali::Integration::Point GetPointUpOutside()
 // Set up the position of the button for the default test events
 void SetupButtonForTestTouchEvents( ToolkitTestApplication& application, Button& button, bool useDefaultImages )
 {
-  button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  button.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  button.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
+  button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  button.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
   if ( useDefaultImages )
   {
     const Vector2 TEST_IMAGE_SIZE = Vector2( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
@@ -464,10 +464,10 @@ int UtcDaliPushButtonPressed(void)
   tet_infoline(" UtcDaliPushButtonPressed");
 
   PushButton pushButton = PushButton::New();
-  pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  pushButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
-  pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+  pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  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 );
 
@@ -497,10 +497,10 @@ int UtcDaliPushButtonReleased(void)
   tet_infoline(" UtcDaliPushButtonReleased");
 
   PushButton pushButton = PushButton::New();
-  pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  pushButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
-  pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+  pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  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 );
 
@@ -580,10 +580,10 @@ int UtcDaliPushButtonSelected(void)
   tet_infoline(" UtcDaliPushButtonSelected");
 
   PushButton pushButton = PushButton::New();
-  pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  pushButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
-  pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+  pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  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 );
 
@@ -747,9 +747,9 @@ int UtcDaliPushButtonPaddingLayout(void)
   ImageDimensions testImageSize = Dali::GetClosestImageSize( TEST_IMAGE_ONE );
   const Vector2 TEST_IMAGE_SIZE( testImageSize.GetWidth(), testImageSize.GetHeight() );
 
-  pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  pushButton.SetPosition( 0.0f, 0.0f );
+  pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
   pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
 
   Stage::GetCurrent().Add( pushButton );
@@ -796,9 +796,9 @@ int UtcDaliPushButtonPaddingLayout(void)
   pushButton.Unparent();
   pushButton = PushButton::New();
 
-  pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  pushButton.SetPosition( 0.0f, 0.0f );
+  pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
   pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
 
   Stage::GetCurrent().Add( pushButton );
@@ -894,9 +894,9 @@ int UtcDaliPushButtonAlignmentLayout(void)
 
   PushButton pushButton = PushButton::New();
 
-  pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  pushButton.SetPosition( 0.0f, 0.0f );
+  pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
   pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
 
   Stage::GetCurrent().Add( pushButton );
@@ -1057,7 +1057,7 @@ int UtcDaliPushButtonSetUnSelectedVisual01P(void)
   ToolkitTestApplication application;
 
   PushButton pushButton = PushButton::New();
-  pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+  pushButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ) );
 
   Stage::GetCurrent().Add( pushButton );
 
@@ -1112,8 +1112,8 @@ int UtcDaliPushButtonSetSelectedVisualN(void)
 
   PushButton pushButton = PushButton::New();
 
-  pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
   pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
 
   Stage::GetCurrent().Add( pushButton );
@@ -1384,4 +1384,4 @@ int UtcDaliPushButtonSetLabelText(void)
   DALI_TEST_EQUALS(GetButtonText( pushButton ), STR, TEST_LOCATION);
 
   END_TEST;
-}
\ No newline at end of file
+}