X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-ScrollView.cpp;h=22f2181733c4bb4f82914ffbf561e15bd0ca975f;hb=763c96a171fb79c5ae983792434537c70ac231fb;hp=3e66bf1e93dfe967cbfff5bcd2186ed090d65246;hpb=4aaa3009e1e192b20eae5f0831996f1034cbb6f4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp index 3e66bf1..22f2181 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp @@ -588,18 +588,18 @@ int UtcDaliToolkitScrollModeP1(void) ScrollView scrollView = ScrollView::New(); // Do not rely on stage size for UTC tests. - Vector2 pageSize( 720.0f, 1280.0f ); + Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( pageSize ); - scrollView.SetParentOrigin( ParentOrigin::CENTER ); - scrollView.SetAnchorPoint( AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); + scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers. Property::Map rulerMap; rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, true ); - rulerMap.Add( ScrollMode::X_AXIS_SNAP_TO_INTERVAL, pageSize.width ); - rulerMap.Add( ScrollMode::X_AXIS_SCROLL_BOUNDARY, pageSize.width*3 ); + rulerMap.Add( ScrollMode::X_AXIS_SNAP_TO_INTERVAL, viewPageSize.width ); + rulerMap.Add( ScrollMode::X_AXIS_SCROLL_BOUNDARY, viewPageSize.width*3 ); rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, false ); scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap); @@ -622,7 +622,7 @@ int UtcDaliToolkitScrollModeP1(void) Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) ); // Confirm the final X coord has not moved more than one page from the start X position. - DALI_TEST_GREATER( ( startPos.x + pageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION ); + DALI_TEST_GREATER( ( startPos.x + viewPageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION ); // Finish the gesture and wait for the snap. currentPos += direction; @@ -631,7 +631,7 @@ int UtcDaliToolkitScrollModeP1(void) time += Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL ); // Confirm the final X coord has snapped to exactly one page ahead of the start page. - DALI_TEST_EQUALS( pageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + DALI_TEST_EQUALS( viewPageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION ); END_TEST; } @@ -645,19 +645,19 @@ int UtcDaliToolkitScrollModeP2(void) ScrollView scrollView = ScrollView::New(); // Do not rely on stage size for UTC tests. - Vector2 pageSize( 720.0f, 1280.0f ); + Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( pageSize ); - scrollView.SetParentOrigin( ParentOrigin::CENTER ); - scrollView.SetAnchorPoint( AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); + scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers. Property::Map rulerMap; rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, false ); rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true ); - rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height ); - rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 ); + rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, viewPageSize.height ); + rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, viewPageSize.height*3 ); scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap); scrollView.SetWrapMode( false ); @@ -679,7 +679,7 @@ int UtcDaliToolkitScrollModeP2(void) Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) ); // Confirm the final X coord has not moved more than one page from the start X position. - DALI_TEST_GREATER( ( startPos.y + pageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION ); + DALI_TEST_GREATER( ( startPos.y + viewPageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION ); // Finish the gesture and wait for the snap. currentPos += direction; @@ -689,7 +689,7 @@ int UtcDaliToolkitScrollModeP2(void) Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL ); // Confirm the final Y coord has snapped to exactly one page ahead of the start page. - DALI_TEST_EQUALS( pageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + DALI_TEST_EQUALS( viewPageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION ); END_TEST; } @@ -703,19 +703,19 @@ int UtcDaliToolkitScrollModeP3(void) ScrollView scrollView = ScrollView::New(); // Do not rely on stage size for UTC tests. - Vector2 pageSize( 720.0f, 1280.0f ); + Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( pageSize ); - scrollView.SetParentOrigin( ParentOrigin::CENTER ); - scrollView.SetAnchorPoint( AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); + scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers. Property::Map rulerMap; rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, false ); rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true ); - rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height ); - rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 ); + rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, viewPageSize.height ); + rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, viewPageSize.height*3 ); scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap); scrollView.SetWrapMode( false ); @@ -737,7 +737,7 @@ int UtcDaliToolkitScrollModeP3(void) Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) ); // Confirm the final X coord has not moved more than one page from the start X position. - DALI_TEST_GREATER( ( startPos.y + pageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION ); + DALI_TEST_GREATER( ( startPos.y + viewPageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION ); // Finish the gesture and wait for the snap. currentPos += direction; @@ -746,7 +746,7 @@ int UtcDaliToolkitScrollModeP3(void) Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL ); // Confirm the final Y coord has snapped to exactly one page ahead of the start page. - DALI_TEST_EQUALS( pageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + DALI_TEST_EQUALS( viewPageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION ); END_TEST; } @@ -760,12 +760,12 @@ int UtcDaliToolkitScrollModeP4(void) ScrollView scrollView = ScrollView::New(); // Do not rely on stage size for UTC tests. - Vector2 pageSize( 720.0f, 1280.0f ); + Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( pageSize ); - scrollView.SetParentOrigin( ParentOrigin::TOP_LEFT ); - scrollView.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); + scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers - expect Default rulers to be used which don't snap Property::Map rulerMap; @@ -863,12 +863,12 @@ int UtcDaliToolkitScrollViewScrollToActorP(void) Actor actorA = Actor::New(); const Vector3 positionA = Vector3(100.0f, 400.0f, 0.0f); - actorA.SetPosition(positionA); + actorA.SetProperty( Actor::Property::POSITION, positionA ); scrollView.Add(actorA); Actor actorB = Actor::New(); const Vector3 positionB = Vector3(500.0f, 200.0f, 0.0f); - actorB.SetPosition(positionB); + actorB.SetProperty( Actor::Property::POSITION, positionB ); scrollView.Add(actorB); Wait(application); @@ -984,12 +984,12 @@ int UtcDaliToolkitScrollViewActorAutoSnap(void) const Vector3 aPosition = Vector3(200.0f, 50.0f, 0.0f); Actor a = Actor::New(); scrollView.Add(a); - a.SetPosition(aPosition); + a.SetProperty( Actor::Property::POSITION, aPosition ); const Vector3 bPosition = Vector3(600.0f, 600.0f, 0.0f); Actor b = Actor::New(); scrollView.Add(b); - b.SetPosition(bPosition); + b.SetProperty( Actor::Property::POSITION, bPosition ); // Goto a random position, and execute snap (should not move) Vector2 targetScroll = Vector2(500.0f, 500.0f); @@ -1054,9 +1054,9 @@ int UtcDaliToolkitScrollViewSignalsUpdate01(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1070,9 +1070,9 @@ int UtcDaliToolkitScrollViewSignalsUpdate01(void) scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete ); Actor image = Actor::New(); - image.SetSize(stageSize); - image.SetParentOrigin(ParentOrigin::TOP_LEFT); - image.SetAnchorPoint(AnchorPoint::TOP_LEFT); + image.SetProperty( Actor::Property::SIZE, stageSize); + image.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); + image.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); scrollView.Add(image); Wait(application); @@ -1116,9 +1116,9 @@ int UtcDaliToolkitScrollViewSignalsUpdate02(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1136,9 +1136,9 @@ int UtcDaliToolkitScrollViewSignalsUpdate02(void) DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollCompleted", CallbackFunctor(&scrollCompleted) )); Actor image = Actor::New(); - image.SetSize(stageSize); - image.SetParentOrigin(ParentOrigin::TOP_LEFT); - image.SetAnchorPoint(AnchorPoint::TOP_LEFT); + image.SetProperty( Actor::Property::SIZE, stageSize); + image.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); + image.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); scrollView.Add(image); Wait(application); @@ -1183,9 +1183,9 @@ int UtcDaliToolkitScrollViewScrollSensitive(void) scrollView.SetOvershootEnabled(true); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1230,9 +1230,9 @@ int UtcDaliToolkitScrollViewAxisAutoLock(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1335,9 +1335,9 @@ int UtcDaliToolkitScrollViewConstraints(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1352,7 +1352,7 @@ int UtcDaliToolkitScrollViewConstraints(void) gConstraintResult = Vector3::ZERO; Actor a = Actor::New(); scrollView.Add(a); - a.SetPosition( TEST_ACTOR_POSITION ); + a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION); Wait(application); Constraint constraint = Constraint::New( scrollView, Actor::Property::POSITION, TestSumConstraint( TEST_CONSTRAINT_OFFSET ) ); @@ -1380,9 +1380,9 @@ int UtcDaliToolkitScrollViewBind(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1398,7 +1398,7 @@ int UtcDaliToolkitScrollViewBind(void) gConstraintResult = Vector3::ZERO; Actor a = Actor::New(); scrollView.Add(a); - a.SetPosition( TEST_ACTOR_POSITION ); + a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION); Wait(application); // apply this constraint to scrollview @@ -1441,9 +1441,9 @@ int UtcDaliToolkitScrollViewOvershoot(void) Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1573,9 +1573,9 @@ int UtcDaliToolkitScrollViewSnapStartedSignalP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1643,9 +1643,9 @@ int UtcDaliToolkitScrollViewSetMaxOvershootP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -1734,9 +1734,9 @@ int UtcDaliToolkitScrollViewSetScrollingDirectionP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); Vector2 START_POSITION = Vector2(10.0f, 10.0f); @@ -1820,9 +1820,9 @@ int UtcDaliToolkitScrollViewRemoveScrollingDirectionP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); Vector2 START_POSITION = Vector2(10.0f, 10.0f); uint32_t time = 0; @@ -2643,9 +2643,9 @@ int UtcDaliToolkitScrollViewConstraintsMove(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -2658,7 +2658,7 @@ int UtcDaliToolkitScrollViewConstraintsMove(void) // Add an Actor to ScrollView, Actor a = Actor::New(); scrollView.Add(a); - a.SetPosition( TEST_ACTOR_POSITION ); + a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION); Wait(application); const Vector2 target = Vector2(100.0f, 100.0f); @@ -2688,9 +2688,9 @@ int UtcDaliToolkitScrollViewConstraintsWrap(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); - scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT); - scrollView.SetAnchorPoint(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); // Position rulers. RulerPtr rulerX = new DefaultRuler(); @@ -2703,7 +2703,7 @@ int UtcDaliToolkitScrollViewConstraintsWrap(void) // Add an Actor to ScrollView, Actor a = Actor::New(); scrollView.Add(a); - a.SetPosition( TEST_ACTOR_POSITION ); + a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION); Wait(application); const Vector2 target = Vector2(100.0f, 100.0f); @@ -2742,19 +2742,19 @@ int UtcDaliToolkitScrollViewGesturePageLimit(void) ScrollView scrollView = ScrollView::New(); // Do not rely on stage size for UTC tests. - Vector2 pageSize( 720.0f, 1280.0f ); + Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( pageSize ); - scrollView.SetParentOrigin( ParentOrigin::CENTER ); - scrollView.SetAnchorPoint( AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); + scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers. // We set the X ruler to fixed to give us pages to snap to. - Dali::Toolkit::FixedRuler* rulerX = new Dali::Toolkit::FixedRuler( pageSize.width ); + Dali::Toolkit::FixedRuler* rulerX = new Dali::Toolkit::FixedRuler( viewPageSize.width ); // Note: The 3x page width is arbitary, but we need enough to show that we are // capping page movement by the page limiter, and not the domain. - rulerX->SetDomain( Dali::Toolkit::RulerDomain( 0.0f, pageSize.width * 3.0f, false ) ); + rulerX->SetDomain( Dali::Toolkit::RulerDomain( 0.0f, viewPageSize.width * 3.0f, false ) ); Dali::Toolkit::RulerPtr rulerY = new Dali::Toolkit::DefaultRuler(); rulerY->Disable(); scrollView.SetRulerX( rulerX ); @@ -2779,7 +2779,7 @@ int UtcDaliToolkitScrollViewGesturePageLimit(void) Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) ); // Confirm the final X coord has not moved more than one page from the start X position. - DALI_TEST_GREATER( ( startPos.x + pageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION ); + DALI_TEST_GREATER( ( startPos.x + viewPageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION ); // Finish the gesture and wait for the snap. currentPos += direction; @@ -2788,7 +2788,7 @@ int UtcDaliToolkitScrollViewGesturePageLimit(void) time += Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL ); // Confirm the final X coord has snapped to exactly one page ahead of the start page. - DALI_TEST_EQUALS( pageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + DALI_TEST_EQUALS( viewPageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION ); END_TEST; }