From ad110f27c01af7e617df158891eef5cf60bf22e6 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 2 Jun 2020 17:35:36 +0100 Subject: [PATCH] Further Setter/Getter public API removal from Dali::Actor Change-Id: I714972e4311b141d2f0ae60ea57cc3629bd465e7 --- .../utc-Dali-Control-internal.cpp | 2 +- .../utc-Dali-TextField-internal.cpp | 2 +- .../utc-Dali-Visuals-internal.cpp | 8 +-- .../dali-toolkit-test-utils/test-actor-utils.cpp | 2 +- .../dali-toolkit/utc-Dali-AccessibilityManager.cpp | 12 ++-- .../src/dali-toolkit/utc-Dali-Alignment.cpp | 4 +- .../utc-Dali-AnimatedVectorImageVisual.cpp | 48 +++++++------- .../src/dali-toolkit/utc-Dali-ArcVisual.cpp | 6 +- .../src/dali-toolkit/utc-Dali-BloomView.cpp | 6 +- .../src/dali-toolkit/utc-Dali-BubbleEmitter.cpp | 4 +- .../src/dali-toolkit/utc-Dali-Button.cpp | 20 +++--- .../src/dali-toolkit/utc-Dali-CheckBoxButton.cpp | 4 +- .../src/dali-toolkit/utc-Dali-Control.cpp | 12 ++-- .../src/dali-toolkit/utc-Dali-ControlImpl.cpp | 20 +++--- .../src/dali-toolkit/utc-Dali-ControlWrapper.cpp | 4 +- .../dali-toolkit/utc-Dali-CubeTransitionEffect.cpp | 58 ++++++++--------- .../dali-toolkit/utc-Dali-DragAndDropDetector.cpp | 50 +++++++-------- .../src/dali-toolkit/utc-Dali-EffectsView.cpp | 14 ++-- .../src/dali-toolkit/utc-Dali-FlexContainer.cpp | 2 +- .../src/dali-toolkit/utc-Dali-GaussianBlurView.cpp | 14 ++-- .../src/dali-toolkit/utc-Dali-ImageAtlas.cpp | 4 +- .../src/dali-toolkit/utc-Dali-ImageView.cpp | 44 ++++++------- .../src/dali-toolkit/utc-Dali-ImageVisual.cpp | 74 +++++++++++----------- .../src/dali-toolkit/utc-Dali-ItemView.cpp | 2 +- .../dali-toolkit/utc-Dali-KeyInputFocusManager.cpp | 24 +++---- .../src/dali-toolkit/utc-Dali-Magnifier.cpp | 2 +- .../src/dali-toolkit/utc-Dali-Model3dView.cpp | 4 +- .../src/dali-toolkit/utc-Dali-Popup.cpp | 16 ++--- .../src/dali-toolkit/utc-Dali-ProgressBar.cpp | 16 ++--- .../src/dali-toolkit/utc-Dali-PushButton.cpp | 24 +++---- .../src/dali-toolkit/utc-Dali-RadioButton.cpp | 12 ++-- .../src/dali-toolkit/utc-Dali-ScrollBar.cpp | 16 ++--- .../src/dali-toolkit/utc-Dali-ScrollView.cpp | 66 +++++++++---------- .../src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp | 6 +- .../src/dali-toolkit/utc-Dali-ShadowView.cpp | 4 +- .../src/dali-toolkit/utc-Dali-Slider.cpp | 12 ++-- .../src/dali-toolkit/utc-Dali-SuperBlurView.cpp | 12 ++-- .../src/dali-toolkit/utc-Dali-TableView.cpp | 14 ++-- .../src/dali-toolkit/utc-Dali-TextEditor.cpp | 44 ++++++------- .../src/dali-toolkit/utc-Dali-TextField.cpp | 50 +++++++-------- .../src/dali-toolkit/utc-Dali-TextLabel.cpp | 14 ++-- .../dali-toolkit/utc-Dali-TextSelectionPopup.cpp | 2 +- .../src/dali-toolkit/utc-Dali-ToggleButton.cpp | 10 +-- .../src/dali-toolkit/utc-Dali-ToolBar.cpp | 18 +++--- .../src/dali-toolkit/utc-Dali-Tooltip.cpp | 34 +++++----- .../src/dali-toolkit/utc-Dali-VideoView.cpp | 2 +- .../src/dali-toolkit/utc-Dali-Visual.cpp | 48 +++++++------- .../src/dali-toolkit/utc-Dali-VisualFactory.cpp | 24 +++---- .../src/dali-toolkit/utc-Dali-WebView.cpp | 10 +-- .../devel-api/controls/effects-view/effects-view.h | 2 +- .../devel-api/controls/shadow-view/shadow-view.h | 6 +- .../controls/super-blur-view/super-blur-view.h | 2 +- .../accessibility-manager-impl.cpp | 2 +- .../internal/controls/alignment/alignment-impl.cpp | 2 +- .../controls/bloom-view/bloom-view-impl.cpp | 16 ++--- .../controls/bubble-effect/bubble-emitter-impl.cpp | 4 +- .../controls/effects-view/effects-view-impl.cpp | 6 +- .../flex-container/flex-container-impl.cpp | 4 +- .../gaussian-blur-view/gaussian-blur-view-impl.cpp | 16 ++--- .../page-turn-landscape-view-impl.cpp | 2 +- .../page-turn-portrait-view-impl.cpp | 2 +- .../page-turn-view/page-turn-view-impl.cpp | 18 +++--- .../internal/controls/popup/popup-impl.cpp | 14 ++-- .../internal/controls/scene3d-view/gltf-loader.cpp | 10 +-- .../controls/scene3d-view/scene3d-view-impl.cpp | 2 +- .../controls/scroll-bar/scroll-bar-impl.cpp | 6 +- .../controls/scrollable/bouncing-effect-actor.h | 2 +- .../scrollable/item-view/item-view-impl.cpp | 6 +- .../scroll-overshoot-indicator-impl.cpp | 14 ++-- .../controls/shadow-view/shadow-view-impl.cpp | 4 +- .../internal/controls/slider/slider-impl.cpp | 18 +++--- .../super-blur-view/super-blur-view-impl.cpp | 2 +- .../controls/table-view/table-view-impl.cpp | 12 ++-- .../controls/text-controls/text-editor-impl.cpp | 6 +- .../controls/text-controls/text-field-impl.cpp | 10 +-- .../text-controls/text-selection-popup-impl.cpp | 2 +- .../text-controls/text-selection-toolbar-impl.cpp | 8 +-- dali-toolkit/internal/controls/tooltip/tooltip.cpp | 2 +- .../drag-and-drop-detector-impl.cpp | 6 +- .../internal/filters/blur-two-pass-filter.cpp | 12 ++-- dali-toolkit/internal/filters/emboss-filter.cpp | 12 ++-- dali-toolkit/internal/filters/image-filter.cpp | 2 +- dali-toolkit/internal/filters/spread-filter.cpp | 8 +-- .../focus-manager/keyboard-focus-manager-impl.cpp | 2 +- .../internal/text/decorator/text-decorator.cpp | 34 +++++----- .../text/rendering/atlas/text-atlas-renderer.cpp | 4 +- .../vector-based/vector-based-renderer.cpp | 2 +- .../internal/text/text-controller-impl.cpp | 2 +- .../internal/text/text-vertical-scroller.cpp | 4 +- .../public-api/controls/buttons/check-box-button.h | 2 +- .../public-api/controls/buttons/radio-button.h | 4 +- dali-toolkit/public-api/controls/control-impl.cpp | 4 +- .../animation-multi-threading-notes.h | 6 +- docs/content/programming-guide/event-system.h | 2 +- docs/content/programming-guide/popup.md | 2 +- docs/content/programming-guide/scroll-view.h | 2 +- docs/content/programming-guide/size-negotiation.h | 2 +- docs/content/programming-guide/visuals.md | 2 +- 98 files changed, 607 insertions(+), 607 deletions(-) diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp index c7e8c39..74bb7a4 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp @@ -50,7 +50,7 @@ int UtcDaliControlActionOnVisual(void) Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); Stage::GetCurrent().Add( dummyControl ); application.SendNotification(); diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-TextField-internal.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-TextField-internal.cpp index 0d6b83a..e9eff1c 100755 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-TextField-internal.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-TextField-internal.cpp @@ -36,7 +36,7 @@ int UtcDaliTextFieldMultipleBackgroundText(void) // Create a text field TextField textField = TextField::New(); - textField.SetSize( 400.f, 60.f ); + textField.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 60.f ) ); textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Visuals-internal.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Visuals-internal.cpp index d20cbcf..023da7c 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Visuals-internal.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Visuals-internal.cpp @@ -58,7 +58,7 @@ int UtcDaliVisualAction(void) Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); application.SendNotification(); @@ -100,7 +100,7 @@ int UtcDaliVisualActionNotImplemented(void) Visual::Base visual = factory.CreateVisual( propertyMap ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); application.SendNotification(); @@ -136,7 +136,7 @@ int UtcDaliVisualSetProperties(void) Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( colorVisualPtr.Get() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle ); - dummyControl.SetSize( 200.f, 200.f ); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); application.SendNotification(); @@ -341,7 +341,7 @@ int UtcDaliAnimatedVectorImageVisualSetProperties(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp index 38eb0b22..4387ba7 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp @@ -88,7 +88,7 @@ Actor CreateRenderableActor( Image texture, const std::string& vertexShader, con renderer.SetTextures( textureSet ); // Set actor to the size of the texture if set - actor.SetSize( texture.GetWidth(), texture.GetHeight() ); + actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) ); } return actor; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp index 06967cf..25d0149 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp @@ -1315,7 +1315,7 @@ int UtcDaliAccessibilityManagerActionActivateSignalP(void) accAdaptor.HandleActionEnableEvent(); Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New(); - button.SetSize(480, 800); + button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) ); Stage::GetCurrent().Add(button); manager.SetFocusOrder( button, 1 ); manager.SetCurrentFocusActor( button ); @@ -1524,7 +1524,7 @@ int UtcDaliAccessibilityManagerActionUpSignalP(void) manager.ActionUpSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback ); DummyControl dummyControl = DummyControl::New(true); - dummyControl.SetSize(480, 800); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) ); manager.SetFocusOrder( dummyControl, 1 ); Stage::GetCurrent().Add( dummyControl ); manager.SetCurrentFocusActor( dummyControl ); @@ -1569,7 +1569,7 @@ int UtcDaliAccessibilityManagerActionDownSignalP(void) manager.ActionDownSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback ); Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New(); - button.SetSize(480, 800); + button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) ); Stage::GetCurrent().Add(button); manager.SetFocusOrder( button, 1 ); manager.SetCurrentFocusActor( button ); @@ -2097,7 +2097,7 @@ int UtcDaliAccessibilityManagerActionZoomSignalP(void) DALI_TEST_CHECK( manager ); Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New(); - button.SetSize(480, 800); + button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) ); Stage::GetCurrent().Add(button); manager.SetFocusOrder( button, 1 ); manager.SetCurrentFocusActor( button ); @@ -2316,7 +2316,7 @@ int UtcDaliAccessibilityManagerActionTouch(void) DummyControl dummyControl = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(dummyControl.GetImplementation()); - dummyControl.SetSize(480, 800); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) ); manager.SetFocusOrder( dummyControl, 1 ); Stage::GetCurrent().Add( dummyControl ); manager.SetCurrentFocusActor( dummyControl ); @@ -2342,7 +2342,7 @@ int UtcDaliAccessibilityManagerHandlePanGesture(void) Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get(); DummyControl dummyControl = DummyControl::New(true); - dummyControl.SetSize(480, 800); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) ); Stage::GetCurrent().Add( dummyControl ); AccessibilityGestureEvent panGestureEvent(AccessibilityGestureEvent::Started); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp index f3106c2..ff0a478 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp @@ -940,7 +940,7 @@ int UtcDaliAlignmentSizeSetP(void) application.SendNotification(); Vector2 size( 100.0f, 200.0f ); - alignment.SetSize(size); + alignment.SetProperty( Actor::Property::SIZE, size); application.Render(); application.SendNotification(); @@ -966,7 +966,7 @@ int UtcDaliAlignmentOnTouchEvent(void) ToolkitTestApplication application; Alignment alignment = Alignment::New(); - alignment.SetSize(100.0f, 100.0f); + alignment.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); alignment.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(alignment); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp index 1ba413a..daf21d3 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp @@ -75,7 +75,7 @@ int UtcDaliVisualFactoryGetAnimatedVectorImageVisual01(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -108,7 +108,7 @@ int UtcDaliVisualFactoryGetAnimatedVectorImageVisual02(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -147,7 +147,7 @@ int UtcDaliVisualFactoryGetAnimatedVectorImageVisual03(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -188,7 +188,7 @@ int UtcDaliVisualFactoryGetAnimatedVectorImageVisual04(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -259,7 +259,7 @@ int UtcDaliAnimatedVectorImageVisualGetPropertyMap01(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -437,7 +437,7 @@ int UtcDaliAnimatedVectorImageVisualPlayback(void) // Change Size Vector3 newSize( 100.0f, 100.0f, 0.0f ); - dummyControl.SetSize( newSize ); + dummyControl.SetProperty( Actor::Property::SIZE, newSize ); application.SendNotification(); application.Render(16); @@ -476,7 +476,7 @@ int UtcDaliAnimatedVectorImageVisualCustomShader(void) Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummy.SetSize( 200.f, 200.f ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy ); @@ -526,7 +526,7 @@ int UtcDaliAnimatedVectorImageVisualNaturalSize(void) DALI_TEST_EQUALS( naturalSize, Vector2( 100.0f, 100.0f ), TEST_LOCATION ); // 100x100 is the content default size. - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); application.SendNotification(); application.Render(); @@ -556,7 +556,7 @@ int UtcDaliAnimatedVectorImageVisualLoopCount(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -600,7 +600,7 @@ int UtcDaliAnimatedVectorImageVisualPlayRange(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -710,7 +710,7 @@ int UtcDaliAnimatedVectorImageVisualPlayRangeMarker(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -803,7 +803,7 @@ int UtcDaliAnimatedVectorImageVisualAnimationFinishedSignal(void) DevelControl::VisualEventSignal( actor ).Connect( &VisualEventSignal ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -842,7 +842,7 @@ int UtcDaliAnimatedVectorImageVisualJumpTo(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -940,7 +940,7 @@ int UtcDaliAnimatedVectorImageVisualUpdateProperty(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -1046,7 +1046,7 @@ int UtcDaliAnimatedVectorImageVisualStopBehavior(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -1141,7 +1141,7 @@ int UtcDaliAnimatedVectorImageVisualLoopingMode(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -1218,8 +1218,8 @@ int UtcDaliAnimatedVectorImageVisualPropertyNotification(void) Vector2 controlSize( 20.f, 30.f ); Vector3 controlScale( 2.0f, 2.0f, 1.0f ); - actor.SetSize( controlSize ); - actor.SetScale( controlScale ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); + actor.SetProperty( Actor::Property::SCALE, controlScale ); Stage::GetCurrent().Add( actor ); @@ -1241,8 +1241,8 @@ int UtcDaliAnimatedVectorImageVisualPropertyNotification(void) // Change scale and size controlSize = Vector2( 50.f, 40.f ); controlScale= Vector3( 0.5f, 0.5f, 1.0f ); - actor.SetSize( controlSize ); - actor.SetScale( controlScale ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); + actor.SetProperty( Actor::Property::SCALE, controlScale ); application.SendNotification(); application.Render(); @@ -1279,7 +1279,7 @@ int UtcDaliAnimatedVectorImageVisualMultipleInstances(void) dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 ); Vector2 controlSize( 20.f, 30.f ); - actor1.SetSize( controlSize ); + actor1.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor1 ); @@ -1294,7 +1294,7 @@ int UtcDaliAnimatedVectorImageVisualMultipleInstances(void) DummyControlImpl& dummyImpl2 = static_cast< DummyControlImpl& >( actor2.GetImplementation() ); dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual2 ); - actor2.SetSize( controlSize ); + actor2.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor2 ); @@ -1343,7 +1343,7 @@ int UtcDaliAnimatedVectorImageVisualControlVisibilityChanged(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); @@ -1387,7 +1387,7 @@ int UtcDaliAnimatedVectorImageVisualWindowVisibilityChanged(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); Vector2 controlSize( 20.f, 30.f ); - actor.SetSize( controlSize ); + actor.SetProperty( Actor::Property::SIZE, controlSize ); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ArcVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ArcVisual.cpp index be12290..2476e0b 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ArcVisual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ArcVisual.cpp @@ -57,7 +57,7 @@ int UtcDaliVisualFactoryGetArcVisual01(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -93,7 +93,7 @@ int UtcDaliVisualFactoryGetArcVisual02(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -132,7 +132,7 @@ int UtcDaliArcVisualGetPropertyMap01(void) DummyControl actor = DummyControl::New( true ); DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-BloomView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-BloomView.cpp index 81cbe96..dc9e771 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-BloomView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-BloomView.cpp @@ -125,7 +125,7 @@ int UtcDaliBloomViewAddRemove(void) view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(actor); Stage::GetCurrent().Add(view); @@ -150,7 +150,7 @@ int UtcDaliBloomActivateDeactivate(void) DALI_TEST_CHECK( 1u == taskList.GetTaskCount() ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.Activate(); @@ -215,7 +215,7 @@ int UtcDaliBloomOnSizeSet(void) application.Render(); Vector3 size( 200.0f, 300.0f, 0.0f ); - view.SetSize( size ); + view.SetProperty( Actor::Property::SIZE, size ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-BubbleEmitter.cpp b/automated-tests/src/dali-toolkit/utc-Dali-BubbleEmitter.cpp index 720136f..1b15e74 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-BubbleEmitter.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-BubbleEmitter.cpp @@ -198,7 +198,7 @@ int UtcDaliBubbleEmitterSetBubbleScale(void) DALI_TEST_CHECK(emitter); Actor root = emitter.GetRootActor(); Stage::GetCurrent().Add( root ); - root.SetPosition( Vector3::ZERO ); + root.SetProperty( Actor::Property::POSITION, Vector3::ZERO ); root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); @@ -321,7 +321,7 @@ int UtcDaliBubbleEmitterRestore(void) BubbleEmitter emitter = BubbleEmitter::New( movementArea,shapeImage, 90, Vector2( 5.f, 10.f )); Actor root = emitter.GetRootActor(); Stage::GetCurrent().Add( root ); - root.SetPosition( Vector3::ZERO ); + root.SetProperty( Actor::Property::POSITION, Vector3::ZERO ); root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp index a2b1a81..5de1c06 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp @@ -360,8 +360,8 @@ int UtcDaliButtonAutoRepeatingP(void) Button button = PushButton::New(); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - button.SetPosition( 240, 400 ); - button.SetSize( 100, 100 ); + button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 )); + button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) ); Stage::GetCurrent().Add( button ); application.SendNotification(); @@ -590,8 +590,8 @@ int UtcDaliButtonPressedSignalP(void) Button button = PushButton::New(); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - button.SetPosition( 240, 400 ); - button.SetSize( 100, 100 ); + button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 )); + button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) ); Stage::GetCurrent().Add( button ); @@ -697,8 +697,8 @@ int UtcDaliButtonClickedSignalP(void) Button button = PushButton::New(); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - button.SetPosition( 240, 400 ); - button.SetSize( 100, 100 ); + button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 )); + button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) ); Stage::GetCurrent().Add( button ); @@ -850,13 +850,13 @@ int UtcDaliButtonEventConsumption(void) Button parentButton = PushButton::New(); parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - parentButton.SetSize( 20, 20 ); + parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) ); Stage::GetCurrent().Add( parentButton ); Button childButton = PushButton::New(); childButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); childButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); - childButton.SetSize( 20, 20 ); + childButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) ); parentButton.Add( childButton ); // Reset signal flags @@ -904,7 +904,7 @@ int UtcDaliButtonRelease(void) Button parentButton = PushButton::New(); parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - parentButton.SetSize( 20, 20 ); + parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) ); Stage::GetCurrent().Add( parentButton ); parentButton.ReleasedSignal().Connect( &ButtonCallback ); @@ -949,7 +949,7 @@ int UtcDaliButtonMultiTouch(void) button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - button.SetSize( 20, 20 ); + button.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) ); Stage::GetCurrent().Add( button ); button.ReleasedSignal().Connect( &ButtonCallback ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp index a43cbf2..b1f43b7 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp @@ -196,7 +196,7 @@ int UtcDaliCheckBoxSetDisabledPropertyP(void) CheckBoxButton checkBox = CheckBoxButton::New(); Stage::GetCurrent().Add( checkBox ); - checkBox.SetSize( Vector2( 20.0f, 20.0f ) ); + checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) ); checkBox.SetProperty(checkBox.GetPropertyIndex("disabledUnselectedBackgroundVisual"), "Image.jpg" ); application.SendNotification(); @@ -367,7 +367,7 @@ int UtcDaliCheckBoxSetLabelDisabledP(void) CheckBoxButton checkBox = CheckBoxButton::New(); Stage::GetCurrent().Add( checkBox ); - checkBox.SetSize( Vector2( 20.0f, 20.0f ) ); + checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) ); checkBox.SetProperty(Button::Property::DISABLED_UNSELECTED_VISUAL, "Image.jpg" ); application.SendNotification(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp index 5255f10..6b09326 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp @@ -425,7 +425,7 @@ int UtcDaliControlSignalAutomaticDisconnect(void) DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 0u, TEST_LOCATION ); const Vector3 ignoredSize( 20, 20, 0 ); - actor.SetSize( ignoredSize ); + actor.SetProperty( Actor::Property::SIZE, ignoredSize ); END_TEST; } @@ -434,7 +434,7 @@ int UtcDaliControlTestParameters(void) ToolkitTestApplication application; DummyControl test = DummyControl::New(); - test.SetSize( 0.7f, 0.7f, 0.7f ); + test.SetProperty( Actor::Property::SIZE, Vector3( 0.7f, 0.7f, 0.7f ) ); Stage::GetCurrent().Add( test ); @@ -950,7 +950,7 @@ int UtcDaliControlResourcesReady(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, smallVisual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Toolkit::Visual::ResourceStatus resourceStatus = actor.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); @@ -1009,7 +1009,7 @@ int UtcDaliControlResourcesReady02(void) gResourceReadySignalFired = false; Control control = Control::New(); - control.SetSize( 200.f, 200.f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); control.ResourceReadySignal().Connect( &ResourceReadySignal ); Property::Map propertyMap; @@ -1120,7 +1120,7 @@ int UtcDaliControlDoAction(void) Impl::DummyControl& dummyImpl = static_cast(dummyControl.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION ); @@ -1162,7 +1162,7 @@ int UtcDaliControlDoActionWhenNotStage(void) Impl::DummyControl& dummyImpl = static_cast(dummyControl.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp index 7779e15..60fd218 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp @@ -217,7 +217,7 @@ int UtcDaliControlImplOnGestureMethods(void) // Check gesture actually happens { DummyControl dummy = DummyControl::New(true); - dummy.SetSize( Vector2(100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -375,7 +375,7 @@ int UtcDaliControlImplSizeSetP(void) DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size not set, no onSizeSet called Vector2 size(100.0f, 200.0f); - dummy.SetSize( size ); + dummy.SetProperty( Actor::Property::SIZE, size ); DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size is going to get negotiated, no onSizeSet called @@ -405,7 +405,7 @@ int UtcDaliControlImplSizeSet2P(void) application.SendNotification(); application.Render(); - dummy.SetSize(size); + dummy.SetProperty( Actor::Property::SIZE, size); application.SendNotification(); application.Render(); @@ -473,7 +473,7 @@ int UtcDaliControlImplTouchEvent(void) DummyControl dummy = DummyControl::New( true ); Impl::DummyControl& dummyImpl = static_cast(dummy.GetImplementation()); - dummy.SetSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -499,7 +499,7 @@ int UtcDaliControlImplTouchEvent(void) { DummyControl dummy = DummyControl::New(); - dummy.SetSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -529,7 +529,7 @@ int UtcDaliControlImplHoverEvent(void) DummyControl dummy = DummyControl::New( true ); Impl::DummyControl& dummyImpl = static_cast(dummy.GetImplementation()); - dummy.SetSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -555,7 +555,7 @@ int UtcDaliControlImplHoverEvent(void) { DummyControl dummy = DummyControl::New(); - dummy.SetSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -726,7 +726,7 @@ int UtcDaliControlImplWheelEvent(void) DummyControl dummy = DummyControl::New( true ); Impl::DummyControl& dummyImpl = static_cast(dummy.GetImplementation()); - dummy.SetSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -752,7 +752,7 @@ int UtcDaliControlImplWheelEvent(void) { DummyControl dummy = DummyControl::New(); - dummy.SetSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -780,7 +780,7 @@ int UtcDaliControlImplSetStyleName(void) { DummyControl dummy = DummyControl::New( true ); - dummy.SetSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp index b46c1fb..6b289af 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp @@ -385,7 +385,7 @@ int UtcDaliControlWrapperCalculateChildSizeBase(void) Actor child = Actor::New(); child.SetResizePolicy( Dali::ResizePolicy::FIXED, Dali::Dimension::ALL_DIMENSIONS ); - child.SetSize(150, 150); + child.SetProperty( Actor::Property::SIZE, Vector2(150, 150) ); application.SendNotification(); application.Render(); @@ -775,7 +775,7 @@ int UtcDaliControlWrapperAnimateVisual(void) controlWrapperImpl->TestRegisterVisual( index, visual ); Stage::GetCurrent().Add( controlWrapper ); - controlWrapper.SetSize( 100, 100 ); + controlWrapper.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) ); application.SendNotification(); application.Render(0); // Trigger animation start diff --git a/automated-tests/src/dali-toolkit/utc-Dali-CubeTransitionEffect.cpp b/automated-tests/src/dali-toolkit/utc-Dali-CubeTransitionEffect.cpp index 1ff061e..a8ce275 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-CubeTransitionEffect.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-CubeTransitionEffect.cpp @@ -129,7 +129,7 @@ int UtcDaliCubeTransitionWaveEffectNew(void) DALI_TEST_CHECK( !waveEffect ); waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); DALI_TEST_CHECK( waveEffect ); @@ -143,7 +143,7 @@ int UtcDaliCubeTransitionWaveEffectNew(void) registry.ObjectCreatedSignal().Connect( &TestCallback ); { CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); } DALI_TEST_CHECK( gObjectCreatedCallBackCalled ); END_TEST; @@ -159,7 +159,7 @@ int UtcDaliCubeTransitionCrossEffectNew(void) DALI_TEST_CHECK( !crossEffect ); crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); DALI_TEST_CHECK( crossEffect ); @@ -173,7 +173,7 @@ int UtcDaliCubeTransitionCrossEffectNew(void) registry.ObjectCreatedSignal().Connect( &TestCallback ); { CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); } DALI_TEST_CHECK( gObjectCreatedCallBackCalled ); END_TEST; @@ -189,7 +189,7 @@ int UtcDaliCubeTransitionFoldEffectNew(void) DALI_TEST_CHECK( !foldEffect ); foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); DALI_TEST_CHECK( foldEffect ); @@ -203,7 +203,7 @@ int UtcDaliCubeTransitionFoldEffectNew(void) registry.ObjectCreatedSignal().Connect( &TestCallback ); { CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); } DALI_TEST_CHECK( gObjectCreatedCallBackCalled ); END_TEST; @@ -216,16 +216,16 @@ int UtcDaliCubeTransitionEffectSetGetTransitionDuration(void) CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); waveEffect.SetTransitionDuration( TRANSITION_DURATION ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); DALI_TEST_EQUALS( TRANSITION_DURATION, waveEffect.GetTransitionDuration(), TEST_LOCATION ); CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); crossEffect.SetTransitionDuration( TRANSITION_DURATION ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); DALI_TEST_EQUALS( TRANSITION_DURATION, crossEffect.GetTransitionDuration(), TEST_LOCATION ); CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); foldEffect.SetTransitionDuration( TRANSITION_DURATION ); DALI_TEST_EQUALS( TRANSITION_DURATION, foldEffect.GetTransitionDuration(), TEST_LOCATION ); END_TEST; @@ -237,12 +237,12 @@ int UtcDaliCubeTransitionEffectSetGetCubeDisplacement(void) tet_infoline(" UtcDaliCubeTransitionEffectSetGetTransitionDuration "); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); DALI_TEST_EQUALS( CUBE_DISPLACEMENT, waveEffect.GetCubeDisplacement(), TEST_LOCATION ); CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); DALI_TEST_EQUALS( CUBE_DISPLACEMENT, crossEffect.GetCubeDisplacement(), TEST_LOCATION ); @@ -261,7 +261,7 @@ int UtcDaliCubeTransitionEffectGetRoot(void) Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); Stage::GetCurrent().Add( waveEffect ); waveEffect.SetCurrentTexture( texture ); waveEffect.SetTargetTexture( texture ); @@ -293,7 +293,7 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void) Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); Stage::GetCurrent().Add( waveEffect ); waveEffect.SetTransitionDuration( TRANSITION_DURATION ); @@ -310,7 +310,7 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void) DALI_TEST_CHECK( !waveEffect.IsTransitioning() ); CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); Stage::GetCurrent().Add( crossEffect ); crossEffect.SetTransitionDuration( TRANSITION_DURATION ); @@ -327,7 +327,7 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void) DALI_TEST_CHECK( !crossEffect.IsTransitioning() ); CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); Stage::GetCurrent().Add( foldEffect ); foldEffect.SetTransitionDuration( TRANSITION_DURATION ); @@ -355,7 +355,7 @@ int UtcDaliCubeTransitionEffectSetCurrentTexture(void) Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); waveEffect.SetCurrentTexture( texture ); Stage::GetCurrent().Add( waveEffect ); @@ -393,7 +393,7 @@ int UtcDaliCubeTransitionEffectSetTargetTexture(void) application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE ); Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); Stage::GetCurrent().Add( waveEffect ); waveEffect.SetCurrentTexture( texture ); @@ -437,7 +437,7 @@ int UtcDaliCubeTransitionWaveEffectStartTransition(void) texture.Upload( pixelData ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); waveEffect.SetTransitionDuration( TRANSITION_DURATION ); waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); waveEffect.SetCurrentTexture( texture ); @@ -494,7 +494,7 @@ int UtcDaliCubeTransitionCrossEffectStartTransition(void) texture.Upload( pixelData ); CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); crossEffect.SetTransitionDuration( TRANSITION_DURATION ); crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); crossEffect.SetCurrentTexture( texture ); @@ -553,7 +553,7 @@ int UtcDaliCubeTransitionFoldEffectStartTransition(void) application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE ); Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 ); CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); foldEffect.SetTransitionDuration( TRANSITION_DURATION ); foldEffect.SetCurrentTexture( texture ); foldEffect.SetTargetTexture( texture ); @@ -613,19 +613,19 @@ int UtcDaliCubeTransitionEffectSignalTransitionCompleted(void) Texture thirdTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); waveEffect.SetTransitionDuration( TRANSITION_DURATION ); waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); Stage::GetCurrent().Add( waveEffect ); CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); crossEffect.SetTransitionDuration( TRANSITION_DURATION ); crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); Stage::GetCurrent().Add( crossEffect ); CubeTransitionEffect foldEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); foldEffect.SetTransitionDuration( TRANSITION_DURATION ); Stage::GetCurrent().Add( foldEffect ); @@ -702,19 +702,19 @@ int UtcDaliCubeTransitionEffectPauseResumeTransition(void) Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); waveEffect.SetTransitionDuration( TRANSITION_DURATION ); waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); Stage::GetCurrent().Add( waveEffect ); CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); crossEffect.SetTransitionDuration( TRANSITION_DURATION ); crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); Stage::GetCurrent().Add( crossEffect ); CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); foldEffect.SetTransitionDuration( TRANSITION_DURATION ); Stage::GetCurrent().Add( foldEffect ); @@ -809,7 +809,7 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void) Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 ); CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS ); - waveEffect.SetSize( VIEW_AREA_SIZE ); + waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); waveEffect.SetTransitionDuration( TRANSITION_DURATION ); waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); waveEffect.SetCurrentTexture( firstTexture ); @@ -875,7 +875,7 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void) Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 ); CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS ); - crossEffect.SetSize( VIEW_AREA_SIZE ); + crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); crossEffect.SetTransitionDuration( TRANSITION_DURATION ); crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT ); crossEffect.SetCurrentTexture( firstTexture ); @@ -946,7 +946,7 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void) Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 ); CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS ); - foldEffect.SetSize( VIEW_AREA_SIZE ); + foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) ); foldEffect.SetTransitionDuration( TRANSITION_DURATION ); foldEffect.SetCurrentTexture( firstTexture ); foldEffect.SetTargetTexture( secondTexture ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp b/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp index 9742cee..07f400a 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp @@ -270,7 +270,7 @@ int UtcDaliDragAndDropDetectorStartSignal(void) Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control = Control::New(); - control.SetSize(100.0f, 100.0f); + control.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); control.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(control); detector.Attach(control); @@ -302,14 +302,14 @@ int UtcDaliDragAndDropDetectorEnteredSignal(void) Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); Control control2 = Control::New(); - control1.SetSize(100.0f,100.0f); - control2.SetSize(100.0f, 100.0f); + control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) ); + control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); - control1.SetPosition(0.0f, 0.0f); - control2.SetPosition(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); @@ -345,14 +345,14 @@ int UtcDaliDragAndDropDetectorMovedSignal(void) Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); Control control2 = Control::New(); - control1.SetSize(100.0f,100.0f); - control2.SetSize(100.0f, 100.0f); + control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) ); + control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); - control1.SetPosition(0.0f, 0.0f); - control2.SetPosition(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); @@ -392,14 +392,14 @@ int UtcDaliDragAndDropDetectorExitedSignal(void) Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); Control control2 = Control::New(); - control1.SetSize(100.0f,100.0f); - control2.SetSize(100.0f, 100.0f); + control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) ); + control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); - control1.SetPosition(0.0f, 0.0f); - control2.SetPosition(0.0f, 100.0f); + control1.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f)); + control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f)); control1.SetProperty( Actor::Property::LEAVE_REQUIRED,true); control2.SetProperty( Actor::Property::LEAVE_REQUIRED,true); @@ -440,14 +440,14 @@ int UtcDaliDragAndDropDetectorDroppedSignal(void) Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); Control control2 = Control::New(); - control1.SetSize(100.0f,100.0f); - control2.SetSize(100.0f, 100.0f); + control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) ); + control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); - control1.SetPosition(0.0f, 0.0f); - control2.SetPosition(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); @@ -488,14 +488,14 @@ int UtcDaliDragAndDropDetectorEndedSignal(void) Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); Control control2 = Control::New(); - control1.SetSize(100.0f,100.0f); - control2.SetSize(100.0f, 100.0f); + control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) ); + control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); - control1.SetPosition(0.0f, 0.0f); - control2.SetPosition(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); @@ -530,14 +530,14 @@ int UtcDaliDragAndDropDetectorGetContent(void) Control control2 = Control::New(); control1.SetProperty( Dali::Actor::Property::NAME,"control1"); control2.SetProperty( Dali::Actor::Property::NAME,"control2"); - control1.SetSize(100.0f,100.0f); - control2.SetSize(100.0f, 100.0f); + control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); + control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); - control1.SetPosition(0.0f, 0.0f); - control2.SetPosition(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); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp index 0c8a10b..2cce946 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp @@ -110,7 +110,7 @@ int UtcDaliEffectsViewAddRemoveDropShadow(void) view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(actor); Stage::GetCurrent().Add(view); @@ -207,7 +207,7 @@ int UtcDaliEffectsViewOnStage(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::EMBOSS); - view.SetSize(100.f, 100.f); + view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) ); Stage stage = Stage::GetCurrent(); DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); @@ -224,7 +224,7 @@ int UtcDaliEffectsViewOffStage(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize(100.f, 100.f); + view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) ); Stage stage = Stage::GetCurrent(); DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); @@ -457,7 +457,7 @@ int UtcDaliEffectsViewSetRefreshOnDemandP(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize(100.f, 100.f); + view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) ); Stage stage = Stage::GetCurrent(); stage.Add( view ); @@ -501,7 +501,7 @@ int UtcDaliEffectsViewSizeSet(void) { EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize( 200.0f, 200.0f, 0.0f ); + view.SetProperty( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f ) ); stage.Add( view ); application.SendNotification(); application.Render(); @@ -510,7 +510,7 @@ int UtcDaliEffectsViewSizeSet(void) { EffectsView view = EffectsView::New(EffectsView::EMBOSS); - view.SetSize( 200.0f, 200.0f, 0.0f ); + view.SetProperty( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f ) ); stage.Add( view ); application.SendNotification(); application.Render(); @@ -520,7 +520,7 @@ int UtcDaliEffectsViewSizeSet(void) { EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize( 200.0f, 200.0f, 0.0f ); + view.SetProperty( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f ) ); stage.Add( view ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-FlexContainer.cpp b/automated-tests/src/dali-toolkit/utc-Dali-FlexContainer.cpp index 26e9585..3f39a5d 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-FlexContainer.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-FlexContainer.cpp @@ -441,7 +441,7 @@ int UtcDaliToolkitFlexContainerMoveFocus(void) RelayoutSignalHandler relayoutSignal(flexContainer); flexContainer.OnRelayoutSignal().Connect(&relayoutSignal, &RelayoutSignalHandler::RelayoutCallback ); - flexContainer.SetSize( stageSize ); + flexContainer.SetProperty( Actor::Property::SIZE, stageSize ); // Create two actors and add them to the container Actor actor1 = Actor::New(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp index afc6aee..c508bcd 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp @@ -146,7 +146,7 @@ int UtcDaliGaussianBlurViewAddRemove(void) view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(actor); Stage::GetCurrent().Add(view); @@ -171,7 +171,7 @@ int UtcDaliGaussianBlurActivateDeactivate(void) DALI_TEST_CHECK( 1u == taskList.GetTaskCount() ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.Activate(); @@ -202,7 +202,7 @@ int UtcDaliGaussianBlurActivateDeactivateRepeat(void) DALI_TEST_CHECK( view ); view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.Activate(); @@ -254,7 +254,7 @@ int UtcDaliGaussianBlurViewSetGetRenderTarget(void) DALI_TEST_CHECK( view ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.Activate(); @@ -281,7 +281,7 @@ int UtcDaliGaussianBlurViewActivateOnce1(void) DALI_TEST_CHECK( 1u == taskList.GetTaskCount() ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.ActivateOnce(); @@ -306,7 +306,7 @@ int UtcDaliGaussianBlurActivateOnce2(void) DALI_TEST_CHECK( view ); view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.ActivateOnce(); @@ -335,7 +335,7 @@ int UtcDaliGaussianBlurViewFinishedSignalN(void) DALI_TEST_CHECK( view ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.Activate(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp index 0422166..90af333 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp @@ -412,8 +412,8 @@ int UtcDaliImageAtlasImageView(void) imageView2.SetProperty( ImageView::Property::IMAGE, imageMap2 ); // ImageView doesn't do size negotiation properly: it only listens to OnSizeSet: - imageView1.SetSize( 100, 100 ); - imageView2.SetSize( 100, 100 ); + imageView1.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) ); + imageView2.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) ); imageView1.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); imageView2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp index 9e811c8..6829d98 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp @@ -646,7 +646,7 @@ int UtcDaliImageViewAsyncLoadingWithoutAltasing(void) // By default, Aysnc loading is used Stage::GetCurrent().Add( imageView ); - imageView.SetSize(100, 100); + imageView.SetProperty( Actor::Property::SIZE, Vector2(100, 100) ); imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION ); @@ -1887,7 +1887,7 @@ int UtcDaliImageViewPaddingProperty(void) ImageView childImage = ImageView::New(); childImage.SetBackgroundColor( Color::BLACK ); - childImage.SetSize( 10.f, 10.f ); + childImage.SetProperty( Actor::Property::SIZE, Vector2( 10.f, 10.f ) ); imageView.Add( childImage ); application.SendNotification(); @@ -2171,7 +2171,7 @@ int UtcDaliImageViewFittingModeFitKeepAspectRatio(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE , Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO ); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(600,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) ); Stage::GetCurrent().Add( imageView ); @@ -2218,7 +2218,7 @@ int UtcDaliImageViewFittingModesFill(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE , Toolkit::DevelVisual::FILL ); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(600,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) ); Stage::GetCurrent().Add( imageView ); @@ -2264,7 +2264,7 @@ int UtcDaliImageViewFittingModesOverfitKeepAspectRatio(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE , Toolkit::DevelVisual::OVER_FIT_KEEP_ASPECT_RATIO ); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(600,500); + imageView.SetProperty( Actor::Property::SIZE, Vector2(600,500) ); Stage::GetCurrent().Add( imageView ); @@ -2311,7 +2311,7 @@ int UtcDaliImageViewFittingModesCenter01(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::CENTER); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(700,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) ); Stage::GetCurrent().Add( imageView ); @@ -2357,7 +2357,7 @@ int UtcDaliImageViewFittingModesCenter02(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::CENTER); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(700,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) ); Stage::GetCurrent().Add( imageView ); @@ -2402,7 +2402,7 @@ int UtcDaliImageViewFittingModesFitHeight01(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_HEIGHT); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(600,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) ); Stage::GetCurrent().Add( imageView ); @@ -2447,7 +2447,7 @@ int UtcDaliImageViewFittingModesFitHeight02(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_HEIGHT); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(700,600); + imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) ); Stage::GetCurrent().Add( imageView ); @@ -2492,7 +2492,7 @@ int UtcDaliImageViewFittingModesFitWidth01(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_WIDTH); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(600,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) ); Stage::GetCurrent().Add( imageView ); @@ -2537,7 +2537,7 @@ int UtcDaliImageViewFittingModesFitWidth02(void) imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_WIDTH); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(700,600); + imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) ); Stage::GetCurrent().Add( imageView ); @@ -2584,7 +2584,7 @@ int UtcDaliImageViewFittingModesChangeFittingMode01(void) imageMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO; imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(800,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) ); Stage::GetCurrent().Add( imageView ); @@ -2620,7 +2620,7 @@ int UtcDaliImageViewFittingModesChangeFittingMode01(void) imageMap2[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::CENTER; imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 ); - imageView.SetSize(800,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) ); Stage::GetCurrent().Add( imageView ); @@ -2659,7 +2659,7 @@ int UtcDaliImageViewFittingModesChangeFittingMode01(void) imageMap3[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO; imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 ); - imageView.SetSize(800,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) ); Stage::GetCurrent().Add( imageView ); @@ -2706,7 +2706,7 @@ int UtcDaliImageViewFittingModesChangeFittingMode02(void) imageMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::OVER_FIT_KEEP_ASPECT_RATIO; imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(800,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) ); Stage::GetCurrent().Add( imageView ); @@ -2742,7 +2742,7 @@ int UtcDaliImageViewFittingModesChangeFittingMode02(void) imageMap2[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::CENTER; imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 ); - imageView.SetSize(800,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) ); Stage::GetCurrent().Add( imageView ); @@ -2781,7 +2781,7 @@ int UtcDaliImageViewFittingModesChangeFittingMode02(void) imageMap3[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::OVER_FIT_KEEP_ASPECT_RATIO; imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 ); - imageView.SetSize(800,700); + imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) ); Stage::GetCurrent().Add( imageView ); @@ -2825,7 +2825,7 @@ int UtcDaliImageViewFittingModesWithAnimatedVectorImageVisual(void) imageMap.Add( Toolkit::ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME ); // 249x169 image imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap ); - imageView.SetSize(600,600); + imageView.SetProperty( Actor::Property::SIZE, Vector2(600,600) ); Stage::GetCurrent().Add( imageView ); @@ -3114,8 +3114,8 @@ int UtcDaliImageViewLoadRemoteSVG(void) imageView.SetImage("https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/SVG_logo.svg/64px-SVG_logo.svg.png"); imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - imageView.SetSize(300, 300); - imageView.SetPosition( 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 ); @@ -3260,7 +3260,7 @@ int UtcDaliImageViewSvgLoadingFailure(void) gResourceReadySignalFired = false; ImageView imageView = ImageView::New( TEST_RESOURCE_DIR "/Kid1.svg" ); - imageView.SetSize( 200.f, 200.f ); + imageView.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); imageView.ResourceReadySignal().Connect( &ResourceReadySignal); DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION ); @@ -3285,7 +3285,7 @@ int UtcDaliImageViewSvgLoadingFailure(void) gResourceReadySignalFired = false; ImageView imageView = ImageView::New( "https://bar.org/foobar.svg" ); - imageView.SetSize( 200.f, 200.f ); + imageView.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); imageView.ResourceReadySignal().Connect( &ResourceReadySignal); DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp index 3b885b8..0bd2225 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp @@ -74,7 +74,7 @@ Actor CreateActorWithImageVisual(const Property::Map& map) Visual::Base visual = factory.CreateVisual( map ); DALI_TEST_CHECK( visual ); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); return actor; } @@ -112,7 +112,7 @@ void TestVisualRender( ToolkitTestApplication& application, application.GetPlatform().SetClosestImageSize( Vector2(imageDimensions.GetWidth(), imageDimensions.GetHeight()) ); } - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -181,7 +181,7 @@ int UtcDaliImageVisualPropertyMap(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -237,7 +237,7 @@ int UtcDaliImageVisualNoPremultipliedAlpha01(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -294,7 +294,7 @@ int UtcDaliImageVisualNoPremultipliedAlpha02(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -340,7 +340,7 @@ int UtcDaliImageVisualNoPremultipliedAlpha02(void) DummyControlImpl& newDummyImpl = static_cast< DummyControlImpl& >( newActor.GetImplementation() ); newDummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, newVisual ); - newActor.SetSize( 200.f, 200.f ); + newActor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( newActor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( newActor ); @@ -397,7 +397,7 @@ int UtcDaliImageVisualRemoteImageLoad(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -639,7 +639,7 @@ int UtcDaliImageVisualCustomWrapModePixelArea(void) DummyControl actor = DummyControl::New(); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize(2000, 2000); + actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) ); actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Stage::GetCurrent().Add( actor ); @@ -717,7 +717,7 @@ int UtcDaliImageVisualCustomWrapModeNoAtlas(void) DummyControl actor = DummyControl::New(); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize(2000, 2000); + actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) ); actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Stage::GetCurrent().Add( actor ); @@ -775,7 +775,7 @@ int UtcDaliImageVisualAnimateMixColor(void) Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(2000, 2000); + 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); @@ -855,7 +855,7 @@ int UtcDaliImageVisualAnimateOpacity(void) Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(2000, 2000); + 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); @@ -967,7 +967,7 @@ int UtcDaliImageVisualAnimateOpacity02(void) Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(2000, 2000); + actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) ); actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); actor.SetProperty( Actor::Property::COLOR,Color::BLACK); @@ -1054,7 +1054,7 @@ int UtcDaliImageVisualAnimatePixelArea(void) Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(2000, 2000); + 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); @@ -1203,7 +1203,7 @@ int UtcDaliImageVisualSetInvalidAsyncImage(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -1247,7 +1247,7 @@ int UtcDaliImageVisualSetInvalidSyncImage(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -1288,7 +1288,7 @@ int UtcDaliImageVisualSetInvalidRemoteImage(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -1339,7 +1339,7 @@ int UtcDaliImageVisualAlphaMask(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION ); @@ -1394,7 +1394,7 @@ int UtcDaliImageVisualSynchronousLoadAlphaMask(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION ); @@ -1451,7 +1451,7 @@ int UtcDaliImageVisualRemoteAlphaMask(void) DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -1505,7 +1505,7 @@ int UtcDaliImageVisualAlphaMaskCrop(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION ); @@ -1548,7 +1548,7 @@ int UtcDaliImageVisualReleasePolicy01(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); imageVisual.Reset(); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); application.SendNotification(); application.Render(0); @@ -1598,7 +1598,7 @@ int UtcDaliImageVisualReleasePolicy02(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive. - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); application.SendNotification(); application.Render(0); @@ -1649,7 +1649,7 @@ int UtcDaliImageVisualReleasePolicy03(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive. - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); application.SendNotification(); application.Render(0); @@ -1704,7 +1704,7 @@ int UtcDaliImageVisualReleasePolicy04(void) imageVisualNever.Reset(); // reduce ref count so only the control keeps the visual alive. imageVisualDestroyed.Reset(); // reduce ref count so only the control keeps the visual alive. - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); // Test initially zero renderers application.SendNotification(); @@ -1788,7 +1788,7 @@ int UtcDaliImageVisualReleasePolicy06(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive. - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); application.SendNotification(); application.Render(0); @@ -1854,7 +1854,7 @@ int UtcDaliImageVisualReleasePolicy07(void) imageVisualDestroyed.Reset(); // reduce ref count so only the control keeps the visual alive. imageVisualDetached.Reset(); // reduce ref count so only the control keeps the visual alive. - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); // Test initially zero renderers application.SendNotification(); @@ -1937,7 +1937,7 @@ int UtcDaliImageVisualLoadPolicy01(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive. - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); Stage::GetCurrent().Add( actor ); tet_infoline( "Ensure nothing triggers another load as texure already loaded" ); const unsigned int TIME_OUT_3_SECONDS = 3; @@ -1991,7 +1991,7 @@ int UtcDaliImageVisualLoadPolicy02(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive. - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); Stage::GetCurrent().Add( actor ); tet_infoline( "Allow image time to load" ); DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION ); @@ -2031,7 +2031,7 @@ int UtcDaliImageVisualLoadPolicy03(void) DummyControl actor = DummyControl::New(true); actor.ResourceReadySignal().Connect( &ResourceReadySignal); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); tet_infoline( "Create visual with IMMEDIATE load policy" ); Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE ); @@ -2069,7 +2069,7 @@ int UtcDaliImageVisualLoadPolicy04(void) DummyControl actor = DummyControl::New(true); actor.ResourceReadySignal().Connect( &ResourceReadySignal); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); tet_infoline( "Create visual with IMMEDIATE load policy" ); Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE ); @@ -2098,7 +2098,7 @@ int UtcDaliImageVisualLoadPolicy04(void) tet_infoline( "Registering visual this should trigger the loading signal as is already image loaded for previous control" ); dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 ); imageVisual2.Reset(); // reduce ref count so only the control keeps the visual alive. - actor2.SetSize(200.f, 200.f); + actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 0 ), true, TEST_LOCATION ); // Not expecting any further loading as texture is being reused. DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION ); @@ -2119,7 +2119,7 @@ int UtcDaliImageVisualLoadPolicy05(void) DummyControl actor = DummyControl::New(true); actor.ResourceReadySignal().Connect( &ResourceReadySignal); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); Stage::GetCurrent().Add( actor ); tet_infoline( "Create visual with ATTACHED load policy" ); @@ -2149,7 +2149,7 @@ int UtcDaliImageVisualLoadPolicy05(void) tet_infoline( "Registering visual this should trigger the loading signal as is already image loaded for previous control" ); dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 ); imageVisual2.Reset(); // reduce ref count so only the control keeps the visual alive. - actor2.SetSize(200.f, 200.f); + actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 0 ), true, TEST_LOCATION ); // Not expecting any further loading as texture is being reused. DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION ); @@ -2239,7 +2239,7 @@ int UtcDaliImageVisualCustomShader(void) Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummy.SetSize( 200.f, 200.f ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy ); @@ -2271,7 +2271,7 @@ int UtcDaliImageVisualCustomShader(void) DummyControl dummy1 = DummyControl::New( true ); Impl::DummyControl& dummyImpl1 = static_cast< Impl::DummyControl& >( dummy1.GetImplementation() ); dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 ); - dummy1.SetSize( 200, 200 ); + dummy1.SetProperty( Actor::Property::SIZE, Vector2( 200, 200 ) ); dummy1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy1 ); @@ -2331,7 +2331,7 @@ int UtcDaliImageVisualLoadReady01(void) int actor1Id = actor.GetId(); actor.ResourceReadySignal().Connect( &ResourceReadySignal); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); Stage::GetCurrent().Add(actor); tet_infoline( "Create visual with IMMEDIATE load policy" ); @@ -2366,7 +2366,7 @@ int UtcDaliImageVisualLoadReady01(void) tet_infoline( "Registering visual this should trigger the ready signal when the image fails to load" ); dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 ); - actor2.SetSize(200.f, 200.f); + actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) ); Stage::GetCurrent().Add(actor2); tet_infoline( "Wait for loading thread to finish"); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp index 6af032c..f5e6da8 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp @@ -539,7 +539,7 @@ int UtcDaliItemViewScrollToItem(void) view.SetProperty( Dali::Actor::Property::NAME,"view actor"); view.AddLayout(*layout); - view.SetSize(vec); + view.SetProperty( Actor::Property::SIZE, vec ); Stage::GetCurrent().Add(view); layout->SetOrientation(ControlOrientation::Down); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp b/automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp index 4686512..0e006ec 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp @@ -158,7 +158,7 @@ int UtcDaliKeyInputFocusManagerSetFocus01(void) DummyControl dummy = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(dummy.GetImplementation()); - dummy.SetSize(100.0f, 100.0f); + dummy.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); stage.Add( dummy ); DALI_TEST_CHECK( ! dummyImpl.keyInputFocusGained ); @@ -185,7 +185,7 @@ int UtcDaliKeyInputFocusManagerSetFocus02(void) DummyControl dummy1 = DummyControl::New(true); Impl::DummyControl& dummy1Impl = static_cast(dummy1.GetImplementation()); - dummy1.SetSize(100.0f, 100.0f); + dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); stage.Add( dummy1 ); DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained ); DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost ); @@ -197,7 +197,7 @@ int UtcDaliKeyInputFocusManagerSetFocus02(void) DummyControl dummy2 = DummyControl::New(true); Impl::DummyControl& dummy2Impl = static_cast(dummy2.GetImplementation()); - dummy2.SetSize(100.0f, 100.0f); + dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); stage.Add( dummy2 ); DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained ); DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost ); @@ -228,20 +228,20 @@ int UtcDaliKeyInputFocusManagerKeyEventPropagation01(void) stage.KeyEventSignal().Connect( &stageCallback, &KeyEventCallback::Callback ); DummyControl dummy1 = DummyControl::New(true); - dummy1.SetSize(100.0f, 100.0f); + dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); KeyEventCallback callback1( false ); dummy1.KeyEventSignal().Connect( &callback1, &KeyEventCallback::Callback ); stage.Add( dummy1 ); DummyControl dummy2 = DummyControl::New(true); - dummy2.SetSize(100.0f, 100.0f); + dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); KeyEventCallback callback2( false ); dummy2.KeyEventSignal().Connect( &callback2, &KeyEventCallback::Callback ); dummy1.Add( dummy2 ); DummyControl dummy3 = DummyControl::New(true); Impl::DummyControl& dummy3Impl = static_cast(dummy3.GetImplementation()); - dummy3.SetSize(100.0f, 100.0f); + dummy3.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); KeyEventCallback callback3( false ); dummy3.KeyEventSignal().Connect( &callback3, &KeyEventCallback::Callback ); dummy2.Add( dummy3 ); @@ -274,20 +274,20 @@ int UtcDaliKeyInputFocusManagerKeyEventPropagation02(void) DALI_TEST_CHECK(manager); DummyControl dummy1 = DummyControl::New(true); - dummy1.SetSize(100.0f, 100.0f); + dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); KeyEventCallback callback1( false ); dummy1.KeyEventSignal().Connect( &callback1, &KeyEventCallback::Callback ); stage.Add( dummy1 ); DummyControl dummy2 = DummyControl::New(true); - dummy2.SetSize(100.0f, 100.0f); + dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); KeyEventCallback callback2( true ); dummy2.KeyEventSignal().Connect( &callback2, &KeyEventCallback::Callback ); dummy1.Add( dummy2 ); DummyControl dummy3 = DummyControl::New(true); Impl::DummyControl& dummy3Impl = static_cast(dummy3.GetImplementation()); - dummy3.SetSize(100.0f, 100.0f); + dummy3.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); KeyEventCallback callback3( false ); dummy3.KeyEventSignal().Connect( &callback3, &KeyEventCallback::Callback ); dummy2.Add( dummy3 ); @@ -319,14 +319,14 @@ int UtcDaliKeyInputFocusManagerGetCurrentFocusControl(void) DummyControl dummy1 = DummyControl::New(true); Impl::DummyControl& dummy1Impl = static_cast(dummy1.GetImplementation()); - dummy1.SetSize(100.0f, 100.0f); + dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); stage.Add( dummy1 ); DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained ); DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost ); DummyControl dummy2 = DummyControl::New(true); Impl::DummyControl& dummy2Impl = static_cast(dummy2.GetImplementation()); - dummy2.SetSize(100.0f, 100.0f); + dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); stage.Add( dummy2 ); DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained ); DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusLost ); @@ -371,7 +371,7 @@ int UtcDaliKeyInputFocusManagerRemoveFocus(void) DummyControl dummy1 = DummyControl::New(true); Impl::DummyControl& dummy1Impl = static_cast(dummy1.GetImplementation()); - dummy1.SetSize(100.0f, 100.0f); + dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); stage.Add( dummy1 ); DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained ); DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Magnifier.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Magnifier.cpp index c8e0774..a451e34 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Magnifier.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Magnifier.cpp @@ -268,7 +268,7 @@ int UtcDaliMagnifierOnSizeSet(void) application.Render(); Vector3 size( 200.0f, 300.0f, 0.0f ); - view.SetSize( size ); + view.SetProperty( Actor::Property::SIZE, size ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Model3dView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Model3dView.cpp index e155ce8..9cce9fc 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Model3dView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Model3dView.cpp @@ -142,7 +142,7 @@ int UtcDaliModelViewAddRemove(void) view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(actor); Stage::GetCurrent().Add(view); @@ -205,7 +205,7 @@ int UtcDaliModelOnSizeSet(void) application.Render(); Vector3 size( 200.0f, 300.0f, 0.0f ); - view.SetSize( size ); + view.SetProperty( Actor::Property::SIZE, size ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp index 08f601e..02c9469 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp @@ -600,8 +600,8 @@ int UtcDaliPopupShowHide(void) Actor container = Actor::New(); PushButton button1 = PushButton::New(); PushButton button2 = PushButton::New(); - button1.SetSize( DEFAULT_BUTTON_SIZE.GetVectorXY() ); - button2.SetSize( DEFAULT_BUTTON_SIZE.GetVectorXY() ); + button1.SetProperty( Actor::Property::SIZE, DEFAULT_BUTTON_SIZE.GetVectorXY() ); + button2.SetProperty( Actor::Property::SIZE, DEFAULT_BUTTON_SIZE.GetVectorXY() ); container.Add( button1 ); container.Add( button2 ); popup.SetFooter( container ); @@ -678,7 +678,7 @@ int UtcDaliPopupOnTouchedOutsideSignal(void) popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); popup.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::CENTER ); popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); - popup.SetSize( 50.0f, 50.0f ); + popup.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) ); popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f ); Stage::GetCurrent().Add( popup ); popup.OutsideTouchedSignal().Connect( &OnPopupTouchedOutside ); @@ -738,7 +738,7 @@ int UtcDaliPopupPropertyAutoHide(void) Actor container = Actor::New(); PushButton button1 = PushButton::New(); - button1.SetSize( DEFAULT_BUTTON_SIZE.GetVectorXY() ); + button1.SetProperty( Actor::Property::SIZE, DEFAULT_BUTTON_SIZE.GetVectorXY() ); container.Add( button1 ); popup.SetFooter( container ); @@ -957,7 +957,7 @@ int UtcDaliPopupPropertyContextualMode(void) Actor placement = Actor::New(); placement.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); placement.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - placement.SetSize( 1.0f, 1.0f ); + placement.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) ); placement.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); Stage::GetCurrent().Add( placement ); @@ -1169,14 +1169,14 @@ int UtcDaliPopupPropertyTouchTransparent(void) popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f ); popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - popup.SetSize( 100, 100 ); + popup.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); // Create a button (to go underneath the popup). PushButton button = Toolkit::PushButton::New(); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - button.SetSize( 100, 100 ); + button.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); button.ClickedSignal().Connect( &PushButtonClicked ); @@ -1240,7 +1240,7 @@ int UtcDaliPopupPropertyTail(void) Popup popup = Popup::New(); popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - popup.SetSize( 100, 100 ); + popup.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); TextLabel content = TextLabel::New( "text" ); popup.SetContent( content ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp index cb035cd..916fb13 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp @@ -125,8 +125,8 @@ int UtcDaliProgressBarSignals(void) Stage::GetCurrent().Add( progressBar ); progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); - progressBar.SetPosition( 0.0f, 0.0f ); + progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); + progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged ); progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.2f); @@ -155,8 +155,8 @@ int UtcDaliProgressBarSetPropertyP(void) ProgressBar progressBar = ProgressBar::New(); progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); - progressBar.SetPosition( 0.0f, 0.0f ); + progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); + progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged ); Stage::GetCurrent().Add(progressBar); application.SendNotification(); @@ -302,8 +302,8 @@ int UtcDaliProgressBarSetPropertyP1(void) ProgressBar progressBar = ProgressBar::New(); progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); - progressBar.SetPosition( 0.0f, 0.0f ); + progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); + progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged ); Stage::GetCurrent().Add(progressBar); @@ -375,7 +375,7 @@ int UtcDaliProgressBarSetPropertyP2(void) ProgressBar progressBar = ProgressBar::New(); progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - progressBar.SetPosition( 0.0f, 0.0f ); + progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, "test"); progressBar.SetProperty(ProgressBar::Property::INDETERMINATE, true); progressBar.SetProperty(ProgressBar::Property::TRACK_VISUAL, trackImage); @@ -395,7 +395,7 @@ int UtcDaliProgressBarSetPropertyP2(void) progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, 0.3f); progressBar.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); + progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); Stage::GetCurrent().Add(progressBar); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp index de95e55..2b6921a 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp @@ -135,7 +135,7 @@ void SetupButtonForTestTouchEvents( ToolkitTestApplication& application, Button& { button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - button.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); + 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 ); @@ -466,8 +466,8 @@ int UtcDaliPushButtonPressed(void) PushButton pushButton = PushButton::New(); pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, 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::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); + pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ); Stage::GetCurrent().Add( pushButton ); @@ -499,8 +499,8 @@ int UtcDaliPushButtonReleased(void) PushButton pushButton = PushButton::New(); pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, 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::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); + pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ); Stage::GetCurrent().Add( pushButton ); @@ -582,8 +582,8 @@ int UtcDaliPushButtonSelected(void) PushButton pushButton = PushButton::New(); pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, 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::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); + pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ); Stage::GetCurrent().Add( pushButton ); @@ -749,7 +749,7 @@ int UtcDaliPushButtonPaddingLayout(void) pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - pushButton.SetPosition( 0.0f, 0.0f ); + pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); Stage::GetCurrent().Add( pushButton ); @@ -798,7 +798,7 @@ int UtcDaliPushButtonPaddingLayout(void) pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - pushButton.SetPosition( 0.0f, 0.0f ); + pushButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); Stage::GetCurrent().Add( pushButton ); @@ -896,7 +896,7 @@ int UtcDaliPushButtonAlignmentLayout(void) pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - pushButton.SetPosition( 0.0f, 0.0f ); + 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 ); @@ -1384,4 +1384,4 @@ int UtcDaliPushButtonSetLabelText(void) DALI_TEST_EQUALS(GetButtonText( pushButton ), STR, TEST_LOCATION); END_TEST; -} \ No newline at end of file +} diff --git a/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp index 85c791a..bf33b39 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp @@ -188,7 +188,7 @@ int UtcDaliRadioButtonSelectedProperty(void) Stage::GetCurrent().Add( radioButton ); radioButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); radioButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - radioButton.SetPosition( 0.0f, 0.0f ); + radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); // Default selected DALI_TEST_CHECK( radioButton.GetProperty( Button::Property::SELECTED ) == false ); @@ -209,19 +209,19 @@ int UtcDaliRadioButtonSelectedProperty(void) RadioButton radioButton2 = RadioButton::New( "label" ); radioButton2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); radioButton2.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - radioButton2.SetPosition( 0.0f, 0.0f ); + radioButton2.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); RadioButton radioButton3 = RadioButton::New( "label" ); radioButton3.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); radioButton3.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - radioButton3.SetPosition( 0.0f, 40.0f ); + radioButton3.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 40.0f )); Actor radioGroup = Actor::New(); Stage::GetCurrent().Add( radioGroup ); radioGroup.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); radioGroup.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - radioGroup.SetPosition( 0.0f, 0.0f ); - radioGroup.SetSize( 400.0f, 400.0 ); + radioGroup.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); + radioGroup.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0 ) ); radioGroup.Add( radioButton2 ); radioGroup.Add( radioButton3 ); @@ -334,4 +334,4 @@ int UtcDaliRadioButtonSelectedProperty(void) } END_TEST; -} \ No newline at end of file +} diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp index 9413723..4e00368 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp @@ -272,7 +272,7 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void) DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical ); float scrollBarHeight = 100.0f; - scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) ); Stage::GetCurrent().Add( scrollBar ); // Create a source actor that owns the scroll properties required by the scroll bar @@ -517,7 +517,7 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void) scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); Stage::GetCurrent().Add( scrollBar ); @@ -701,7 +701,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void) DALI_TEST_CHECK( scrollBar ); float scrollBarHeight = 100.0f; - scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) ); Stage::GetCurrent().Add( scrollBar ); // Create a source actor that owns the scroll properties required by the scroll bar @@ -793,7 +793,7 @@ int UtcDaliToolkitScrollBarSetIndicatorFixedHeightP(void) DALI_TEST_CHECK( scrollBar ); float scrollBarHeight = 100.0f; - scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) ); Stage::GetCurrent().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); @@ -1675,7 +1675,7 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void) scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); // Set the indicator height to be fixed to 50.0f scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); @@ -1733,7 +1733,7 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void) scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); // Set the indicator height to be fixed to 50.0f scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); @@ -1800,7 +1800,7 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); Stage::GetCurrent().Add( scrollBar ); ConnectionTracker connectionTracker; @@ -1916,7 +1916,7 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void) scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); Stage::GetCurrent().Add( scrollBar ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp index 29c22a0..22f2181 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp @@ -590,10 +590,10 @@ int UtcDaliToolkitScrollModeP1(void) // Do not rely on stage size for UTC tests. Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( viewPageSize ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers. Property::Map rulerMap; @@ -647,10 +647,10 @@ int UtcDaliToolkitScrollModeP2(void) // Do not rely on stage size for UTC tests. Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( viewPageSize ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers. Property::Map rulerMap; @@ -705,10 +705,10 @@ int UtcDaliToolkitScrollModeP3(void) // Do not rely on stage size for UTC tests. Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( viewPageSize ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f )); // Position rulers. Property::Map rulerMap; @@ -762,10 +762,10 @@ int UtcDaliToolkitScrollModeP4(void) // Do not rely on stage size for UTC tests. Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( viewPageSize ); + 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.SetPosition( 0.0f, 0.0f, 0.0f ); + 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,7 +1054,7 @@ int UtcDaliToolkitScrollViewSignalsUpdate01(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1070,7 +1070,7 @@ int UtcDaliToolkitScrollViewSignalsUpdate01(void) scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete ); Actor image = Actor::New(); - image.SetSize(stageSize); + 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); @@ -1116,7 +1116,7 @@ int UtcDaliToolkitScrollViewSignalsUpdate02(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1136,7 +1136,7 @@ int UtcDaliToolkitScrollViewSignalsUpdate02(void) DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollCompleted", CallbackFunctor(&scrollCompleted) )); Actor image = Actor::New(); - image.SetSize(stageSize); + 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); @@ -1183,7 +1183,7 @@ int UtcDaliToolkitScrollViewScrollSensitive(void) scrollView.SetOvershootEnabled(true); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1230,7 +1230,7 @@ int UtcDaliToolkitScrollViewAxisAutoLock(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1335,7 +1335,7 @@ int UtcDaliToolkitScrollViewConstraints(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -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,7 +1380,7 @@ int UtcDaliToolkitScrollViewBind(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -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,7 +1441,7 @@ int UtcDaliToolkitScrollViewOvershoot(void) Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1573,7 +1573,7 @@ int UtcDaliToolkitScrollViewSnapStartedSignalP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1643,7 +1643,7 @@ int UtcDaliToolkitScrollViewSetMaxOvershootP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1734,7 +1734,7 @@ int UtcDaliToolkitScrollViewSetScrollingDirectionP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -1820,7 +1820,7 @@ int UtcDaliToolkitScrollViewRemoveScrollingDirectionP(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -2643,7 +2643,7 @@ int UtcDaliToolkitScrollViewConstraintsMove(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -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,7 +2688,7 @@ int UtcDaliToolkitScrollViewConstraintsWrap(void) ScrollView scrollView = ScrollView::New(); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - scrollView.SetSize(stageSize); + scrollView.SetProperty( Actor::Property::SIZE, stageSize); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); @@ -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); @@ -2744,10 +2744,10 @@ int UtcDaliToolkitScrollViewGesturePageLimit(void) // Do not rely on stage size for UTC tests. Vector2 viewPageSize( 720.0f, 1280.0f ); scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - scrollView.SetSize( viewPageSize ); + scrollView.SetProperty( Actor::Property::SIZE, viewPageSize ); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - scrollView.SetPosition( 0.0f, 0.0f, 0.0f ); + 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. diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp index 2933067..911e537 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp @@ -137,7 +137,7 @@ ScrollView SetupTestScrollView(int rows, int columns, Vector2 size) Constraint constraint; ScrollView scrollView = ScrollView::New(); - scrollView.SetSize(size); + scrollView.SetProperty( Actor::Property::SIZE, size); scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); @@ -176,7 +176,7 @@ ScrollView SetupTestScrollView(int rows, int columns, Vector2 size) Actor container = Actor::New(); container.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); container.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); - container.SetSize( size ); + container.SetProperty( Actor::Property::SIZE, size ); scrollView.Add( container ); constraint = Constraint::New( container, Actor::Property::SIZE, EqualToConstraint() ); @@ -195,7 +195,7 @@ ScrollView SetupTestScrollView(int rows, int columns, Vector2 size) constraint.Apply(); page.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); page.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - page.SetPosition( column * size.x, row * size.y ); + page.SetProperty( Actor::Property::POSITION, Vector2( column * size.x, row * size.y )); container.Add(page); gPages.push_back(page); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ShadowView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ShadowView.cpp index acc3411..d6cbe0e 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ShadowView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ShadowView.cpp @@ -119,7 +119,7 @@ int UtcDaliShadowViewAddRemove(void) view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(actor); Stage::GetCurrent().Add(view); @@ -144,7 +144,7 @@ int UtcDaliShadowViewActivateDeactivate(void) DALI_TEST_CHECK( 1u == taskList.GetTaskCount() ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); view.Add(Actor::New()); Stage::GetCurrent().Add(view); view.Activate(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp index 74e5ff1..1fdf9c0 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp @@ -131,8 +131,8 @@ int UtcDaliSliderSignals1(void) Stage::GetCurrent().Add( slider ); slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); - slider.SetPosition( 0.0f, 0.0f ); + slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); + slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); const float MIN_BOUND = 0.0f; const float MAX_BOUND = 1.0f; @@ -228,8 +228,8 @@ int UtcDaliSliderSignals2(void) Stage::GetCurrent().Add( slider ); slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); - slider.SetPosition( 0.0f, 0.0f ); + slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); + slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); const float MIN_BOUND = 0.0f; const float MAX_BOUND = 1.0f; @@ -291,8 +291,8 @@ int UtcDaliSetPropertyP(void) Slider slider = Slider::New(); slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); - slider.SetPosition( 0.0f, 0.0f ); + slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) ); + slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); Stage::GetCurrent().Add(slider); application.SendNotification(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp index 664c2a8..247fa58 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp @@ -192,7 +192,7 @@ int UtcDaliSuperBlurViewSetTexture(void) tet_infoline(" UtcDaliSuperBlurViewSetTexture "); SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS ); - blurView.SetSize( 100.f, 100.f ); + blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 ); blurView.SetTexture( inputTexture ); @@ -220,7 +220,7 @@ int UtcDaliSuperBlurViewSetTexture2(void) tet_infoline(" UtcDaliSuperBlurViewSetTexture2 - test setting a second texture "); SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS ); - blurView.SetSize( 100.f, 100.f ); + blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); tet_infoline("Call SetTexture and add blurview to stage"); Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 ); @@ -279,7 +279,7 @@ int UtcDaliSuperBlurViewSetProperty(void) SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS ); // create renderers for the original image and each blurred image Stage::GetCurrent().Add( blurView ); - blurView.SetSize( 100.f, 100.f ); + blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); // Will create ResourceImage blurView.SetProperty(SuperBlurView::Property::IMAGE_URL, TEST_IMAGE_FILE_NAME); @@ -303,7 +303,7 @@ int UtcDaliSuperBlurViewGetProperty(void) tet_infoline(" UtcDaliSuperBlurViewSetProperty "); SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS ); - blurView.SetSize( 100.f, 100.f ); + blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); blurView.SetProperty(SuperBlurView::Property::IMAGE_URL, TEST_IMAGE_FILE_NAME); Wait(application); @@ -360,7 +360,7 @@ int UtcDaliSuperBlurViewGetBlurredTexture(void) tet_infoline( "UtcDaliSuperBlurViewGetBlurredTexture" ); SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS ); - blurView.SetSize( 100.f,100.f ); + blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 100, 100 ); blurView.SetTexture( inputTexture ); @@ -386,7 +386,7 @@ int UtcDaliSuperBlurViewBlurSignal(void) tet_infoline(" UtcDaliSuperBlurViewSignal "); SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS ); - blurView.SetSize( 100.f, 100.f ); + blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 ); blurView.SetTexture( inputTexture ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp index 9f599a1..e0c1cdc 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp @@ -73,15 +73,15 @@ static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor& DALI_TEST_CHECK( tableView ); Stage::GetCurrent().Add( tableView ); - tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) ); + tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); actor1 = Actor::New(); actor2 = Actor::New(); actor3 = Actor::New(); - actor1.SetSize( CELL_SIZE ); - actor2.SetSize( CELL_SIZE ); - actor3.SetSize( CELL_SIZE ); + actor1.SetProperty( Actor::Property::SIZE, CELL_SIZE ); + actor2.SetProperty( Actor::Property::SIZE, CELL_SIZE ); + actor3.SetProperty( Actor::Property::SIZE, CELL_SIZE ); tableView.AddChild( actor1, TableView::CellPosition( 0, 0 ) ); tableView.AddChild( actor2, TableView::CellPosition( 0, 1 ) ); @@ -606,7 +606,7 @@ int UtcDaliTableViewSetGetProperty(void) // Create a 1x1 table-view TableView tableView = TableView::New(1,1); - tableView.SetSize( Vector2( 100.0f, 100.0f ) ); + tableView.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); DALI_TEST_CHECK( tableView ); // Test "rows" property @@ -711,7 +711,7 @@ int UtcDaliTableViewChildProperties(void) // Create a 10x10 table-view TableView tableView = TableView::New(10,10); Stage::GetCurrent().Add( tableView ); - tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) ); + tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) ); DALI_TEST_CHECK( tableView ); @@ -741,7 +741,7 @@ int UtcDaliTableViewChildProperties(void) // Create a third child actor with the cell alignment properties Actor child3 = Actor::New(); - child3.SetSize( 5.f,5.f ); + child3.SetProperty( Actor::Property::SIZE, Vector2( 5.f, 5.f ) ); child3.SetProperty( TableView::ChildProperty::CELL_HORIZONTAL_ALIGNMENT, "center" ); child3.SetProperty( TableView::ChildProperty::CELL_VERTICAL_ALIGNMENT, "bottom" ); tableView.Add( child3 ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp index b802817..c84000d 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp @@ -949,7 +949,7 @@ int utcDaliTextEditorInputStyleChanged01(void) DALI_TEST_CHECK( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); @@ -1163,7 +1163,7 @@ int utcDaliTextEditorInputStyleChanged02(void) DALI_TEST_CHECK( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); @@ -1400,7 +1400,7 @@ int utcDaliTextEditorEvent01(void) Stage::GetCurrent().Add( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); @@ -1442,8 +1442,8 @@ int utcDaliTextEditorEvent01(void) editor2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - editor2.SetSize( 100.f, 100.f ); - editor2.SetPosition( 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 ); @@ -1485,7 +1485,7 @@ int utcDaliTextEditorEvent02(void) Stage::GetCurrent().Add( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); @@ -1621,7 +1621,7 @@ int utcDaliTextEditorEvent03(void) 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.SetSize( 30.f, 50.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 50.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -1714,7 +1714,7 @@ int utcDaliTextEditorEvent04(void) editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" ); editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f ); - editor.SetSize( 100.f, 50.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -1803,7 +1803,7 @@ int utcDaliTextEditorEvent05(void) editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" ); editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f ); - editor.SetSize( 50.f, 50.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 50.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL, true ); @@ -1885,7 +1885,7 @@ int utcDaliTextEditorEvent06(void) editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" ); editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f ); - editor.SetSize( 100.f, 50.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -1975,7 +1975,7 @@ int utcDaliTextEditorEvent07(void) editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" ); editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f ); - editor.SetSize( 100.f, 50.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -2119,7 +2119,7 @@ int utcDaliTextEditorEvent08(void) editor.SetProperty( TextEditor::Property::TEXT, "DALi" ); editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f ); - editor.SetSize( 100.f, 50.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -2326,7 +2326,7 @@ int utcDaliTextEditorHandles(void) editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT, imagePropertyMap ); editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, imagePropertyMap ); - editor.SetSize( 30.f, 500.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 500.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -2356,7 +2356,7 @@ int utcDaliTextEditorHandles(void) // Get the handle's actor. Actor handle = activeLayer.GetChildAt( 1u ); - handle.SetSize( 100.f, 100.f ); + handle.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); // Render and notify application.SendNotification(); @@ -2522,11 +2522,11 @@ int utcDaliTextEditorGetPropertyLinecountP(void) Stage::GetCurrent().Add( editor ); - editor.SetSize( 100.0f, 100.0f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); lineCount = editor.GetProperty( TextEditor::Property::LINE_COUNT ); DALI_TEST_EQUALS( lineCount, 14, TEST_LOCATION ); - editor.SetSize( 50.0f, 100.0f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 100.f ) ); lineCount = editor.GetProperty( TextEditor::Property::LINE_COUNT ); DALI_TEST_EQUALS( lineCount, 28, TEST_LOCATION ); @@ -2545,7 +2545,7 @@ int utcDaliTextEditorScrollStateChangedSignalTest(void) Stage::GetCurrent().Add( editor ); editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f ); - editor.SetSize( 50.f, 50.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 50.f ) ); editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true ); @@ -2582,7 +2582,7 @@ int UtcDaliToolkitTextEditorTextWrapMode(void) int lineCount =0 ; TextEditor editor = TextEditor::New(); - editor.SetSize( 150.0f, 300.f ); + editor.SetProperty( Actor::Property::SIZE, Vector2( 150.0f, 300.f ) ); editor.SetProperty( TextEditor::Property::TEXT, "Hello world Hello world" ); Stage::GetCurrent().Add( editor ); @@ -2633,7 +2633,7 @@ int UtcDaliTextEditorSetPaddingProperty(void) TextEditor editor = TextEditor::New(); DALI_TEST_CHECK( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); @@ -2666,7 +2666,7 @@ int UtcDaliTextEditorEnableShiftSelectionProperty(void) TextEditor editor = TextEditor::New(); DALI_TEST_CHECK( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); @@ -2694,7 +2694,7 @@ int UtcDaliTextEditorEnableGrabHandleProperty(void) TextEditor editor = TextEditor::New(); DALI_TEST_CHECK( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); @@ -2722,7 +2722,7 @@ int UtcDaliTextEditorMatchSystemLanguageDirectionProperty(void) TextEditor editor = TextEditor::New(); DALI_TEST_CHECK( editor ); - editor.SetSize( 300.f, 50.f ); + 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 ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 05f7d7b..e96c99e 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -1122,7 +1122,7 @@ int utcDaliTextFieldInputStyleChanged01(void) DALI_TEST_CHECK( field ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -1330,7 +1330,7 @@ int utcDaliTextFieldInputStyleChanged02(void) TextField field = TextField::New(); DALI_TEST_CHECK( field ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -1526,7 +1526,7 @@ int utcDaliTextFieldEvent01(void) Stage::GetCurrent().Add( field ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -1578,8 +1578,8 @@ int utcDaliTextFieldEvent01(void) field2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); field2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - field2.SetSize( 100.f, 100.0f ); - field2.SetPosition( 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 ); @@ -1622,7 +1622,7 @@ int utcDaliTextFieldEvent02(void) Stage::GetCurrent().Add( field ); - field.SetSize( 300.0f, 50.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 ); @@ -1775,7 +1775,7 @@ int utcDaliTextFieldEvent03(void) 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.SetSize( 30.f, 50.f ); + field.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 50.f ) ); field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -1836,7 +1836,7 @@ int utcDaliTextFieldEvent04(void) 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.SetSize( 300.f, 50.f ); + 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 ); @@ -1889,7 +1889,7 @@ int utcDaliTextFieldEvent05(void) 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.SetSize( 300.f, 50.f ); + 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 ); @@ -1940,7 +1940,7 @@ int utcDaliTextFieldEvent06(void) field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." ); field.SetProperty( TextField::Property::POINT_SIZE, 10.f ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -1991,7 +1991,7 @@ int utcDaliTextFieldEvent07(void) field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." ); field.SetProperty( TextField::Property::POINT_SIZE, 10.f ); - field.SetSize( 300.f, 50.f ); + 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 ); Property::Map propertyMap; @@ -2034,7 +2034,7 @@ int utcDaliTextFieldEvent08(void) field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" ); field.SetProperty( TextField::Property::POINT_SIZE, 10.f ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -2102,7 +2102,7 @@ int utcDaliTextFieldEvent09(void) field.SetProperty( TextField::Property::TEXT, "Hello" ); field.SetProperty( TextField::Property::POINT_SIZE, 10.f ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -2189,7 +2189,7 @@ int utcDaliTextFieldStyleWhilstSelected(void) 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.SetSize( 300.f, 50.f ); + 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 ); @@ -2291,7 +2291,7 @@ int utcDaliTextFieldEscKeyLoseFocus(void) Stage::GetCurrent().Add( field ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -2373,7 +2373,7 @@ int utcDaliTextFieldSomeSpecialKeys(void) field.SetProperty( TextField::Property::TEXT, longText ); field.SetProperty( TextField::Property::POINT_SIZE, 10.f ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -2450,7 +2450,7 @@ int utcDaliTextFieldSizeUpdate(void) // "ㅁ" is bigger then "ኢ" - field.SetSize( Vector2( fieldWidth ,10.0f ) ); + field.SetProperty( Actor::Property::SIZE, Vector2( fieldWidth ,10.0f ) ); field.SetResizePolicy( ResizePolicy::FIXED , Dimension::WIDTH ); field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY , Dimension::HEIGHT ); @@ -2489,7 +2489,7 @@ int utcDaliTextFieldExtremlyLargePointSize(void) TextField field = TextField::New(); field.SetProperty( TextField::Property::TEXT, "Text" ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -2619,7 +2619,7 @@ int UtcDaliTextFieldSetPaddingProperty(void) TextField field = TextField::New(); DALI_TEST_CHECK( field ); - field.SetSize( 300.f, 50.f ); + 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 ); @@ -2652,7 +2652,7 @@ int UtcDaliTextFieldEnableShiftSelectionProperty(void) TextField field = TextField::New(); DALI_TEST_CHECK( field ); - field.SetSize( 300.0f, 50.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 ); Stage::GetCurrent().Add( field ); @@ -2680,7 +2680,7 @@ int UtcDaliTextFieldEnableGrabHandleProperty(void) TextField field = TextField::New(); DALI_TEST_CHECK( field ); - field.SetSize( 300.0f, 50.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 ); Stage::GetCurrent().Add( field ); @@ -2708,7 +2708,7 @@ int UtcDaliTextFieldMatchSystemLanguageDirectionProperty(void) TextField field = TextField::New(); DALI_TEST_CHECK( field ); - field.SetSize( 300.0f, 50.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 ); Stage::GetCurrent().Add( field ); @@ -2741,7 +2741,7 @@ int utcDaliTextFieldLayoutDirectionCoverage(void) Stage::GetCurrent().Add( field ); - field.SetSize( 300.0f, 50.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 ); @@ -2830,7 +2830,7 @@ int UtcDaliTextFieldSelectWholeText(void) Stage::GetCurrent().Add( textField ); - textField.SetSize( 300.f, 50.f ); + textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) ); textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -2882,7 +2882,7 @@ int UtcDaliTextFieldSelectNone(void) Stage::GetCurrent().Add( textField ); - textField.SetSize( 300.f, 50.f ); + textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) ); textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index d420979..a29a7fd 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -1030,7 +1030,7 @@ int UtcDaliToolkitTextlabelScrollingInterruptedP(void) // Avoid a crash when core load gl resources. application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); Stage::GetCurrent().Add( label ); - label.SetSize( 360.0f, 20.f ); + label.SetProperty( Actor::Property::SIZE, Vector2( 360.0f, 20.f ) ); // Turn on all the effects label.SetProperty( TextLabel::Property::MULTI_LINE, false ); label.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f ); @@ -1166,7 +1166,7 @@ int UtcDaliToolkitTextlabelEllipsis(void) // Turn on all the effects label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - label.SetSize( 360.0f, 10.f ); + label.SetProperty( Actor::Property::SIZE, Vector2( 360.0f, 10.f ) ); try { @@ -1181,7 +1181,7 @@ int UtcDaliToolkitTextlabelEllipsis(void) label.SetProperty( TextLabel::Property::TEXT, "Hello world " ); label.SetProperty( DevelTextLabel::Property::IGNORE_SPACES_AFTER_TEXT, false ); - label.SetSize( 400.0f, 10.f ); + label.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 10.f ) ); try { @@ -1197,7 +1197,7 @@ int UtcDaliToolkitTextlabelEllipsis(void) label.SetProperty( TextLabel::Property::TEXT, "Hello world" ); label.SetProperty( DevelTextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, true ); - label.SetSize( 400.0f, 10.f ); + label.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 10.f ) ); try { @@ -1221,7 +1221,7 @@ int UtcDaliToolkitTextlabelTextWrapMode(void) int lineCount =0 ; TextLabel label = TextLabel::New(); - label.SetSize( 300.0f, 300.f ); + label.SetProperty( Actor::Property::SIZE, Vector2( 300.0f, 300.f ) ); label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" ); label.SetProperty( TextLabel::Property::MULTI_LINE, true ); @@ -1339,7 +1339,7 @@ int UtcDaliToolkitTextlabelTextStyle01(void) tet_infoline(" UtcDaliToolkitTextlabelTextStyle Setting Outline after Shadow"); TextLabel label = TextLabel::New(); - label.SetSize( 300.0f, 300.f ); + 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 ); @@ -1547,7 +1547,7 @@ int UtcDaliToolkitTextlabelTextFit(void) tet_infoline(" UtcDaliToolkitTextlabelTextFit"); TextLabel label = TextLabel::New(); Vector2 size( 460.0f, 100.0f ); - label.SetSize( size ); + label.SetProperty( Actor::Property::SIZE, size ); label.SetProperty( TextLabel::Property::TEXT, "Hello world" ); // check point size diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp index 4e17c01..4b8aca5 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp @@ -158,7 +158,7 @@ int UtcDaliToolkitTextSelectionToolBarP(void) toolbar.AddOption( option ); Toolkit::Control divider = Toolkit::Control::New(); - divider.SetSize( 2.0f, 0.0f ); + divider.SetProperty( Actor::Property::SIZE, Vector2( 2.0f, 0.0f ) ); divider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT ); toolbar.AddDivider( divider ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp index 230bdb8..a266532 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp @@ -174,7 +174,7 @@ int UtcDaliToggleButtonToggleStatesProperty(void) Stage::GetCurrent().Add( toggleButton ); toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - toggleButton.SetPosition( 0.0f, 0.0f ); + toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); {// Check empty array Property::Array toggleIcons; @@ -255,7 +255,7 @@ int UtcDaliToggleButtonToggleTipsProperty( void ) Stage::GetCurrent().Add( toggleButton ); toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - toggleButton.SetPosition( 0.0f, 0.0f ); + toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); { // Check empty tip array Property::Array toggleIcons; @@ -314,8 +314,8 @@ int UtcDaliToggleButtonStateChange(void) Stage::GetCurrent().Add( toggleButton ); toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - toggleButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); - toggleButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ); + toggleButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); + toggleButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ); Property::Array toggleIcons; toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path @@ -381,4 +381,4 @@ int UtcDaliToggleButtonStateChange(void) DALI_TEST_EQUALS( index, 0, TEST_LOCATION ); END_TEST; -} \ No newline at end of file +} diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp index a9cf36b..cbcac4b 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp @@ -107,18 +107,18 @@ int UtcDaliToolBarAddControl01(void) try { Actor control1 = CreateColorActor( Color::RED ); - control1.SetSize( Vector2( 100.f, 100.f ) ); + control1.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor control2 = CreateColorActor( Color::RED ); - control2.SetSize( Vector2( 100.f, 100.f ) ); + control2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor control3 = CreateColorActor( Color::RED ); - control3.SetSize( Vector2( 100.f, 100.f ) ); + control3.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor control4 = CreateColorActor( Color::RED ); - control4.SetSize( Vector2( 100.f, 100.f ) ); + control4.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor control5 = CreateColorActor( Color::RED ); - control5.SetSize( Vector2( 100.f, 100.f ) ); + control5.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); ToolBar toolbar = ToolBar::New(); - toolbar.SetSize( Vector2( 600.f, 100.f ) ); + toolbar.SetProperty( Actor::Property::SIZE, Vector2( 600.f, 100.f ) ); application.Render(); application.SendNotification(); @@ -132,11 +132,11 @@ int UtcDaliToolBarAddControl01(void) toolbar.AddControl( control5, 0.1f, Alignment::HorizontalRight, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) ); Actor control6 = CreateColorActor( Color::RED ); - control6.SetSize( Vector2( 100.f, 100.f ) ); + control6.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor control7 = CreateColorActor( Color::RED ); - control7.SetSize( Vector2( 100.f, 100.f ) ); + control7.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor control8 = CreateColorActor( Color::RED ); - control8.SetSize( Vector2( 100.f, 100.f ) ); + control8.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); application.Render(); application.SendNotification(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp index 573ffac..6eabaed 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp @@ -510,7 +510,7 @@ int UtcDaliTooltipDisplay(void) control.SetProperty( DevelControl::Property::TOOLTIP, "Test" ); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor rootActor = Stage::GetCurrent().GetRootLayer(); rootActor.Add( control ); @@ -545,7 +545,7 @@ int UtcDaliTooltipDisplayWithTail(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::TAIL, @@ -585,7 +585,7 @@ int UtcDaliTooltipDisplayWithContentArray(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) @@ -629,7 +629,7 @@ int UtcDaliTooltipDisplayBelow(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW ) @@ -665,7 +665,7 @@ int UtcDaliTooltipDisplayAbove(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE ) @@ -701,7 +701,7 @@ int UtcDaliTooltipDisplayAtHoverPoint(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT ) @@ -741,7 +741,7 @@ int UtcDaliTooltipExceedThreshold(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 ) @@ -790,7 +790,7 @@ int UtcDaliTooltipGoOutOfBounds(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, "Test" ); Actor rootActor = Stage::GetCurrent().GetRootLayer(); @@ -836,7 +836,7 @@ int UtcDaliTooltipHideTooltipWhenOutOfBounds(void) control.SetProperty( DevelControl::Property::TOOLTIP, "Test" ); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor rootActor = Stage::GetCurrent().GetRootLayer(); rootActor.Add( control ); @@ -879,7 +879,7 @@ int UtcDaliTooltipHideTooltipWhenSetToDisapperOnMovement(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::DISAPPEAR_ON_MOVEMENT, true ) @@ -928,7 +928,7 @@ int UtcDaliTooltipChangeContent(void) control.SetProperty( DevelControl::Property::TOOLTIP, "Test" ); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - control.SetSize( 100.0f, 100.0f ); + control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) ); Actor rootActor = Stage::GetCurrent().GetRootLayer(); rootActor.Add( control ); @@ -1015,7 +1015,7 @@ int UtcDaliTooltipEnsureRemainsOnStage1(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); - control.SetSize( stageSize ); + control.SetProperty( Actor::Property::SIZE, stageSize ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::TAIL, @@ -1057,7 +1057,7 @@ int UtcDaliTooltipEnsureRemainsOnStage2(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - control.SetSize( stageSize ); + control.SetProperty( Actor::Property::SIZE, stageSize ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::TAIL, @@ -1100,7 +1100,7 @@ int UtcDaliTooltipEnsureRemainsOnStage3(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); - control.SetSize( stageSize ); + control.SetProperty( Actor::Property::SIZE, stageSize ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::TAIL, @@ -1109,7 +1109,7 @@ int UtcDaliTooltipEnsureRemainsOnStage3(void) .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) ) .Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW ) ); - control.SetX( -centerPoint.x ); + control.SetProperty( Actor::Property::POSITION_X, -centerPoint.x ); Actor rootActor = Stage::GetCurrent().GetRootLayer(); rootActor.Add( control ); @@ -1145,7 +1145,7 @@ int UtcDaliTooltipEnsureRemainsOnStage4(void) Control control = Control::New(); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); - control.SetSize( stageSize ); + control.SetProperty( Actor::Property::SIZE, stageSize ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, "Test" ) .Add( Tooltip::Property::TAIL, @@ -1154,7 +1154,7 @@ int UtcDaliTooltipEnsureRemainsOnStage4(void) .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) ) .Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW ) ); - control.SetX( centerPoint.x ); + control.SetProperty( Actor::Property::POSITION_X, centerPoint.x ); Actor rootActor = Stage::GetCurrent().GetRootLayer(); rootActor.Add( control ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp index 89b78bf..b2874e2 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp @@ -406,7 +406,7 @@ int UtcDaliVideoViewMethodsForCoverage2(void) Vector3 vector(100.0f, 100.0f, 0.0f); DALI_TEST_CHECK(vector != videoView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); - videoView.SetSize( vector ); + videoView.SetProperty( Actor::Property::SIZE, vector ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp index b049d26..a0151d2 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp @@ -259,7 +259,7 @@ int UtcDaliVisualSetGetDepthIndex(void) Impl::DummyControl& dummyImpl = static_cast(dummyControl.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); @@ -421,7 +421,7 @@ int UtcDaliVisualSetOnOffStage(void) Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); application.SendNotification(); application.Render(0); @@ -457,7 +457,7 @@ int UtcDaliVisualSetOnOffStage2(void) Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); application.SendNotification(); application.Render(0); @@ -1818,7 +1818,7 @@ int UtcDaliVisualAnimateBorderVisual01(void) DummyControl actor = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual ); - actor.SetSize(2000, 2000); + actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) ); actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Stage::GetCurrent().Add(actor); @@ -1886,7 +1886,7 @@ int UtcDaliVisualAnimateBorderVisual02(void) DummyControl actor = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual ); - actor.SetSize(2000, 2000); + actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) ); actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Stage::GetCurrent().Add(actor); @@ -1930,7 +1930,7 @@ int UtcDaliVisualAnimateColorVisual(void) DummyControl actor = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual ); - actor.SetSize(2000, 2000); + actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) ); actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Stage::GetCurrent().Add(actor); @@ -1985,7 +1985,7 @@ int UtcDaliVisualAnimatePrimitiveVisual(void) DummyControl actor = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(2000, 2000); + 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); @@ -2060,7 +2060,7 @@ int UtcDaliVisualAnimatedGradientVisual01(void) DummyControl actor = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(2000, 2000); + 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); @@ -2231,7 +2231,7 @@ int UtcDaliVisualAnimatedGradientVisual02(void) DummyControl actor = DummyControl::New( true ); Impl::DummyControl& dummyImpl = static_cast( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 2000, 2000 ); + 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); @@ -2505,7 +2505,7 @@ int UtcDaliVisualAnimatedGradientVisual03(void) DummyControl actor = DummyControl::New( true ); Impl::DummyControl& dummyImpl = static_cast( actor.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 2000, 2000 ); + 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); @@ -2793,7 +2793,7 @@ static void TestTransform( ToolkitTestApplication& application, Visual::Base vis //Put the visual on the stage DummyControl actor = DummyControl::New(true); Impl::DummyControl& dummyImpl = static_cast(actor.GetImplementation()); - actor.SetSize(2000, 2000); + actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) ); actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Stage::GetCurrent().Add(actor); @@ -3103,7 +3103,7 @@ int UtcDaliNPatchVisualCustomShader(void) Impl::DummyControl& dummyImpl = static_cast(dummy.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap ); - dummy.SetSize(2000, 2000); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Stage::GetCurrent().Add(dummy); application.SendNotification(); @@ -3185,7 +3185,7 @@ int UtcDaliVisualRendererRemovalAndReAddition(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION ); - dummyControl.SetSize(200.f, 200.f); + 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 ); @@ -3247,7 +3247,7 @@ int UtcDaliVisualTextVisualRender(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual ); DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummyControl ); @@ -3270,7 +3270,7 @@ int UtcDaliVisualTextVisualRender(void) textVisual.SetDepthIndex( 1 ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual ); - dummyControl.SetSize( 720.f, 640.f ); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 720.f, 640.f ) ); application.SendNotification(); // force process events to ensure text visual // adds renderer to the dummy control in OnRelayout @@ -3316,7 +3316,7 @@ int UtcDaliVisualTextVisualDisableEnable(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual ); DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummyControl ); @@ -3446,7 +3446,7 @@ int UtcDaliRegisterVisualOrder(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, anotherTestVisual2Replacement ); DALI_TEST_EQUALS( anotherTestVisual2Replacement.GetDepthIndex(), 2000, TEST_LOCATION ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); END_TEST; @@ -3482,7 +3482,7 @@ int UtcDaliRegisterVisualOrder02(void) dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, testVisual2 ); DALI_TEST_CHECK( testVisual2.GetDepthIndex() > testVisual1.GetDepthIndex() ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); END_TEST; @@ -3519,7 +3519,7 @@ int UtcDaliRegisterVisualWithDepthIndex(void) DALI_TEST_EQUALS( testVisual3.GetDepthIndex(), 300, TEST_LOCATION ); DALI_TEST_EQUALS( DevelControl::IsVisualEnabled( dummyImpl, DummyControl::Property::TEST_VISUAL2 ), true, TEST_LOCATION ); - dummyControl.SetSize(200.f, 200.f); + dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( dummyControl ); END_TEST; @@ -3599,7 +3599,7 @@ int UtcDaliSvgVisualCustomShader(void) Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummy.SetSize( 200.f, 200.f ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy ); @@ -3645,7 +3645,7 @@ int UtcDaliVisualRoundedCorner(void) Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummy.SetSize( 200.f, 200.f ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy ); @@ -3677,7 +3677,7 @@ int UtcDaliVisualRoundedCorner(void) Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummy.SetSize( 200.f, 200.f ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy ); @@ -3722,7 +3722,7 @@ int UtcDaliVisualRoundedCorner(void) Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummy.SetSize( 200.f, 200.f ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy ); @@ -3758,7 +3758,7 @@ int UtcDaliColorVisualBlurRadius(void) Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() ); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - dummy.SetSize( 200.f, 200.f ); + dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( dummy ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp index 513e132..a2e3f03 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp @@ -72,7 +72,7 @@ void TestVisualRender( ToolkitTestApplication& application, DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -93,7 +93,7 @@ void TestVisualAsynchronousRender( ToolkitTestApplication& application, DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -258,7 +258,7 @@ int UtcDaliVisualFactoryGetBorderVisual1(void) DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f)); @@ -306,7 +306,7 @@ int UtcDaliVisualFactoryGetBorderVisual2(void) DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize(200.f, 200.f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f)); @@ -975,7 +975,7 @@ int UtcDaliVisualFactoryGetNPatchVisual7(void) DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Add( actor ); @@ -1138,7 +1138,7 @@ int UtcDaliVisualFactoryGetSvgVisual(void) DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) ); @@ -1223,7 +1223,7 @@ int UtcDaliVisualFactoryGetSvgVisualAtlas(void) DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) ); @@ -1262,7 +1262,7 @@ void MeshVisualLoadsCorrectlyTest( Property::Map& propertyMap, ToolkitTestApplic DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) ); @@ -1305,7 +1305,7 @@ void MeshVisualDoesNotLoadCorrectlyTest( Property::Map& propertyMap, ToolkitTest DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) ); @@ -1612,7 +1612,7 @@ void TestPrimitiveVisualWithProperties( Property::Map& propertyMap, ToolkitTestA DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.f, 200.f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) ); @@ -2053,7 +2053,7 @@ int UtcDaliVisualFactoryGetAnimatedImageVisual1(void) DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -2122,7 +2122,7 @@ int UtcDaliVisualFactoryGetAnimatedImageVisual2(void) DummyControl actor = DummyControl::New(true); DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize( 200.0f, 200.0f ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp index f12353a..9221ea5 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp @@ -146,8 +146,8 @@ int UtcDaliWebViewPageNavigation(void) WebView view = WebView::New(); view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - view.SetPosition( 0, 0 ); - view.SetSize( 800, 600 ); + view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); + view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) ); Stage::GetCurrent().Add( view ); application.SendNotification(); application.Render(); @@ -178,7 +178,7 @@ int UtcDaliWebViewPageNavigation(void) view.LoadUrl( TEST_URL2 ); view.Suspend(); - view.SetSize( 400, 300 ); + view.SetProperty( Actor::Property::SIZE, Vector2( 400, 300 ) ); application.SendNotification(); application.Render(); Test::EmitGlobalTimerSignal(); @@ -217,8 +217,8 @@ int UtcDaliWebViewTouchAndKeys(void) WebView view = WebView::New(); view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - view.SetPosition( 0, 0 ); - view.SetSize( 800, 600 ); + view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); + view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) ); Stage::GetCurrent().Add( view ); application.SendNotification(); diff --git a/dali-toolkit/devel-api/controls/effects-view/effects-view.h b/dali-toolkit/devel-api/controls/effects-view/effects-view.h index 87b19d4..1a3d1a0 100644 --- a/dali-toolkit/devel-api/controls/effects-view/effects-view.h +++ b/dali-toolkit/devel-api/controls/effects-view/effects-view.h @@ -46,7 +46,7 @@ class EffectsView; * * // set position and format * effectsView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - * effectsView.SetSize( Vector2( width, height) ); + * effectsView.SetProperty( Actor::Property::SIZE, Vector2( width, height) ); * effectsView.SetPixelFormat( Pixel::RGBA8888 ); * * // set effect type and properties diff --git a/dali-toolkit/devel-api/controls/shadow-view/shadow-view.h b/dali-toolkit/devel-api/controls/shadow-view/shadow-view.h index 6b4b9dd..d69c479 100644 --- a/dali-toolkit/devel-api/controls/shadow-view/shadow-view.h +++ b/dali-toolkit/devel-api/controls/shadow-view/shadow-view.h @@ -74,12 +74,12 @@ class ShadowView; * ImageView shadowPlaneBg = ImageView::New(); //This will be the shadow plane * shadowPlaneBg.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); * shadowPlaneBg.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - * shadowPlaneBg.SetSize(700.0f, 700.0f); - * shadowPlaneBg.SetPosition( Vector3(0.0f, 0.0f, -30.0f) ); //Just behind the image view. + * shadowPlaneBg.SetProperty( Actor::Property::SIZE, Vector2(700.0f, 700.0f) ); + * shadowPlaneBg.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, -30.0f) ); //Just behind the image view. * shadowView.SetShadowPlaneBackground(ShadowPlane); * * Actor pointLight = Actor::New(); // This will be the light source - * pointLight.SetPosition(300.0f, 250.0f, 600.0f); + * pointLight.SetProperty( Actor::Property::POSITION, Vector3(300.0f, 250.0f, 600.0f) ); * Stage::GetCurrent().Add(pointLight); * shadowView.SetPointLight(pointLight); * diff --git a/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h b/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h index fbbbf9f..7626470 100644 --- a/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h +++ b/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h @@ -41,7 +41,7 @@ class SuperBlurView; * * // initialise\n * SuperBlurView blurView = SuperBlurView::New( blurLevels );\n - * blurView.SetSize(); // it is important to set the display size before set the input image!! + * blurView.SetProperty( Actor::Property::SIZE, size ); // it is important to set the display size before set the input image!! * Stage::GetCurrent().Add(blurView);\n * * // Set the input image diff --git a/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp b/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp index 42952e3..deafb53 100644 --- a/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp +++ b/dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp @@ -611,7 +611,7 @@ Actor AccessibilityManager::GetFocusIndicatorActor() mFocusIndicatorActor = Toolkit::ImageView::New(focusBorderImagePath); mFocusIndicatorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mFocusIndicatorActor.SetZ( 1.0f ); + mFocusIndicatorActor.SetProperty( Actor::Property::POSITION_Z, 1.0f ); // Apply size constraint to the focus indicator mFocusIndicatorActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); diff --git a/dali-toolkit/internal/controls/alignment/alignment-impl.cpp b/dali-toolkit/internal/controls/alignment/alignment-impl.cpp index 07186e0..8000612 100644 --- a/dali-toolkit/internal/controls/alignment/alignment-impl.cpp +++ b/dali-toolkit/internal/controls/alignment/alignment-impl.cpp @@ -280,7 +280,7 @@ void Alignment::OnRelayout( const Vector2& size, RelayoutContainer& container ) } } - child.SetPosition( GetPosition( mPadding, mHorizontal, mVertical , newChildSize, currentChildSize ) ); + child.SetProperty( Actor::Property::POSITION, GetPosition( mPadding, mHorizontal, mVertical , newChildSize, currentChildSize ) ); if( renegotiate ) { diff --git a/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp b/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp index 6cd10b0..eb2defe 100644 --- a/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp +++ b/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp @@ -277,9 +277,9 @@ void BloomView::OnInitialize() void BloomView::OnSizeSet(const Vector3& targetSize) { mTargetSize = Vector2(targetSize); - mChildrenRoot.SetSize(targetSize); - mCompositeActor.SetSize(targetSize); - mTargetActor.SetSize(targetSize); + mChildrenRoot.SetProperty( Actor::Property::SIZE, targetSize); + mCompositeActor.SetProperty( Actor::Property::SIZE, targetSize); + mTargetActor.SetProperty( Actor::Property::SIZE, targetSize); // Children render camera must move when GaussianBlurView object is // resized. This is since we cannot change render target size - so we need @@ -289,7 +289,7 @@ void BloomView::OnSizeSet(const Vector3& targetSize) // this is the trade off for not being able to modify render target size // Change camera z position based on GaussianBlurView actor height float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f); - mRenderFullSizeCamera.SetZ( mTargetSize.height * cameraPosConstraintScale); + mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION_Z, mTargetSize.height * cameraPosConstraintScale); // if we have already activated the blur, need to update render target sizes now to reflect the new size of this actor if(mActivated) @@ -339,7 +339,7 @@ void BloomView::AllocateResources() mRenderDownsampledCamera.SetAspectRatio(mDownsampledWidth / mDownsampledHeight); mRenderDownsampledCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor - mRenderDownsampledCamera.SetPosition(0.0f, 0.0f, ((mDownsampledHeight * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f))); + mRenderDownsampledCamera.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, ( ( mDownsampledHeight * 0.5f ) / tanf( ARBITRARY_FIELD_OF_VIEW * 0.5f ) ) ) ); // Create and place a camera for the children render, corresponding to its render target size mRenderFullSizeCamera.SetFieldOfView(ARBITRARY_FIELD_OF_VIEW); @@ -348,11 +348,11 @@ void BloomView::AllocateResources() mRenderFullSizeCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f); - mRenderFullSizeCamera.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale); + mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale ) ); ////////////////////////////////////////////////////// // Pass size change onto GaussianBlurView, so it matches - mGaussianBlurView.SetSize(mTargetSize); + mGaussianBlurView.SetProperty( Actor::Property::SIZE, mTargetSize ); GetImpl(mGaussianBlurView).AllocateResources(); mGaussianBlurView.SetProperty( Actor::Property::VISIBLE, true ); @@ -383,7 +383,7 @@ void BloomView::AllocateResources() Renderer bloomRenderer = CreateRenderer( BASIC_VERTEX_SOURCE, BLOOM_EXTRACT_FRAGMENT_SOURCE ); SetRendererTexture( bloomRenderer, mRenderTargetForRenderingChildren ); mBloomExtractActor.AddRenderer( bloomRenderer ); - mBloomExtractActor.SetSize( mDownsampledWidth, mDownsampledHeight ); // size needs to match render target + mBloomExtractActor.SetProperty( Actor::Property::SIZE, Vector2( mDownsampledWidth, mDownsampledHeight ) ); // size needs to match render target // set GaussianBlurView to blur our extracted bloom mGaussianBlurView.SetUserImageAndOutputRenderTarget( mBloomExtractTarget.GetColorTexture(), blurExtractTarget ); diff --git a/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp b/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp index 81ab78b..7c3697c 100644 --- a/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp +++ b/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp @@ -211,7 +211,7 @@ void BubbleEmitter::OnInitialize() { // Create the root actor, all the meshActor should be its children mBubbleRoot = Actor::New(); - mBubbleRoot.SetSize(mMovementArea); + mBubbleRoot.SetProperty( Actor::Property::SIZE, mMovementArea ); // Prepare the frame buffer to store the color adjusted background texture Vector2 imageSize = Vector2( mMovementArea.width/4.f, mMovementArea.height/4.f ); @@ -258,7 +258,7 @@ void BubbleEmitter::SetBackground( Texture bgTexture, const Vector3& hsvDelta ) //Create RenderTask source actor Actor sourceActor = Actor::New(); - sourceActor.SetSize( mMovementArea ); + sourceActor.SetProperty( Actor::Property::SIZE, mMovementArea ); sourceActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); sourceActor.RegisterProperty( "uHSVDelta", hsvDelta ); Stage::GetCurrent().Add( sourceActor ); diff --git a/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp b/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp index d4e96a7..28ecd23 100644 --- a/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp +++ b/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp @@ -283,7 +283,7 @@ void EffectsView::OnSizeSet(const Vector3& targetSize) Enable(); } - mChildrenRoot.SetSize( targetSize ); + mChildrenRoot.SetProperty( Actor::Property::SIZE, targetSize ); Control::OnSizeSet( targetSize ); } @@ -462,8 +462,8 @@ void EffectsView::SetupCameras() mCameraForChildren.SetNearClippingPlane(1.0f); mCameraForChildren.SetAspectRatio(mTargetSize.width / mTargetSize.height); mCameraForChildren.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor - mCameraForChildren.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosScale); - mCameraForChildren.SetZ( mTargetSize.height * cameraPosScale ); + mCameraForChildren.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, mTargetSize.height * cameraPosScale ) ); + mCameraForChildren.SetProperty( Actor::Property::POSITION_Z, mTargetSize.height * cameraPosScale ); } } diff --git a/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp b/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp index 98d801b..5eb3c6f 100755 --- a/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp +++ b/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp @@ -704,8 +704,8 @@ void FlexContainer::RelayoutChildren() Dali::Actor child = mChildrenNodes[i].actor.GetHandle(); if( child ) { - child.SetX( YGNodeLayoutGetLeft( mChildrenNodes[i].node ) ); - child.SetY( YGNodeLayoutGetTop( mChildrenNodes[i].node ) ); + child.SetProperty( Actor::Property::POSITION_X, YGNodeLayoutGetLeft( mChildrenNodes[i].node ) ); + child.SetProperty( Actor::Property::POSITION_Y, YGNodeLayoutGetTop( mChildrenNodes[i].node ) ); } } } diff --git a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp index c4d744e..b78f110 100644 --- a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp +++ b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp @@ -341,19 +341,19 @@ void GaussianBlurView::OnSizeSet(const Vector3& targetSize) { mTargetSize = Vector2(targetSize); - mChildrenRoot.SetSize(targetSize); + mChildrenRoot.SetProperty( Actor::Property::SIZE, targetSize); if( !mBlurUserImage ) { - mCompositingActor.SetSize(targetSize); - mTargetActor.SetSize(targetSize); + mCompositingActor.SetProperty( Actor::Property::SIZE, targetSize); + mTargetActor.SetProperty( Actor::Property::SIZE, targetSize); // Children render camera must move when GaussianBlurView object is resized. This is since we cannot change render target size - so we need to remap the child actors' rendering // accordingly so they still exactly fill the render target. Note that this means the effective resolution of the child render changes as the GaussianBlurView object changes // size, this is the trade off for not being able to modify render target size // Change camera z position based on GaussianBlurView actor height float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f); - mRenderFullSizeCamera.SetZ(mTargetSize.height * cameraPosConstraintScale); + mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION_Z, mTargetSize.height * cameraPosConstraintScale); } @@ -399,7 +399,7 @@ void GaussianBlurView::AllocateResources() mRenderDownsampledCamera.SetAspectRatio(mDownsampledWidth / mDownsampledHeight); mRenderDownsampledCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor - mRenderDownsampledCamera.SetPosition(0.0f, 0.0f, ((mDownsampledHeight * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f))); + mRenderDownsampledCamera.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, ((mDownsampledHeight * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f)))); // setup for normal operation if(!mBlurUserImage) @@ -412,7 +412,7 @@ void GaussianBlurView::AllocateResources() mRenderFullSizeCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f); - mRenderFullSizeCamera.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale); + mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale)); // create offscreen buffer of new size to render our child actors to mRenderTargetForRenderingChildren = FrameBuffer::New( mTargetSize.width, mTargetSize.height, FrameBuffer::Attachment::NONE ); @@ -440,10 +440,10 @@ void GaussianBlurView::AllocateResources() mRenderTarget2.AttachColorTexture( texture ); // size needs to match render target - mHorizBlurActor.SetSize(mDownsampledWidth, mDownsampledHeight); + mHorizBlurActor.SetProperty( Actor::Property::SIZE, Vector2(mDownsampledWidth, mDownsampledHeight) ); // size needs to match render target - mVertBlurActor.SetSize(mDownsampledWidth, mDownsampledHeight); + mVertBlurActor.SetProperty( Actor::Property::SIZE, Vector2(mDownsampledWidth, mDownsampledHeight) ); SetRendererTexture( mVertBlurActor.GetRendererAt(0), mRenderTarget2 ); // set gaussian blur up for new sized render targets diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp index 7ff12f7..fbbc650 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp @@ -68,7 +68,7 @@ void PageTurnLandscapeView::OnPageTurnViewInitialize() mSpineEffectShader.RegisterProperty(PROPERTY_TEXTURE_WIDTH, 2.f ); mControlSize = Vector2( mPageSize.width * 2.f, mPageSize.height ); - Self().SetSize( mControlSize ); + Self().SetProperty( Actor::Property::SIZE, mControlSize ); mTurningPageLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); } diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp index b4bc45a..d4566bf 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp @@ -78,7 +78,7 @@ void PageTurnPortraitView::OnPageTurnViewInitialize() mSpineEffectShader.RegisterProperty(PROPERTY_TEXTURE_WIDTH, 1.f ); mControlSize = mPageSize; - Self().SetSize( mPageSize ); + Self().SetProperty( Actor::Property::SIZE, mPageSize ); mTurningPageLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); } diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp index 9204fa4..8e5613e 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp @@ -388,7 +388,7 @@ void PageTurnView::OnInitialize() for( int i = 0; i < NUMBER_OF_CACHED_PAGES; i++ ) { mPages.push_back( Page() ); - mPages[i].actor.SetSize( mPageSize ); + mPages[i].actor.SetProperty( Actor::Property::SIZE, mPageSize ); Self().Add( mPages[i].actor ); } @@ -408,7 +408,7 @@ void PageTurnView::OnInitialize() for( int i = 0; i < NUMBER_OF_CACHED_PAGES_EACH_SIDE; i++ ) { AddPage( i ); - mPages[i].actor.SetZ( -static_cast( i )*STATIC_PAGE_INTERVAL_DISTANCE ); + mPages[i].actor.SetProperty( Actor::Property::POSITION_Z, -static_cast( i )*STATIC_PAGE_INTERVAL_DISTANCE ); } mPages[0].actor.SetProperty( Actor::Property::VISIBLE,true); @@ -456,14 +456,14 @@ void PageTurnView::SetupShadowView() mShadowPlaneBackground = Actor::New(); mShadowPlaneBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mShadowPlaneBackground.SetSize( mControlSize ); + mShadowPlaneBackground.SetProperty( Actor::Property::SIZE, mControlSize ); Self().Add( mShadowPlaneBackground ); mShadowView.SetShadowPlaneBackground( mShadowPlaneBackground ); mPointLight = Actor::New(); mPointLight.SetProperty( Actor::Property::ANCHOR_POINT, origin ); mPointLight.SetProperty( Actor::Property::PARENT_ORIGIN, origin ); - mPointLight.SetPosition( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO ); + mPointLight.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO )); Self().Add( mPointLight ); mShadowView.SetPointLight( mPointLight ); @@ -500,19 +500,19 @@ void PageTurnView::SetPageSize( const Vector2& viewPageSize ) if( mPointLight ) { - mPointLight.SetPosition( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO ); + mPointLight.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO )); } for( size_t i=0; i( i )*STATIC_PAGE_INTERVAL_DISTANCE ); + mPages[( mCurrentPageIndex+i )%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::POSITION_Z, -static_cast( i )*STATIC_PAGE_INTERVAL_DISTANCE ); } if( mCurrentPageIndex >= i + 1 ) { - mPages[( mCurrentPageIndex-i-1 )%NUMBER_OF_CACHED_PAGES].actor.SetZ( -static_cast( i )*STATIC_PAGE_INTERVAL_DISTANCE ); + mPages[( mCurrentPageIndex-i-1 )%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::POSITION_Z, -static_cast( i )*STATIC_PAGE_INTERVAL_DISTANCE ); } } } diff --git a/dali-toolkit/internal/controls/popup/popup-impl.cpp b/dali-toolkit/internal/controls/popup/popup-impl.cpp index 4d0e156..66e6350 100644 --- a/dali-toolkit/internal/controls/popup/popup-impl.cpp +++ b/dali-toolkit/internal/controls/popup/popup-impl.cpp @@ -325,7 +325,7 @@ void Popup::OnInitialize() mPopupLayout.SetResizePolicy( ResizePolicy::USE_ASSIGNED_SIZE, Dimension::WIDTH ); mPopupLayout.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); - mPopupLayout.SetSize( Stage::GetCurrent().GetSize().x * DEFAULT_RELATIVE_PARENT_WIDTH, 0.0f ); + mPopupLayout.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x * DEFAULT_RELATIVE_PARENT_WIDTH, 0.0f ) ); mPopupLayout.SetFitHeight( 0 ); // Set row to fit. mPopupLayout.SetFitHeight( 1 ); // Set row to fit. @@ -354,7 +354,7 @@ void Popup::LayoutAnimation() case Toolkit::Popup::ZOOM: { // Zoom animations start fully zoomed out. - mPopupContainer.SetScale( Vector3::ZERO ); + mPopupContainer.SetProperty( Actor::Property::SCALE, Vector3::ZERO ); break; } @@ -435,7 +435,7 @@ void Popup::StartTransitionAnimation( bool transitionIn, bool instantaneous /* f } else { - mPopupContainer.SetScale( transitionIn ? Vector3::ONE : Vector3::ZERO ); + mPopupContainer.SetProperty( Actor::Property::SCALE, transitionIn ? Vector3::ONE : Vector3::ZERO ); } break; } @@ -898,7 +898,7 @@ void Popup::LayoutTail() mTailImage.SetProperty( Dali::Actor::Property::NAME, "tailImage" ); mTailImage.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin ); mTailImage.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint ); - mTailImage.SetPosition( position ); + mTailImage.SetProperty( Actor::Property::POSITION, position ); if( mPopupBackgroundImage ) { @@ -931,7 +931,7 @@ Toolkit::Control Popup::CreateBacking() // Always the full size of the stage. backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - backing.SetSize( Stage::GetCurrent().GetSize() ); + backing.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize() ); // Catch events. backing.SetProperty( Actor::Property::SENSITIVE, true ); @@ -1032,7 +1032,7 @@ void Popup::UpdateBackgroundPositionAndSize() mPopupBackgroundImage.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( mBackgroundBorder.left + mBackgroundBorder.right, mBackgroundBorder.top + mBackgroundBorder.bottom, 0.0f ) ); // Adjust the position of the background so the transparent areas are set appropriately - mPopupBackgroundImage.SetPosition( ( mBackgroundBorder.right - mBackgroundBorder.left ) * 0.5f, ( mBackgroundBorder.bottom - mBackgroundBorder.top ) * 0.5f ); + mPopupBackgroundImage.SetProperty( Actor::Property::POSITION, Vector2( ( mBackgroundBorder.right - mBackgroundBorder.left ) * 0.5f, ( mBackgroundBorder.bottom - mBackgroundBorder.top ) * 0.5f )); } } @@ -1687,7 +1687,7 @@ void Popup::LayoutContext( const Vector2& size ) } // Set the final position. - mPopupContainer.SetPosition( newPosition ); + mPopupContainer.SetProperty( Actor::Property::POSITION, newPosition ); } void Popup::OnRelayout( const Vector2& size, RelayoutContainer& container ) diff --git a/dali-toolkit/internal/controls/scene3d-view/gltf-loader.cpp b/dali-toolkit/internal/controls/scene3d-view/gltf-loader.cpp index 693944f..35bdd42 100644 --- a/dali-toolkit/internal/controls/scene3d-view/gltf-loader.cpp +++ b/dali-toolkit/internal/controls/scene3d-view/gltf-loader.cpp @@ -1583,12 +1583,12 @@ Actor Loader::AddNode( Scene3dView& scene3dView, uint32_t index ) anchorPoint = meshInfo.pivot; actor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint ); - actor.SetSize( Vector3( meshInfo.size.x, meshInfo.size.y, meshInfo.size.z ) ); + actor.SetProperty( Actor::Property::SIZE, Vector3( meshInfo.size.x, meshInfo.size.y, meshInfo.size.z ) ); actor.AddRenderer( renderer ); - actor.SetScale( scale ); + actor.SetProperty( Actor::Property::SCALE, scale ); actor.RotateBy( orientation ); - actor.SetPosition( translation ); + actor.SetProperty( Actor::Property::POSITION, translation ); shader.RegisterProperty( "uLightType", ( scene3dView.GetLightType() & ~Toolkit::Scene3dView::LightType::IMAGE_BASED_LIGHT ) ); shader.RegisterProperty( "uLightVector", scene3dView.GetLightVector() ); @@ -1649,9 +1649,9 @@ Actor Loader::AddNode( Scene3dView& scene3dView, uint32_t index ) else { actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - actor.SetPosition( translation ); + actor.SetProperty( Actor::Property::POSITION, translation ); actor.RotateBy( orientation ); - actor.SetSize( actorSize ); + actor.SetProperty( Actor::Property::SIZE, actorSize ); } tempNode = node->GetChild( "camera" ); diff --git a/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp b/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp index 0a9574c..380f6b5 100644 --- a/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp +++ b/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp @@ -250,7 +250,7 @@ bool Scene3dView::SetDefaultCamera( const Dali::Camera::Type type, const float n mDefaultCamera.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mDefaultCamera.SetType( type ); mDefaultCamera.SetNearClippingPlane( nearPlane ); - mDefaultCamera.SetPosition( cameraPosition ); + mDefaultCamera.SetProperty( Actor::Property::POSITION, cameraPosition ); return true; } diff --git a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp index 74b5b62..683cfd6 100755 --- a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -307,7 +307,7 @@ void ScrollBar::ApplyConstraints() // Set indicator height according to the indicator's height policy if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed) { - mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight); + mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) ); } else { @@ -532,7 +532,7 @@ void ScrollBar::OnSizeSet( const Vector3& size ) { if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed) { - mIndicator.SetSize(size.width, mIndicatorFixedHeight); + mIndicator.SetProperty( Actor::Property::SIZE, Vector2( size.width, mIndicatorFixedHeight ) ); } Control::OnSizeSet( size ); @@ -568,7 +568,7 @@ void ScrollBar::SetIndicatorFixedHeight( float height ) if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed) { - mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight); + mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) ); } } diff --git a/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h b/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h index f78ab9f..5e33a83 100644 --- a/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h +++ b/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h @@ -41,7 +41,7 @@ namespace Internal * Actor bounceActor = CreateBouncingEffectActor( bouncePropertyIndex ); * // set size and color - * bounceActor.SetSize(720.f, 42.f ); + * bounceActor.SetProperty( Actor::Property::SIZE, Vector2(720.f, 42.f ); * bounceActor.SetProperty( Actor::Property::COLOR, Vector4( 0.0,0.64f,0.85f,0.25f ) ); * * // add to stage diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 575f3aa..9e60b84 100755 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -426,7 +426,7 @@ void ItemView::ActivateLayout(unsigned int layoutIndex, const Vector3& targetSiz Actor self = Self(); // The ItemView size should match the active layout size - self.SetSize(targetSize); + self.SetProperty( Actor::Property::SIZE, targetSize); mActiveLayoutTargetSize = targetSize; // Switch to the new layout @@ -446,7 +446,7 @@ void ItemView::ActivateLayout(unsigned int layoutIndex, const Vector3& targetSiz Vector3 size; mActiveLayout->GetItemSize( itemId, targetSize, size ); - actor.SetSize( size.GetVectorXY() ); + actor.SetProperty( Actor::Property::SIZE, size.GetVectorXY() ); } // Refresh the new layout @@ -972,7 +972,7 @@ void ItemView::SetupActor( Item item, const Vector3& layoutSize ) { Vector3 size; mActiveLayout->GetItemSize( item.first, mActiveLayoutTargetSize, size ); - item.second.SetSize( size.GetVectorXY() ); + item.second.SetProperty( Actor::Property::SIZE, size.GetVectorXY() ); mActiveLayout->ApplyConstraints( item.second, item.first, layoutSize, Self() ); } diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp index 6bd7c3b..112b317 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp @@ -147,7 +147,7 @@ void ScrollOvershootEffectRipple::Apply() // make sure height is set, since we only create a constraint for image width mOvershootSize = mAttachedScrollView.GetOvershootSize(); - mOvershootOverlay.SetSize( mOvershootSize ); + mOvershootOverlay.SetProperty( Actor::Property::SIZE, mOvershootSize ); mAttachedScrollView.AddOverlay(mOvershootOverlay); @@ -244,15 +244,15 @@ void ScrollOvershootEffectRipple::UpdateVisibility( bool visible ) if(IsVertical()) { mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 0.0f ), Vector3::ZAXIS ) ) ); - mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth); + mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth ) ); } else { mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) ) ); - mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth); + mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth ) ); relativeOffset = Vector3(0.0f, 1.0f, 0.0f); } - mOvershootOverlay.SetPosition(relativeOffset * parentSize); + mOvershootOverlay.SetProperty( Actor::Property::POSITION, relativeOffset * parentSize ); } else { @@ -263,16 +263,16 @@ void ScrollOvershootEffectRipple::UpdateVisibility( bool visible ) if(IsVertical()) { mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( Math::PI ), Vector3::ZAXIS ) ) ); - mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth); + mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth ) ); relativeOffset = Vector3(1.0f, 1.0f, 0.0f); } else { mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 0.5f * Math::PI ), Vector3::ZAXIS ) ) ); - mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth); + mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth ) ); relativeOffset = Vector3(1.0f, 0.0f, 0.0f); } - mOvershootOverlay.SetPosition(relativeOffset * parentSize); + mOvershootOverlay.SetProperty( Actor::Property::POSITION, relativeOffset * parentSize ); } } } diff --git a/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp b/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp index 90ff3f4..9156aae 100644 --- a/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp +++ b/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp @@ -169,7 +169,7 @@ void ShadowView::SetShadowPlaneBackground(Actor shadowPlaneBackground) // position, instead parent the shadow plane drawable on the shadow plane passed in. mShadowPlaneBg.Add( mShadowPlane ); mShadowPlane.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mShadowPlane.SetZ( 1.0f ); + mShadowPlane.SetProperty( Actor::Property::POSITION_Z, 1.0f ); ConstrainCamera(); @@ -244,7 +244,7 @@ void ShadowView::OnInitialize() mCameraActor.SetNearClippingPlane( 1.0f ); mCameraActor.SetType( Dali::Camera::FREE_LOOK ); // Camera orientation constrained to point at shadow plane world position mCameraActor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Radian(Degree(180)), Vector3::YAXIS) ); - mCameraActor.SetPosition(DEFAULT_LIGHT_POSITION); + mCameraActor.SetProperty( Actor::Property::POSITION, DEFAULT_LIGHT_POSITION ); // Create render targets needed for rendering from light's point of view mSceneFromLightRenderTarget = FrameBuffer::New( stageSize.width, stageSize.height, FrameBuffer::Attachment::NONE ); diff --git a/dali-toolkit/internal/controls/slider/slider-impl.cpp b/dali-toolkit/internal/controls/slider/slider-impl.cpp index 94530e9..9f8d513 100755 --- a/dali-toolkit/internal/controls/slider/slider-impl.cpp +++ b/dali-toolkit/internal/controls/slider/slider-impl.cpp @@ -201,7 +201,7 @@ void Slider::OnInitialize() DisplayValue( mValue, false ); // Run this last to display the correct value // Size the Slider actor to a default - self.SetSize( DEFAULT_HIT_REGION.x, DEFAULT_HIT_REGION.y ); + self.SetProperty( Actor::Property::SIZE, Vector2( DEFAULT_HIT_REGION.x, DEFAULT_HIT_REGION.y ) ); // Connect to the touch signal self.TouchSignal().Connect( this, &Slider::OnTouch ); @@ -321,12 +321,12 @@ void Slider::DisplayValue( float value, bool raiseSignals ) float x = mDomain.from.x + percent * ( mDomain.to.x - mDomain.from.x ); - mHandle.SetX( x ); + mHandle.SetProperty( Actor::Property::POSITION_X, x ); // Progress bar if( mProgress ) { - mProgress.SetSize( x, GetTrackRegion().y ); + mProgress.SetProperty( Actor::Property::SIZE, Vector2( x, GetTrackRegion().y ) ); } // Signals @@ -430,7 +430,7 @@ void Slider::SetTrackVisual( Property::Map map ) mTrackRegion = size; if( mTrack ) { - mTrack.SetSize( mTrackRegion ); + mTrack.SetProperty( Actor::Property::SIZE, mTrackRegion ); } ResizeProgressRegion( Vector2( 0.0f, mTrackRegion.y ) ); @@ -570,7 +570,7 @@ void Slider::ResizeProgressRegion( const Vector2& region ) { if( mProgress ) { - mProgress.SetSize( region ); + mProgress.SetProperty( Actor::Property::SIZE, region ); } } @@ -674,7 +674,7 @@ void Slider::ResizeHandleSize( const Vector2& size ) { if( mHandle ) { - mHandle.SetSize( size ); + mHandle.SetProperty( Actor::Property::SIZE, size ); } } @@ -708,7 +708,7 @@ Actor Slider::CreateValueDisplay() popup.Add( mPopupArrow ); mPopup = CreatePopup(); - mPopup.SetSize( 0.0f, VALUE_POPUP_HEIGHT ); + mPopup.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, VALUE_POPUP_HEIGHT ) ); mPopupArrow.Add( mPopup ); return popup; @@ -789,7 +789,7 @@ void Slider::SetHitRegion( const Vector2& size ) if( mHitArea ) { - mHitArea.SetSize( mHitRegion ); + mHitArea.SetProperty( Actor::Property::SIZE, mHitRegion ); } } @@ -963,7 +963,7 @@ void Slider::SetTrackRegion( const Vector2& region ) if( mTrack ) { - mTrack.SetSize( mTrackRegion ); + mTrack.SetProperty( Actor::Property::SIZE, mTrackRegion ); } ResizeProgressRegion( Vector2( 0.0f, mTrackRegion.y ) ); diff --git a/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp b/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp index 1d6072c..1b55ce8 100644 --- a/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp +++ b/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp @@ -233,7 +233,7 @@ void SuperBlurView::BlurTexture( unsigned int idx, Texture texture ) GAUSSIAN_BLUR_RENDER_TARGET_PIXEL_FORMAT, GAUSSIAN_BLUR_DOWNSAMPLE_WIDTH_SCALE, GAUSSIAN_BLUR_DOWNSAMPLE_HEIGHT_SCALE, true ); mGaussianBlurView[idx].SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER ); - mGaussianBlurView[idx].SetSize(mTargetSize); + mGaussianBlurView[idx].SetProperty( Actor::Property::SIZE, mTargetSize ); Stage::GetCurrent().Add( mGaussianBlurView[idx] ); mGaussianBlurView[idx].SetUserImageAndOutputRenderTarget( texture, mBlurredImage[idx] ); diff --git a/dali-toolkit/internal/controls/table-view/table-view-impl.cpp b/dali-toolkit/internal/controls/table-view/table-view-impl.cpp index 3044818..f00190b 100755 --- a/dali-toolkit/internal/controls/table-view/table-view-impl.cpp +++ b/dali-toolkit/internal/controls/table-view/table-view-impl.cpp @@ -855,28 +855,28 @@ void TableView::OnRelayout( const Vector2& size, RelayoutContainer& container ) if( cellData.horizontalAlignment == HorizontalAlignment::LEFT ) { - actor.SetX( left + mPadding.width + padding.left ); + actor.SetProperty( Actor::Property::POSITION_X, left + mPadding.width + padding.left ); } else if( cellData.horizontalAlignment == HorizontalAlignment::RIGHT ) { - actor.SetX( right - mPadding.width - padding.right - actor.GetRelayoutSize( Dimension::WIDTH ) ); + actor.SetProperty( Actor::Property::POSITION_X, right - mPadding.width - padding.right - actor.GetRelayoutSize( Dimension::WIDTH ) ); } else //if( cellData.horizontalAlignment == HorizontalAlignment::CENTER ) { - actor.SetX( (left + right + padding.left - padding.right - actor.GetRelayoutSize( Dimension::WIDTH )) * 0.5f ); + actor.SetProperty( Actor::Property::POSITION_X, (left + right + padding.left - padding.right - actor.GetRelayoutSize( Dimension::WIDTH )) * 0.5f ); } if( cellData.verticalAlignment == VerticalAlignment::TOP ) { - actor.SetY( top + mPadding.height + padding.top ); + actor.SetProperty( Actor::Property::POSITION_Y, top + mPadding.height + padding.top ); } else if( cellData.verticalAlignment == VerticalAlignment::BOTTOM ) { - actor.SetY( bottom - mPadding.height - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT ) ); + actor.SetProperty( Actor::Property::POSITION_Y, bottom - mPadding.height - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT ) ); } else //if( cellData.verticalAlignment = VerticalAlignment::CENTER ) { - actor.SetY( (top + bottom + padding.top - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT )) * 0.5f ); + actor.SetProperty( Actor::Property::POSITION_Y, (top + bottom + padding.top - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT )) * 0.5f ); } } } diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp index 9384ec8..0ddac75 100755 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -1366,11 +1366,11 @@ void TextEditor::OnRelayout( const Vector2& size, RelayoutContainer& container ) if( mStencil ) { - mStencil.SetPosition( padding.start, padding.top ); + mStencil.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top )); } if( mActiveLayer ) { - mActiveLayer.SetPosition( padding.start, padding.top ); + mActiveLayer.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top )); } const Text::Controller::UpdateTextType updateTextType = mController->Relayout( contentSize, layoutDirection ); @@ -1843,7 +1843,7 @@ void TextEditor::ApplyScrollPosition() } else if ( Equals( scrollAmount, 0.0f, Math::MACHINE_EPSILON_1 )) { - mRenderableActor.SetPosition( scrollOffset.x + mAlignmentOffset, scrollOffset.y - scrollAmount ); + mRenderableActor.SetProperty( Actor::Property::POSITION, Vector2( scrollOffset.x + mAlignmentOffset, scrollOffset.y - scrollAmount )); } else { diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index 2b4fcc0..7e2d143 100755 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -1434,11 +1434,11 @@ void TextField::OnRelayout( const Vector2& size, RelayoutContainer& container ) if( mStencil ) { - mStencil.SetPosition( padding.start, padding.top ); + mStencil.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top )); } if( mActiveLayer ) { - mActiveLayer.SetPosition( padding.start, padding.top ); + mActiveLayer.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top )); } const Text::Controller::UpdateTextType updateTextType = mController->Relayout( contentSize, layoutDirection ); @@ -1540,7 +1540,7 @@ void TextField::RenderText( Text::Controller::UpdateTextType updateTextType ) renderableActorPositionY = scrollOffset.y + padding.top; } - mRenderableActor.SetPosition( renderableActorPositionX, renderableActorPositionY ); + mRenderableActor.SetProperty( Actor::Property::POSITION, Vector2( renderableActorPositionX, renderableActorPositionY )); // Make sure the actors are parented correctly with/without clipping Actor self = mStencil ? mStencil : Self(); @@ -1569,13 +1569,13 @@ void TextField::RenderText( Text::Controller::UpdateTextType updateTextType ) if ( mDecorator && mDecorator->IsHighlightVisible() ) { self.Add( mBackgroundActor ); - mBackgroundActor.SetPosition( renderableActorPositionX, renderableActorPositionY); // In text field's coords. + mBackgroundActor.SetProperty( Actor::Property::POSITION, Vector2( renderableActorPositionX, renderableActorPositionY) ); // In text field's coords. mBackgroundActor.LowerBelow( highlightActor ); } else { mRenderableActor.Add( mBackgroundActor ); - mBackgroundActor.SetPosition( 0.0f, 0.0f ); // In renderable actor's coords. + mBackgroundActor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ) ); // In renderable actor's coords. mBackgroundActor.LowerToBottom(); } } diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp index c9bc2b3..ed72527 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp @@ -765,7 +765,7 @@ std::string TextSelectionPopup::GetPressedImage() const #ifdef DECORATOR_DEBUG divider.SetProperty( Dali::Actor::Property::NAME,"Text's popup divider"); #endif - divider.SetSize( size ); + divider.SetProperty( Actor::Property::SIZE, size ); divider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT ); divider.SetBackgroundColor( mDividerColor ); mToolbar.AddDivider( divider ); diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp index 022ea1e..66f747e 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp @@ -178,7 +178,7 @@ void TextSelectionToolbar::OnRelayout( const Vector2& size, RelayoutContainer& c if( mScrollBar ) { float barWidth = std::min( mTableOfButtons.GetNaturalSize().width, size.width ) - 2.f * mScrollBarPadding.x; - mScrollBar.SetSize( Vector2( 0.0f, barWidth ) ); + mScrollBar.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, barWidth ) ); } } @@ -265,7 +265,7 @@ void TextSelectionToolbar::SetUpScrollBar( bool enable ) mScrollBar.SetStyleName( "TextSelectionScrollBar" ); mScrollBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); mScrollBar.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y ); + mScrollBar.SetProperty( Actor::Property::POSITION, Vector2( mScrollBarPadding.x, -mScrollBarPadding.y )); mScrollBar.SetResizePolicy( Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH ); mScrollBar.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) ) ); mScrollBar.SetScrollIndicator( indicator ); @@ -312,7 +312,7 @@ void TextSelectionToolbar::ResizeDividers( Size& size ) for( unsigned int i = 0; i < mDividerIndexes.Count(); ++i ) { Actor divider = mTableOfButtons.GetChildAt( Toolkit::TableView::CellPosition( 0, mDividerIndexes[ i ] ) ); - divider.SetSize( size ); + divider.SetProperty( Actor::Property::SIZE, size ); } RelayoutRequest(); } @@ -327,7 +327,7 @@ void TextSelectionToolbar::SetScrollBarPadding( const Vector2& padding ) mScrollBarPadding = padding; if( mScrollBar ) { - mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y ); + mScrollBar.SetProperty( Actor::Property::POSITION, Vector2( mScrollBarPadding.x, -mScrollBarPadding.y )); } RelayoutRequest(); diff --git a/dali-toolkit/internal/controls/tooltip/tooltip.cpp b/dali-toolkit/internal/controls/tooltip/tooltip.cpp index e8a5ebb..34b5482 100644 --- a/dali-toolkit/internal/controls/tooltip/tooltip.cpp +++ b/dali-toolkit/internal/controls/tooltip/tooltip.cpp @@ -658,7 +658,7 @@ void Tooltip::OnRelayout( Actor actor ) tail.SetProperty( Actor::Property::VISIBLE, false ); } - mPopup.SetPosition( position ); + mPopup.SetProperty( Actor::Property::POSITION, position ); } } diff --git a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp index ed1d2b3..06c3156 100755 --- a/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp +++ b/dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp @@ -138,8 +138,8 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture) Vector3 actorPos = control.GetProperty(Dali::Actor::Property::POSITION); mShadowControl = Dali::Toolkit::Control::New(); - mShadowControl.SetPosition(actorPos); - mShadowControl.SetSize(width, height); + mShadowControl.SetProperty( Actor::Property::POSITION, actorPos ); + mShadowControl.SetProperty( Actor::Property::SIZE, Vector2( width, height ) ); mShadowControl.SetBackgroundColor(Vector4(0.3f, 0.3f, 0.3f, 0.7f)); mShadowControl.SetProperty( Actor::Property::PARENT_ORIGIN, control.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ) ); mShadowControl.SetProperty( Actor::Property::ANCHOR_POINT,control.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); @@ -151,7 +151,7 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture) { Vector2 screenPosition = gesture.screenPosition; control.GetParent().ScreenToLocal(mLocalPosition.x, mLocalPosition.y, screenPosition.x, screenPosition.y); - mShadowControl.SetPosition(mLocalPosition.x - mDragLocalPosition.x, mLocalPosition.y - mDragLocalPosition.y); + mShadowControl.SetProperty( Actor::Property::POSITION, Vector2(mLocalPosition.x - mDragLocalPosition.x, mLocalPosition.y - mDragLocalPosition.y)); } if(gesture.state == Gesture::Finished) { diff --git a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp index a5adec7..d085081 100644 --- a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp +++ b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp @@ -141,7 +141,7 @@ void BlurTwoPassFilter::Enable() // create actor to render input with applied emboss effect mActorForInput = Actor::New(); mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForInput.SetSize( mTargetSize ); + mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize ); Renderer rendererForInput = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() ); SetRendererTexture( rendererForInput, mInputTexture ); mActorForInput.AddRenderer( rendererForInput ); @@ -154,7 +154,7 @@ void BlurTwoPassFilter::Enable() // create an actor to render mImageForHorz for vertical blur pass mActorForHorz = Actor::New(); mActorForHorz.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForHorz.SetSize( mTargetSize ); + mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize ); Renderer rendererForHorz = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() ); SetRendererTexture( rendererForHorz, textureForHorz ); mActorForHorz.AddRenderer( rendererForHorz ); @@ -171,7 +171,7 @@ void BlurTwoPassFilter::Enable() textureSetForBlending.SetTexture( 1u, mInputTexture ); mActorForBlending.AddRenderer( rendererForBlending ); mActorForBlending.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForBlending.SetSize( mTargetSize ); + mActorForBlending.SetProperty( Actor::Property::SIZE, mTargetSize ); for( int i = 0; i < kernelSize; ++i ) { @@ -257,15 +257,15 @@ void BlurTwoPassFilter::SetSize( const Vector2& size ) mTargetSize = size; if( mActorForInput ) { - mActorForInput.SetSize(mTargetSize); + mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize); } if( mActorForHorz ) { - mActorForHorz.SetSize(mTargetSize); + mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize); } if( mActorForBlending ) { - mActorForBlending.SetSize(mTargetSize); + mActorForBlending.SetProperty( Actor::Property::SIZE, mTargetSize); } } diff --git a/dali-toolkit/internal/filters/emboss-filter.cpp b/dali-toolkit/internal/filters/emboss-filter.cpp index ed87213..583e27d 100644 --- a/dali-toolkit/internal/filters/emboss-filter.cpp +++ b/dali-toolkit/internal/filters/emboss-filter.cpp @@ -98,7 +98,7 @@ void EmbossFilter::Enable() // create actor to render input with applied emboss effect mActorForInput1 = Actor::New(); mActorForInput1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForInput1.SetSize(mTargetSize); + mActorForInput1.SetProperty( Actor::Property::SIZE, mTargetSize); Vector2 textureScale( 1.5f/mTargetSize.width, 1.5f/mTargetSize.height); mActorForInput1.RegisterProperty( TEX_SCALE_UNIFORM_NAME, textureScale ); mActorForInput1.RegisterProperty( COEFFICIENT_UNIFORM_NAME, Vector3( 2.f, -1.f, -1.f ) ); @@ -110,7 +110,7 @@ void EmbossFilter::Enable() mActorForInput2 = Actor::New(); mActorForInput2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForInput2.SetSize(mTargetSize); + mActorForInput2.SetProperty( Actor::Property::SIZE, mTargetSize); mActorForInput2.RegisterProperty( TEX_SCALE_UNIFORM_NAME, textureScale ); mActorForInput2.RegisterProperty( COEFFICIENT_UNIFORM_NAME, Vector3( -1.f, -1.f, 2.f ) ); // set EMBOSS custom shader @@ -121,7 +121,7 @@ void EmbossFilter::Enable() mActorForComposite = Actor::New(); mActorForComposite.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForComposite.SetSize(mTargetSize); + mActorForComposite.SetProperty( Actor::Property::SIZE, mTargetSize); mActorForComposite.SetProperty( Actor::Property::COLOR, Color::BLACK ); mRootActor.Add( mActorForComposite ); @@ -211,15 +211,15 @@ void EmbossFilter::SetSize( const Vector2& size ) mTargetSize = size; if( mActorForInput1 ) { - mActorForInput1.SetSize(mTargetSize); + mActorForInput1.SetProperty( Actor::Property::SIZE, mTargetSize); } if( mActorForInput2 ) { - mActorForInput2.SetSize(mTargetSize); + mActorForInput2.SetProperty( Actor::Property::SIZE, mTargetSize); } if( mActorForComposite ) { - mActorForComposite.SetSize(mTargetSize); + mActorForComposite.SetProperty( Actor::Property::SIZE, mTargetSize); } } diff --git a/dali-toolkit/internal/filters/image-filter.cpp b/dali-toolkit/internal/filters/image-filter.cpp index c33cbfe..1d786d6 100644 --- a/dali-toolkit/internal/filters/image-filter.cpp +++ b/dali-toolkit/internal/filters/image-filter.cpp @@ -132,7 +132,7 @@ void ImageFilter::SetupCamera() mCameraActor.SetNearClippingPlane(1.0f); mCameraActor.SetAspectRatio(mTargetSize.width / mTargetSize.height); mCameraActor.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor - mCameraActor.SetPosition(0.0f, 0.0f, ((mTargetSize.height * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f))); + mCameraActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, ( (mTargetSize.height * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f) ) ) ); } } diff --git a/dali-toolkit/internal/filters/spread-filter.cpp b/dali-toolkit/internal/filters/spread-filter.cpp index 216f3a0..f117a17 100644 --- a/dali-toolkit/internal/filters/spread-filter.cpp +++ b/dali-toolkit/internal/filters/spread-filter.cpp @@ -85,7 +85,7 @@ void SpreadFilter::Enable() // create actor to render input with applied emboss effect mActorForInput = Actor::New(); mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForInput.SetSize(mTargetSize); + mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize); // register properties as shader uniforms mActorForInput.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread ); mActorForInput.RegisterProperty( TEX_SCALE_UNIFORM_NAME, Vector2( 1.0f / mTargetSize.width, 0.0f ) ); @@ -102,7 +102,7 @@ void SpreadFilter::Enable() // create an actor to render mImageForHorz for vertical blur pass mActorForHorz = Actor::New(); mActorForHorz.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActorForHorz.SetSize(mTargetSize); + mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize); // register properties as shader uniforms mActorForHorz.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread ); mActorForHorz.RegisterProperty( TEX_SCALE_UNIFORM_NAME, Vector2( 0.0f, 1.0f / mTargetSize.height ) ); @@ -172,11 +172,11 @@ void SpreadFilter::SetSize( const Vector2& size ) mTargetSize = size; if( mActorForInput ) { - mActorForInput.SetSize(mTargetSize); + mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize); } if( mActorForHorz ) { - mActorForHorz.SetSize(mTargetSize); + mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize); } } diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index 0960d91..89e280f 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -741,7 +741,7 @@ Actor KeyboardFocusManager::GetFocusIndicatorActor() mFocusIndicatorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mFocusIndicatorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mFocusIndicatorActor.SetPosition(0.0f, 0.0f); + mFocusIndicatorActor.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f)); return mFocusIndicatorActor; } diff --git a/dali-toolkit/internal/text/decorator/text-decorator.cpp b/dali-toolkit/internal/text/decorator/text-decorator.cpp index 42a79fb..65a5f68 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.cpp +++ b/dali-toolkit/internal/text/decorator/text-decorator.cpp @@ -296,9 +296,9 @@ struct Decorator::Impl : public ConnectionTracker ( cursor.position.y > -Math::MACHINE_EPSILON_1000 ) ); if( mPrimaryCursorVisible ) { - mPrimaryCursor.SetPosition( cursor.position.x, - cursor.position.y ); - mPrimaryCursor.SetSize( Size( mCursorWidth, cursor.cursorHeight ) ); + mPrimaryCursor.SetProperty( Actor::Property::POSITION, Vector2( cursor.position.x, + cursor.position.y ) ); + mPrimaryCursor.SetProperty( Actor::Property::SIZE, Size( mCursorWidth, cursor.cursorHeight ) ); } mPrimaryCursor.SetProperty( Actor::Property::VISIBLE, mPrimaryCursorVisible && mCursorBlinkStatus ); } @@ -311,9 +311,9 @@ struct Decorator::Impl : public ConnectionTracker ( cursor.position.y > -Math::MACHINE_EPSILON_1000 ) ); if( mSecondaryCursorVisible ) { - mSecondaryCursor.SetPosition( cursor.position.x, - cursor.position.y ); - mSecondaryCursor.SetSize( Size( mCursorWidth, cursor.cursorHeight ) ); + mSecondaryCursor.SetProperty( Actor::Property::POSITION, Vector2( cursor.position.x, + cursor.position.y ) ); + mSecondaryCursor.SetProperty( Actor::Property::SIZE, Size( mCursorWidth, cursor.cursorHeight ) ); } mSecondaryCursor.SetProperty( Actor::Property::VISIBLE, mSecondaryCursorVisible && mCursorBlinkStatus ); } @@ -651,7 +651,7 @@ struct Decorator::Impl : public ConnectionTracker mCopyPastePopup.position.x = floorf( mCopyPastePopup.position.x ); mCopyPastePopup.position.y = floorf( mCopyPastePopup.position.y ); - mCopyPastePopup.actor.SetPosition( mCopyPastePopup.position ); + mCopyPastePopup.actor.SetProperty( Actor::Property::POSITION, mCopyPastePopup.position ); mPopupSetNewPosition = false; } @@ -786,7 +786,7 @@ struct Decorator::Impl : public ConnectionTracker { if( handle.markerActor ) { - handle.markerActor.SetSize( 0, handle.lineHeight ); + handle.markerActor.SetProperty( Actor::Property::SIZE, Vector2( 0, handle.lineHeight ) ); } } @@ -1003,8 +1003,8 @@ struct Decorator::Impl : public ConnectionTracker if( grabHandle.actor ) { - grabHandle.actor.SetPosition( grabHandle.position.x + floor( 0.5f * mCursorWidth ) + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementX : 0.f ), - yLocalPosition + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementY : 0.f ) ); + grabHandle.actor.SetProperty( Actor::Property::POSITION, Vector2( grabHandle.position.x + floor( 0.5f * mCursorWidth ) + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementX : 0.f ), + yLocalPosition + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementY : 0.f ) ) ); } } @@ -1096,8 +1096,8 @@ struct Decorator::Impl : public ConnectionTracker if( handle.actor ) { - handle.actor.SetPosition( handle.position.x + ( mSmoothHandlePanEnabled ? handle.grabDisplacementX : 0.f ), - yLocalPosition + ( mSmoothHandlePanEnabled ? handle.grabDisplacementY : 0.f ) ); + handle.actor.SetProperty( Actor::Property::POSITION, Vector2( handle.position.x + ( mSmoothHandlePanEnabled ? handle.grabDisplacementX : 0.f ), + yLocalPosition + ( mSmoothHandlePanEnabled ? handle.grabDisplacementY : 0.f ) ) ); } } @@ -1164,14 +1164,14 @@ struct Decorator::Impl : public ConnectionTracker if ( mHighlightActor ) { // Sets the position of the highlight actor inside the decorator. - mHighlightActor.SetPosition( mHighlightPosition.x + mHighlightOutlineOffset, - mHighlightPosition.y + mHighlightOutlineOffset ); + mHighlightActor.SetProperty( Actor::Property::POSITION, Vector2( mHighlightPosition.x + mHighlightOutlineOffset, + mHighlightPosition.y + mHighlightOutlineOffset ) ); const unsigned int numberOfQuads = mHighlightQuadList.Count(); if( 0u != numberOfQuads ) { // Set the size of the highlighted text to the actor. - mHighlightActor.SetSize( mHighlightSize ); + mHighlightActor.SetProperty( Actor::Property::SIZE, mHighlightSize ); // Used to translate the vertices given in decorator's coords to the mHighlightActor's local coords. const float offsetX = mHighlightPosition.x + 0.5f * mHighlightSize.width; @@ -1711,7 +1711,7 @@ struct Decorator::Impl : public ConnectionTracker const float popupHeight = mCopyPastePopup.actor.GetRelayoutSize( Dimension::HEIGHT ); // Sets the position of the popup below. - mCopyPastePopup.actor.SetY( floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, true ) ) ); + mCopyPastePopup.actor.SetProperty( Actor::Property::POSITION_Y, floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, true ) ) ); } void PopUpLeavesBottomBoundary( PropertyNotification& source ) @@ -1719,7 +1719,7 @@ struct Decorator::Impl : public ConnectionTracker const float popupHeight = mCopyPastePopup.actor.GetRelayoutSize( Dimension::HEIGHT ); // Sets the position of the popup above. - mCopyPastePopup.actor.SetY( floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, false ) ) ); + mCopyPastePopup.actor.SetProperty( Actor::Property::POSITION_Y, floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, false ) ) ); } void SetUpPopupPositionNotifications( const Vector3& popupHalfSize ) diff --git a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp index 2fe54b0..cd043e2 100755 --- a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp @@ -371,7 +371,7 @@ struct AtlasRenderer::Impl mActor = Actor::New(); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mActor.SetSize( textSize ); + mActor.SetProperty( Actor::Property::SIZE, textSize ); mActor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR ); } @@ -742,7 +742,7 @@ struct AtlasRenderer::Impl // Keep all of the origins aligned actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - actor.SetSize( actorSize ); + actor.SetProperty( Actor::Property::SIZE, actorSize ); actor.RegisterProperty("uOffset", Vector2::ZERO ); actor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR ); diff --git a/dali-toolkit/internal/text/rendering/vector-based/vector-based-renderer.cpp b/dali-toolkit/internal/text/rendering/vector-based/vector-based-renderer.cpp index 8e6e0f2..1d56ef5 100644 --- a/dali-toolkit/internal/text/rendering/vector-based/vector-based-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/vector-based/vector-based-renderer.cpp @@ -191,7 +191,7 @@ Actor VectorBasedRenderer::Render( Text::ViewInterface& view, mImpl->mActor = Actor::New(); mImpl->mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mImpl->mActor.SetSize( view.GetControlSize() ); + mImpl->mActor.SetProperty( Actor::Property::SIZE, Vector2( view.GetControlSize() ); mImpl->mActor.SetProperty( Actor::Property::COLOR, Color::WHITE ); #if defined(DEBUG_ENABLED) mImpl->mActor.SetProperty( Dali::Actor::Property::NAME, "Text renderable actor" ); diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index 5470d8d..8cb03b4 100755 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -3405,7 +3405,7 @@ Actor Controller::Impl::CreateBackgroundActor() actor.SetProperty( Dali::Actor::Property::NAME, "TextBackgroundColorActor" ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - actor.SetSize( textSize ); + actor.SetProperty( Actor::Property::SIZE, textSize ); actor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR ); actor.AddRenderer( renderer ); } diff --git a/dali-toolkit/internal/text/text-vertical-scroller.cpp b/dali-toolkit/internal/text/text-vertical-scroller.cpp index b9d6606..4f1c4b3 100644 --- a/dali-toolkit/internal/text/text-vertical-scroller.cpp +++ b/dali-toolkit/internal/text/text-vertical-scroller.cpp @@ -63,7 +63,7 @@ void TextVerticalScroller::CheckStartAnimation( Actor& sourceActor, float x, flo { mScrollAnimation.Clear(); } - sourceActor.SetPosition( x, y ); + sourceActor.SetProperty( Actor::Property::POSITION, Vector2( x, y )); return; } float toY = y + scrollAmount; @@ -81,7 +81,7 @@ void TextVerticalScroller::CheckStartAnimation( Actor& sourceActor, float x, flo mScrollTo = toY; // Set animation attribute - sourceActor.SetPosition( x, y ); + sourceActor.SetProperty( Actor::Property::POSITION, Vector2( x, y )); mScrollAnimation.AnimateTo( Property(sourceActor, Actor::Property::POSITION_Y), mScrollTo, AlphaFunction::EASE_OUT_SINE ); mScrollAnimation.Play(); } diff --git a/dali-toolkit/public-api/controls/buttons/check-box-button.h b/dali-toolkit/public-api/controls/buttons/check-box-button.h index 9322a46..675ae70 100644 --- a/dali-toolkit/public-api/controls/buttons/check-box-button.h +++ b/dali-toolkit/public-api/controls/buttons/check-box-button.h @@ -61,7 +61,7 @@ class CheckBoxButton; * CheckBoxButton button = CheckBoxButton::New(); * button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); * button.SetProperty( Button::Property::LABEL, "Check" ); - * button.SetSize( 200, 40 ); + * button.SetProperty( Actor::Property::SIZE, Vector2( 200, 40 ); * button.SetBackgroundColor( Color::WHITE ); * Stage::GetCurrent().Add( button ); * diff --git a/dali-toolkit/public-api/controls/buttons/radio-button.h b/dali-toolkit/public-api/controls/buttons/radio-button.h index 18a999a..d241e74 100644 --- a/dali-toolkit/public-api/controls/buttons/radio-button.h +++ b/dali-toolkit/public-api/controls/buttons/radio-button.h @@ -71,14 +71,14 @@ class RadioButton; * RadioButton button1 = RadioButton::New(); * button1.SetProperty( Button::Property::LABEL, "button1" ); * button1.SetBackgroundColor( Color::WHITE ); - * button1.SetPosition( 0, -40 ); + * button1.SetProperty( Actor::Property::POSITION, Vector2( 0, -40 ) ); * radioGroup.Add( button1 ); * * // Make more RadioButtons and add them to their parent * RadioButton button2 = RadioButton::New(); * button2.SetProperty( Toolkit::Button::Property::LABEL, "button2" ); * button2.SetBackgroundColor( Color::WHITE ); - * button2.SetPosition( 0, 40 ); + * button2.SetProperty( Actor::Property::POSITION, Vector2( 0, 40 ) ); * radioGroup.Add( button2 ); * * @endcode diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 1be8bd6..ba1fd7f 100755 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -504,7 +504,7 @@ void Control::OnPinch(const PinchGesture& pinch) *( mImpl->mStartingPinchScale ) = Self().GetCurrentProperty< Vector3 >( Actor::Property::SCALE ); } - Self().SetScale( *( mImpl->mStartingPinchScale ) * pinch.scale ); + Self().SetProperty( Actor::Property::SCALE, *( mImpl->mStartingPinchScale ) * pinch.scale ); } void Control::OnPan( const PanGesture& pan ) @@ -668,7 +668,7 @@ void Control::OnRelayout( const Vector2& size, RelayoutContainer& container ) childOffset.x += ( mImpl->mMargin.start + padding.start ); childOffset.y += ( mImpl->mMargin.top + padding.top ); - child.SetPosition( childOffset.x, childOffset.y ); + child.SetProperty( Actor::Property::POSITION, Vector2( childOffset.x, childOffset.y ) ); } container.Add( child, newChildSize ); } diff --git a/docs/content/programming-guide/animation-multi-threading-notes.h b/docs/content/programming-guide/animation-multi-threading-notes.h index 631aae6..5027fd5 100644 --- a/docs/content/programming-guide/animation-multi-threading-notes.h +++ b/docs/content/programming-guide/animation-multi-threading-notes.h @@ -15,7 +15,7 @@ An example actor hierachy is shown below, in which one of the actors is being an When a property is animatable, it can only be modified in the rendering thread. The value returned from the property, is the value used when the previous frame was rendered. -For example \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" returns the position at which the Actor was last rendered. Since \ref Dali::Actor::SetPosition "Dali::Actor::SetPosition" is asynchronous, a call to \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" won't immediately return the same value. +For example \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" returns the position at which the Actor was last rendered. Since \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" is asynchronous, a call to GetProperty( \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" ) won't immediately return the same value. @code // Whilst handling an event... @@ -23,7 +23,7 @@ For example \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITIO Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); // initial position is 0,0,0 -actor.SetPosition(Vector3(10,10,10)); +actor.SetProperty( Actor::Property::POSITION, Vector3(10.0f, 10.0f, 10.0f) ); Vector3 current; current = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); @@ -48,7 +48,7 @@ The example code above would likely output:

Setting a property during an animation

-When a property is being animated, the Animation will override any values set e.g. with Actor::SetPosition() +When a property is being animated, the Animation will override any values set e.g. with Actor::Property::Position. \image html multi-threaded-animation-2.png diff --git a/docs/content/programming-guide/event-system.h b/docs/content/programming-guide/event-system.h index 9e0c1b2..1498ed0 100644 --- a/docs/content/programming-guide/event-system.h +++ b/docs/content/programming-guide/event-system.h @@ -73,7 +73,7 @@ void OnPinch( Dali::Actor actor, const Dali::PinchGesture& pinch ) { // Scale your actor according to the pinch scale Vector3 newSize = actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * pinch.scale; - actor.SetSize(newSize); + actor.SetProperty( Actor::Property::SIZE, newSize ); } // Elsewhere diff --git a/docs/content/programming-guide/popup.md b/docs/content/programming-guide/popup.md index 28b9854..4165900 100644 --- a/docs/content/programming-guide/popup.md +++ b/docs/content/programming-guide/popup.md @@ -240,7 +240,7 @@ popup.SetContent( contentActor ); ImageView footer = ImageView::New( DEFAULT_CONTROL_AREA_IMAGE_PATH ); footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); -footer.SetSize( 0.0f, 80.0f ); +footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 80.0f ) ); footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); footer.SetParentOrigin( ParentOrigin::CENTER ); diff --git a/docs/content/programming-guide/scroll-view.h b/docs/content/programming-guide/scroll-view.h index f236440..5fa445f 100644 --- a/docs/content/programming-guide/scroll-view.h +++ b/docs/content/programming-guide/scroll-view.h @@ -26,7 +26,7 @@ @code Stage stage = Dali::Stage::GetCurrent(); Size size = stage.GetSize(); - myScrollView.SetSize( size ); + myScrollView.SetProperty( Actor::Property::SIZE, size ); @endcode Add Actors to this ScrollView diff --git a/docs/content/programming-guide/size-negotiation.h b/docs/content/programming-guide/size-negotiation.h index ab8c06a..d33109b 100644 --- a/docs/content/programming-guide/size-negotiation.h +++ b/docs/content/programming-guide/size-negotiation.h @@ -160,7 +160,7 @@ Dali::Image checked = Dali::ResourceImage::New( CHECKBOX_CHECKED_IMAGE ); Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); checkBox.SetBackgroundImage( unchecked ); checkBox.SetSelectedImage( checked ); -checkBox.SetSize( Vector2( 48, 48 ) ); +checkBox.SetProperty( Actor::Property::SIZE, Vector2( 48, 48 ) ); root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) ); diff --git a/docs/content/programming-guide/visuals.md b/docs/content/programming-guide/visuals.md index 3a58a6d..20cdec5 100644 --- a/docs/content/programming-guide/visuals.md +++ b/docs/content/programming-guide/visuals.md @@ -356,7 +356,7 @@ Dali::Property::Map map; map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::IMAGE; map[ Dali::Toolkit::ImageVisual::Property::URL ] = "path-to-image.svg"; -control.SetSize( 200.f, 200.f ); +control.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) ); control.SetProperty( Control::Property::BACKGROUND, map ); ~~~ ___________________________________________________________________________________________________ -- 2.7.4