From 2e182925204bf3ef9f2a36cbfbf998e79fbafaf5 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 2 Jun 2020 17:45:04 +0100 Subject: [PATCH] Further Setter/Getter public API removal from Dali::Actor Change-Id: If168017bda9472f348e4a6d2a44a3f2e83c5261c --- builder/dali-builder.cpp | 2 +- .../alpha-blending-cpu-example.cpp | 6 +-- .../animated-gradient-call-active.cpp | 46 +++++++++++----------- .../animated-gradient-card-active.cpp | 22 +++++------ .../animated-images/animated-images-example.cpp | 4 +- .../animated-shapes/animated-shapes-example.cpp | 12 +++--- examples/arc-visual/arc-visual-example.cpp | 2 +- examples/benchmark/benchmark.cpp | 12 +++--- examples/bezier-curve/bezier-curve-example.cpp | 4 +- examples/blocks/blocks-example.cpp | 26 ++++++------ examples/bloom-view/bloom-view-example.cpp | 18 ++++----- examples/bubble-effect/bubble-effect-example.cpp | 2 +- examples/builder/examples.cpp | 2 +- examples/buttons/buttons-example.cpp | 20 +++++----- examples/clipping/clipping-example.cpp | 2 +- examples/color-visual/color-visual-example.cpp | 2 +- .../compressed-texture-formats-example.cpp | 2 +- examples/contact-cards/contact-card.cpp | 22 +++++------ .../cube-transition-effect-example.cpp | 6 +-- examples/deferred-shading/deferred-shading.cpp | 6 +-- .../dissolve-effect/dissolve-effect-example.cpp | 6 +-- examples/drag-and-drop/drag-and-drop-example.cpp | 6 +-- examples/effects-view/effects-view-example.cpp | 14 +++---- examples/flex-container/flex-container-example.cpp | 6 +-- examples/focus-integration/focus-integration.cpp | 6 +-- examples/fpp-game/fpp-game-tutorial-controller.cpp | 8 ++-- examples/fpp-game/game-camera.cpp | 8 ++-- examples/fpp-game/game-entity.cpp | 6 +-- examples/fpp-game/game-scene.cpp | 4 +- examples/frame-callback/frame-callback-example.cpp | 2 +- .../gaussian-blur-view-example.cpp | 4 +- examples/gestures/gesture-example.cpp | 8 ++-- examples/hello-world/hello-world-example.cpp | 18 --------- .../homescreen-benchmark/homescreen-benchmark.cpp | 8 ++-- examples/image-policies/image-policies-example.cpp | 4 +- .../image-scaling-and-filtering-example.cpp | 32 +++++++-------- .../image-scaling-irregular-grid-example.cpp | 6 +-- .../image-view-alpha-blending-example.cpp | 12 +++--- .../image-view-pixel-area-example.cpp | 6 +-- examples/image-view-svg/image-view-svg-example.cpp | 18 ++++----- examples/image-view-url/image-view-url-example.cpp | 2 +- examples/image-view/image-view-example.cpp | 2 +- examples/item-view/item-view-example.cpp | 26 ++++++------ examples/line-mesh/line-mesh-example.cpp | 4 +- examples/magnifier/magnifier-example.cpp | 10 ++--- examples/mesh-morph/mesh-morph-example.cpp | 2 +- examples/mesh-visual/mesh-visual-example.cpp | 4 +- .../metaball-explosion-example.cpp | 8 ++-- .../metaball-refrac/metaball-refrac-example.cpp | 6 +-- examples/model3d-view/model3d-view-example.cpp | 10 ++--- examples/motion-blur/motion-blur-example.cpp | 8 ++-- examples/motion-stretch/motion-stretch-example.cpp | 8 ++-- .../native-image-source-example.cpp | 28 ++++++------- examples/perf-scroll/perf-scroll.cpp | 12 +++--- examples/point-mesh/point-mesh-example.cpp | 2 +- examples/popup/popup-example.cpp | 10 ++--- .../pre-render-callback-example.cpp | 10 ++--- examples/progress-bar/progress-bar-example.cpp | 2 +- examples/reflection-demo/reflection-example.cpp | 12 +++--- .../refraction-effect-example.cpp | 2 +- .../remote-image-loading-example.cpp | 10 ++--- .../renderer-stencil/renderer-stencil-example.cpp | 8 ++-- .../rendering-basic-light-example.cpp | 4 +- examples/rendering-basic-pbr/model-pbr.cpp | 4 +- examples/rendering-basic-pbr/model-skybox.cpp | 2 +- .../rendering-basic-pbr-example.cpp | 8 ++-- examples/rendering-cube/rendering-cube.cpp | 4 +- examples/rendering-line/rendering-line.cpp | 4 +- .../rendering-radial-progress/radial-progress.cpp | 2 +- examples/rendering-skybox/look-camera.cpp | 6 +-- examples/rendering-skybox/rendering-skybox.cpp | 4 +- .../rendering-textured-cube.cpp | 4 +- examples/rendering-triangle/rendering-triangle.cpp | 4 +- examples/scroll-view/scroll-view-example.cpp | 8 ++-- .../shadows-and-lights-example.cpp | 22 +++++------ .../simple-text-label-example.cpp | 16 ++++---- .../simple-scroll-view-example.cpp | 4 +- examples/simple-text-field/simple-text-field.cpp | 2 +- .../simple-text-label-example.cpp | 2 +- .../simple-text-renderer-example.cpp | 4 +- .../size-negotiation/size-negotiation-example.cpp | 20 +++++----- examples/sparkle/sparkle-effect-example.cpp | 10 ++--- examples/styling/styling-application.cpp | 12 +++--- .../super-blur-view/super-blur-view-example.cpp | 2 +- examples/text-editor/text-editor-example.cpp | 4 +- examples/text-fonts/text-fonts-example.cpp | 12 +++--- examples/text-label/expanding-buttons-impl.cpp | 2 +- examples/text-label/text-label-example.cpp | 18 ++++----- .../text-memory-profiling-example.cpp | 4 +- examples/text-overlap/text-overlap-example.cpp | 4 +- examples/text-scrolling/text-scrolling-example.cpp | 24 +++++------ examples/textured-mesh/textured-mesh-example.cpp | 4 +- examples/tooltip/tooltip-example.cpp | 2 +- examples/video-view/video-view-example.cpp | 30 +++++++------- .../visual-transitions/transition-application.cpp | 2 +- examples/web-view/web-view-example.cpp | 4 +- shared/dali-table-view.cpp | 4 +- shared/view.h | 2 +- 98 files changed, 416 insertions(+), 434 deletions(-) diff --git a/builder/dali-builder.cpp b/builder/dali-builder.cpp index a688f58..433112d 100644 --- a/builder/dali-builder.cpp +++ b/builder/dali-builder.cpp @@ -217,7 +217,7 @@ private: layer = Layer::New(); layer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); - layer.SetSize( stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); + layer.SetProperty( Actor::Property::SIZE, stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); stage.GetRootLayer().Add(layer); // render tasks may have been setup last load so remove them diff --git a/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp b/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp index 280259a..2389c93 100644 --- a/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp +++ b/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp @@ -60,21 +60,21 @@ private: mImageView = Toolkit::ImageView::New(); - mImageView.SetSize(200, 200); + mImageView.SetProperty( Actor::Property::SIZE, Vector2(200, 200) ); mImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.Add(mImageView); mImageLabel = Toolkit::TextLabel::New(); mImageLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mImageLabel.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER ); - mImageLabel.SetPosition( Vector3( 0.0f, -50.0f, 0.0f ) ); + mImageLabel.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -50.0f, 0.0f ) ); mImageLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLACK ); stage.Add(mImageLabel); mMaskLabel = Toolkit::TextLabel::New(); mMaskLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mMaskLabel.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER ); - mMaskLabel.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); + mMaskLabel.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); mMaskLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLACK ); stage.Add(mMaskLabel); diff --git a/examples/animated-gradient-call-active/animated-gradient-call-active.cpp b/examples/animated-gradient-call-active/animated-gradient-call-active.cpp index 7bb03e1..cf63455 100644 --- a/examples/animated-gradient-call-active/animated-gradient-call-active.cpp +++ b/examples/animated-gradient-call-active/animated-gradient-call-active.cpp @@ -149,7 +149,7 @@ public: mBackground = Control::New(); mBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mBackground.SetSize( STAGE_SIZE ); + mBackground.SetProperty( Actor::Property::SIZE, STAGE_SIZE ); mStage.Add( mBackground ); @@ -192,21 +192,21 @@ private: mButtonIconDecall.SetImage( ICON_DECALL_IMAGE ); mButtonIconDecall.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mButtonIconDecall.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mButtonIconDecall.SetSize( ICON_DECALL_SIZE * SCALED_WIDTH ); - mButtonIconDecall.SetPosition( ICON_DECALL_POSITION * SCALED_WIDTH ); + mButtonIconDecall.SetProperty( Actor::Property::SIZE, ICON_DECALL_SIZE * SCALED_WIDTH ); + mButtonIconDecall.SetProperty( Actor::Property::POSITION, ICON_DECALL_POSITION * SCALED_WIDTH ); mButtonIconBattery = ImageView::New(); mButtonIconBattery.SetImage( ICON_BATTERY_IMAGE ); mButtonIconBattery.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); mButtonIconBattery.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); - mButtonIconBattery.SetSize( ICON_BATTERY_SIZE * SCALED_WIDTH ); - mButtonIconBattery.SetPosition( ICON_BATTERY_POSITION * SCALED_WIDTH ); + mButtonIconBattery.SetProperty( Actor::Property::SIZE, ICON_BATTERY_SIZE * SCALED_WIDTH ); + mButtonIconBattery.SetProperty( Actor::Property::POSITION, ICON_BATTERY_POSITION * SCALED_WIDTH ); mCallStartButton = PushButton::New(); mCallStartButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCallStartButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mCallStartButton.SetSize( BUTTON_CALL_START_SIZE * SCALED_WIDTH ); - mCallStartButton.SetPosition( BUTTON_CALL_START_POSITION * SCALED_WIDTH ); + mCallStartButton.SetProperty( Actor::Property::SIZE, BUTTON_CALL_START_SIZE * SCALED_WIDTH ); + mCallStartButton.SetProperty( Actor::Property::POSITION, BUTTON_CALL_START_POSITION * SCALED_WIDTH ); mCallStartButton.ClickedSignal().Connect( this, &CallController::OnButtonClicked ); mCallStartButton.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE ); mCallStartButton.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE ); @@ -220,8 +220,8 @@ private: mLabelIncoming = TextLabel::New( LABEL_INCOMING_STR ); mLabelIncoming.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLabelIncoming.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mLabelIncoming.SetSize( LABEL_INCOMING_SIZE * SCALED_STAGE_SIZE ); - mLabelIncoming.SetPosition( LABEL_INCOMING_POSITION * SCALED_STAGE_SIZE_3 ); + mLabelIncoming.SetProperty( Actor::Property::SIZE, LABEL_INCOMING_SIZE * SCALED_STAGE_SIZE ); + mLabelIncoming.SetProperty( Actor::Property::POSITION, LABEL_INCOMING_POSITION * SCALED_STAGE_SIZE_3 ); mLabelIncoming.SetProperty( Actor::Property::VISIBLE, true ); mLabelIncoming.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_INCOMING_FONT_COLOR ); mLabelIncoming.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_INCOMING_FONT_SIZE * FONT_SCALE ); @@ -231,8 +231,8 @@ private: mLabelName = TextLabel::New( LABEL_NAME_STR ); mLabelName.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLabelName.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mLabelName.SetSize( LABEL_NAME_SIZE * SCALED_STAGE_SIZE ); - mLabelName.SetPosition( LABEL_NAME_POSITION * SCALED_STAGE_SIZE_3 ); + mLabelName.SetProperty( Actor::Property::SIZE, LABEL_NAME_SIZE * SCALED_STAGE_SIZE ); + mLabelName.SetProperty( Actor::Property::POSITION, LABEL_NAME_POSITION * SCALED_STAGE_SIZE_3 ); mLabelName.SetProperty( Actor::Property::VISIBLE, true ); mLabelName.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_NAME_FONT_COLOR ); mLabelName.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_NAME_FONT_SIZE * FONT_SCALE ); @@ -242,8 +242,8 @@ private: mLabelNumber = TextLabel::New( LABEL_NUMBER_STR ); mLabelNumber.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLabelNumber.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mLabelNumber.SetSize( LABEL_NUMBER_SIZE * SCALED_STAGE_SIZE ); - mLabelNumber.SetPosition( LABEL_NUMBER_POSITION * SCALED_STAGE_SIZE_3 ); + mLabelNumber.SetProperty( Actor::Property::SIZE, LABEL_NUMBER_SIZE * SCALED_STAGE_SIZE ); + mLabelNumber.SetProperty( Actor::Property::POSITION, LABEL_NUMBER_POSITION * SCALED_STAGE_SIZE_3 ); mLabelNumber.SetProperty( Actor::Property::VISIBLE, true ); mLabelNumber.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_NUMBER_FONT_COLOR ); mLabelNumber.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_NUMBER_FONT_SIZE * FONT_SCALE ); @@ -253,8 +253,8 @@ private: mLabelDecline = TextLabel::New( LABEL_DECLINE_STR ); mLabelDecline.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mLabelDecline.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); - mLabelDecline.SetSize( LABEL_DECLINE_SIZE * SCALED_STAGE_SIZE ); - mLabelDecline.SetPosition( LABEL_DECLINE_POSITION * SCALED_WIDTH ); + mLabelDecline.SetProperty( Actor::Property::SIZE, LABEL_DECLINE_SIZE * SCALED_STAGE_SIZE ); + mLabelDecline.SetProperty( Actor::Property::POSITION, LABEL_DECLINE_POSITION * SCALED_WIDTH ); mLabelDecline.SetProperty( Actor::Property::VISIBLE, true ); mLabelDecline.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_DECLINE_FONT_COLOR ); mLabelDecline.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_DECLINE_FONT_SIZE * FONT_SCALE ); @@ -273,21 +273,21 @@ private: mButtonClip = Control::New(); mButtonClip.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mButtonClip.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER ); - mButtonClip.SetSize( BUTTON_DECALL_SIZE * SCALED_WIDTH ); - mButtonClip.SetPosition( BUTTON_DECALL_CLIP_POSITION * SCALED_WIDTH ); + mButtonClip.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH ); + mButtonClip.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_CLIP_POSITION * SCALED_WIDTH ); mButtonIcon = ImageView::New(); mButtonIcon.SetImage( BUTTON_DECALL_ICON_IMAGE ); mButtonIcon.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mButtonIcon.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mButtonIcon.SetSize( BUTTON_DECALL_ICON_SIZE * SCALED_WIDTH ); - mButtonIcon.SetPosition( BUTTON_DECALL_ICON_POSITION * SCALED_WIDTH ); + mButtonIcon.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_ICON_SIZE * SCALED_WIDTH ); + mButtonIcon.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_ICON_POSITION * SCALED_WIDTH ); mCallEndButton = PushButton::New(); mCallEndButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCallEndButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mCallEndButton.SetSize( BUTTON_DECALL_SIZE * SCALED_WIDTH ); - mCallEndButton.SetPosition( BUTTON_DECALL_POSITION * SCALED_WIDTH ); + mCallEndButton.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH ); + mCallEndButton.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_POSITION * SCALED_WIDTH ); mCallEndButton.ClickedSignal().Connect( this, &CallController::OnButtonClicked ); mCallEndButton.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, "" ); mCallEndButton.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, "" ); @@ -300,8 +300,8 @@ private: mLabelTime = TextLabel::New( LABEL_TIME_STR ); mLabelTime.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLabelTime.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mLabelTime.SetSize( LABEL_TIME_SIZE * SCALED_STAGE_SIZE ); - mLabelTime.SetPosition( LABEL_TIME_POSITION * SCALED_STAGE_SIZE_3 ); + mLabelTime.SetProperty( Actor::Property::SIZE, LABEL_TIME_SIZE * SCALED_STAGE_SIZE ); + mLabelTime.SetProperty( Actor::Property::POSITION, LABEL_TIME_POSITION * SCALED_STAGE_SIZE_3 ); mLabelTime.SetProperty( Actor::Property::VISIBLE, false ); mLabelTime.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TIME_FONT_COLOR ); mLabelTime.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TIME_FONT_SIZE * FONT_SCALE ); diff --git a/examples/animated-gradient-card-active/animated-gradient-card-active.cpp b/examples/animated-gradient-card-active/animated-gradient-card-active.cpp index f2e7c13..46334ba 100644 --- a/examples/animated-gradient-card-active/animated-gradient-card-active.cpp +++ b/examples/animated-gradient-card-active/animated-gradient-card-active.cpp @@ -153,8 +153,8 @@ public: mCard[k].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCard[k].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mCard[k].SetSize( mSize.x, mSize.y ); - mCard[k].SetPosition( mPosition[k].x, mPosition[k].y ); + mCard[k].SetProperty( Actor::Property::SIZE, Vector2( mSize.x, mSize.y ) ); + mCard[k].SetProperty( Actor::Property::POSITION, Vector2( mPosition[k].x, mPosition[k].y )); stage.Add( mCard[k] ); } @@ -297,7 +297,7 @@ public: mBackground = Control::New(); mBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mBackground.SetSize( STAGE_SIZE ); + mBackground.SetProperty( Actor::Property::SIZE, STAGE_SIZE ); mStage.Add( mBackground ); @@ -594,14 +594,14 @@ private: mAddButton.SetImage( BUTTON_ADD_IMAGE ); mAddButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mAddButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); - mAddButton.SetSize( BUTTON_ADD_SIZE * SCALED_WIDTH ); - mAddButton.SetPosition( BUTTON_ADD_POSITION * SCALED_WIDTH ); + mAddButton.SetProperty( Actor::Property::SIZE, BUTTON_ADD_SIZE * SCALED_WIDTH ); + mAddButton.SetProperty( Actor::Property::POSITION, BUTTON_ADD_POSITION * SCALED_WIDTH ); mLabel1 = TextLabel::New( LABEL_TICKET_STR ); mLabel1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); mLabel1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); - mLabel1.SetSize( LABEL_TICKET_SIZE * SCALED_WIDTH ); - mLabel1.SetPosition( LABEL_TICKET_POSITION * SCALED_WIDTH ); + mLabel1.SetProperty( Actor::Property::SIZE, LABEL_TICKET_SIZE * SCALED_WIDTH ); + mLabel1.SetProperty( Actor::Property::POSITION, LABEL_TICKET_POSITION * SCALED_WIDTH ); mLabel1.SetProperty( Actor::Property::VISIBLE, true ); mLabel1.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TICKET_FONT_COLOR ); mLabel1.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TICKET_FONT_SIZE * FONT_SCALE ); @@ -611,8 +611,8 @@ private: mLabel2 = TextLabel::New( LABEL_HOLD_STR ); mLabel2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLabel2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mLabel2.SetSize( LABEL_HOLD_SIZE * SCALED_WIDTH ); - mLabel2.SetPosition( LABEL_HOLD_POSITION * SCALED_WIDTH ); + mLabel2.SetProperty( Actor::Property::SIZE, LABEL_HOLD_SIZE * SCALED_WIDTH ); + mLabel2.SetProperty( Actor::Property::POSITION, LABEL_HOLD_POSITION * SCALED_WIDTH ); mLabel2.SetProperty( Actor::Property::VISIBLE, false ); mLabel2.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_HOLD_FONT_COLOR ); mLabel2.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_HOLD_FONT_SIZE * FONT_SCALE ); @@ -622,8 +622,8 @@ private: mLabel3 = TextLabel::New( LABEL_TERMINAL_STR ); mLabel3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLabel3.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mLabel3.SetSize( LABEL_TERMINAL_SIZE * SCALED_WIDTH ); - mLabel3.SetPosition( LABEL_TERMINAL_POSITION * SCALED_WIDTH ); + mLabel3.SetProperty( Actor::Property::SIZE, LABEL_TERMINAL_SIZE * SCALED_WIDTH ); + mLabel3.SetProperty( Actor::Property::POSITION, LABEL_TERMINAL_POSITION * SCALED_WIDTH ); mLabel3.SetProperty( Actor::Property::VISIBLE, false ); mLabel3.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TERMINAL_FONT_COLOR ); mLabel3.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TERMINAL_FONT_SIZE * FONT_SCALE ); diff --git a/examples/animated-images/animated-images-example.cpp b/examples/animated-images/animated-images-example.cpp index 0264a89..63e1835 100644 --- a/examples/animated-images/animated-images-example.cpp +++ b/examples/animated-images/animated-images-example.cpp @@ -145,7 +145,7 @@ private: radioButtonLayout.SetCellAlignment( TableView::CellPosition( 0, 1 ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER ); - radioButtonLayout.SetY( -10.0f ); + radioButtonLayout.SetProperty( Actor::Property::POSITION_Y, -10.0f ); Stage::GetCurrent().Add( radioButtonLayout ); } @@ -185,7 +185,7 @@ private: control.SetProperty( Toolkit::ImageView::Property::IMAGE, SetupViewProperties( mImageType, index ) ); control.SetProperty( Actor::Property::ANCHOR_POINT, IMAGE_LAYOUT_INFO[ index ].anchorPoint ); control.SetProperty( Actor::Property::PARENT_ORIGIN, IMAGE_LAYOUT_INFO[ index ].parentOrigin ); - control.SetY( IMAGE_LAYOUT_INFO[ index ].yPosition ); + control.SetProperty( Actor::Property::POSITION_Y, IMAGE_LAYOUT_INFO[ index ].yPosition ); // We do not want the animated image playing when it's added to the stage. PauseAnimatedImage( control ); diff --git a/examples/animated-shapes/animated-shapes-example.cpp b/examples/animated-shapes/animated-shapes-example.cpp index 7f4d9a0..2960f47 100644 --- a/examples/animated-shapes/animated-shapes-example.cpp +++ b/examples/animated-shapes/animated-shapes-example.cpp @@ -211,8 +211,8 @@ public: renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); Actor actor = Actor::New(); - actor.SetSize( 400.0f, 400.0f ); - actor.SetPosition( center ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); + actor.SetProperty( Actor::Property::POSITION, center ); actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,1.0f,0.0f,1.0f) ); actor.AddRenderer( renderer ); @@ -303,8 +303,8 @@ public: renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); Actor actor = Actor::New(); - actor.SetSize( 400.0f, 400.0f ); - actor.SetPosition( center ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); + actor.SetProperty( Actor::Property::POSITION, center ); actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.AddRenderer( renderer ); @@ -404,8 +404,8 @@ public: renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); Actor actor = Actor::New(); - actor.SetSize( 400.0f, 400.0f ); - actor.SetPosition( center ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); + actor.SetProperty( Actor::Property::POSITION, center ); actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,0.0f,0.0f,1.0f) ); actor.AddRenderer( renderer ); diff --git a/examples/arc-visual/arc-visual-example.cpp b/examples/arc-visual/arc-visual-example.cpp index a397ba3..0182a87 100644 --- a/examples/arc-visual/arc-visual-example.cpp +++ b/examples/arc-visual/arc-visual-example.cpp @@ -73,7 +73,7 @@ private: mControl = Control::New(); mControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mControl.SetSize( 200.0f, 200.0f ); + mControl.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); mControl.SetProperty( Control::Property::BACKGROUND, BACKGROUND ); stage.Add( mControl ); diff --git a/examples/benchmark/benchmark.cpp b/examples/benchmark/benchmark.cpp index 6282b51..c4d4cf2 100644 --- a/examples/benchmark/benchmark.cpp +++ b/examples/benchmark/benchmark.cpp @@ -280,7 +280,7 @@ public: for( size_t i(0); i( mPaddle, Actor::Property::ORIENTATION, WobbleConstraint(Degree( 10.0f ))); wobbleConstraint.AddSource( LocalSource(mWobbleProperty) ); wobbleConstraint.Apply(); - mPaddle.SetPosition( stageSize * Vector3( PADDLE_START_POSITION ) ); + mPaddle.SetProperty( Actor::Property::POSITION, stageSize * Vector3( PADDLE_START_POSITION ) ); mContentLayer.Add(mPaddle); mPaddle.TouchSignal().Connect(this, &ExampleController::OnTouchPaddle); mContentLayer.TouchSignal().Connect(this, &ExampleController::OnTouchLayer); @@ -358,10 +358,10 @@ private: { mLives = TOTAL_LIVES; mLevel = 0; - mBall.SetPosition( mBallStartPosition ); + mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition ); mBallVelocity = Vector3::ZERO; - mPaddle.SetSize( mPaddleFullSize + mPaddleHitMargin ); - mPaddleImage.SetSize( mPaddleFullSize ); + mPaddle.SetProperty( Actor::Property::SIZE, mPaddleFullSize + mPaddleHitMargin ); + mPaddleImage.SetProperty( Actor::Property::SIZE, mPaddleFullSize ); LoadLevel(mLevel); } @@ -561,7 +561,7 @@ private: brick.SetProperty( ImageView::Property::IMAGE, mBrickImageMap ); brick.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); brick.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); - brick.SetPosition( Vector3( position ) ); + brick.SetProperty( Actor::Property::POSITION, position ); // Add a constraint on the brick between it and the ball generating a collision-property Property::Index property = brick.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO); @@ -651,7 +651,7 @@ private: if(mDragActor) { Vector3 position( event.GetScreenPosition( 0 ) ); - mPaddle.SetPosition( position - mRelativeDragPoint ); + mPaddle.SetProperty( Actor::Property::POSITION, position - mRelativeDragPoint ); if( event.GetState( 0 ) == PointState::UP ) // Stop dragging { @@ -729,7 +729,7 @@ private: void OnPaddleShrunk( Animation &source ) { // Reposition Ball in start position, and make ball appear. - mBall.SetPosition( mBallStartPosition ); + mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition ); mBall.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 1.0f, 1.0f, 0.1f) ); Animation appear = Animation::New(0.5f); appear.AnimateTo( Property(mBall, Actor::Property::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f) ); diff --git a/examples/bloom-view/bloom-view-example.cpp b/examples/bloom-view/bloom-view-example.cpp index f376277..8859b94 100644 --- a/examples/bloom-view/bloom-view-example.cpp +++ b/examples/bloom-view/bloom-view-example.cpp @@ -78,47 +78,47 @@ public: mRootActor = Actor::New(); mRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mRootActor.SetSize( stageSize ); + mRootActor.SetProperty( Actor::Property::SIZE, stageSize ); stage.Add( mRootActor ); // Create the object that will perform the blooming work mBloomView = Dali::Toolkit::BloomView::New(); mBloomView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mBloomView.SetSize( viewSize ); + mBloomView.SetProperty( Actor::Property::SIZE, viewSize ); mRootActor.Add( mBloomView ); mBloomView.Activate(); Layer backgroundLayer = Layer::New(); - backgroundLayer.SetSize( viewSize ); + backgroundLayer.SetProperty( Actor::Property::SIZE, viewSize ); backgroundLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mBloomView.Add( backgroundLayer ); // Create the background image ImageView backgroundImage = ImageView::New( BACKGROUND_IMAGE_PATH ); backgroundImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - backgroundImage.SetSize( viewSize ); + backgroundImage.SetProperty( Actor::Property::SIZE, viewSize ); backgroundLayer.Add( backgroundImage ); Layer foregroundLayer = Layer::New(); - foregroundLayer.SetSize( viewSize ); + foregroundLayer.SetProperty( Actor::Property::SIZE, viewSize ); foregroundLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mBloomView.Add( foregroundLayer ); // Create visible actors mObjectRootActor = Actor::New(); mObjectRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mObjectRootActor.SetSize( viewSize ); + mObjectRootActor.SetProperty( Actor::Property::SIZE, viewSize ); foregroundLayer.Add( mObjectRootActor ); ImageView imageView = ImageView::New( UI_DIFFUSE_IMAGE ); imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - imageView.SetSize( viewSize ); + imageView.SetProperty( Actor::Property::SIZE, viewSize ); mObjectRootActor.Add( imageView ); imageView = ImageView::New( UI_DIFFUSE_IMAGE ); imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - imageView.SetSize( stageSize * 0.5f ); - imageView.SetPosition( 0.0f, 0.0f, 100.0f ); + imageView.SetProperty( Actor::Property::SIZE, stageSize * 0.5f ); + imageView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 100.0f ) ); mObjectRootActor.Add( imageView ); AnimateBloomView(); diff --git a/examples/bubble-effect/bubble-effect-example.cpp b/examples/bubble-effect/bubble-effect-example.cpp index c4f6d40..444f8d7 100644 --- a/examples/bubble-effect/bubble-effect-example.cpp +++ b/examples/bubble-effect/bubble-effect-example.cpp @@ -136,7 +136,7 @@ private: // Get the root actor of all bubbles, and add it to stage. Actor bubbleRoot = mBubbleEmitter.GetRootActor(); bubbleRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - bubbleRoot.SetZ(0.1f); // Make sure the bubbles displayed on top og the background. + bubbleRoot.SetProperty( Actor::Property::POSITION_Z, 0.1f); // Make sure the bubbles displayed on top og the background. content.Add( bubbleRoot ); // Set the application background diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index 9a7b8b3..e0ebc07 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -454,7 +454,7 @@ public: mBuilderLayer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_CENTER); Dali::Vector3 size = Stage::GetCurrent().GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); size.y -= DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight; - mBuilderLayer.SetSize( size ); + mBuilderLayer.SetProperty( Actor::Property::SIZE, size ); mNavigationView.Push( mBuilderLayer ); } diff --git a/examples/buttons/buttons-example.cpp b/examples/buttons/buttons-example.cpp index 6c7e1ba..a0fae8d 100644 --- a/examples/buttons/buttons-example.cpp +++ b/examples/buttons/buttons-example.cpp @@ -114,7 +114,7 @@ class ButtonsController: public ConnectionTracker contentTable.SetFitHeight( i ); } - contentTable.SetPosition( 0.0f, TOP_MARGIN ); + contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN )); mContentLayer.Add( contentTable ); @@ -158,12 +158,12 @@ class ButtonsController: public ConnectionTracker // Radio 1 { Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_1 ); - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); mRadioButtonImage1 = Dali::Toolkit::RadioButton::New( "1" ); mRadioButtonImage1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mRadioButtonImage1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mRadioButtonImage1.SetPosition( 0, DP(radioY) ); + mRadioButtonImage1.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) )); mRadioButtonImage1.SetProperty( Toolkit::Button::Property::SELECTED, true ); imageSelectTableView.AddChild( mRadioButtonImage1, Toolkit::TableView::CellPosition( 0, 0 ) ); @@ -175,12 +175,12 @@ class ButtonsController: public ConnectionTracker radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING; Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_2 ); - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); mRadioButtonImage2 = Dali::Toolkit::RadioButton::New( "2" ); mRadioButtonImage2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mRadioButtonImage2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mRadioButtonImage2.SetPosition( 0, DP(radioY) ); + mRadioButtonImage2.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) )); imageSelectTableView.AddChild( mRadioButtonImage2, Toolkit::TableView::CellPosition( 1, 0 ) ); imageSelectTableView.AddChild( image, Toolkit::TableView::CellPosition( 1, 1 ) ); @@ -191,12 +191,12 @@ class ButtonsController: public ConnectionTracker radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING; Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_3 ); - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); mRadioButtonImage3 = Dali::Toolkit::RadioButton::New( "3" ); mRadioButtonImage3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mRadioButtonImage3.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mRadioButtonImage3.SetPosition( 0, DP(radioY) ); + mRadioButtonImage3.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) )); imageSelectTableView.AddChild( mRadioButtonImage3, Toolkit::TableView::CellPosition( 2, 0 ) ); imageSelectTableView.AddChild( image, Toolkit::TableView::CellPosition( 2, 1 ) ); @@ -254,7 +254,7 @@ class ButtonsController: public ConnectionTracker textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); Toolkit::ImageView image = Toolkit::ImageView::New( ENABLED_IMAGE ); - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); image.SetProperty( Actor::Property::PADDING, Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) ); tableView.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) ); @@ -266,7 +266,7 @@ class ButtonsController: public ConnectionTracker radioButton.SetProperty( Dali::Actor::Property::NAME, "radioSelectEnable" ); radioButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); radioButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - radioButton.SetPosition( 0, 0 ); + radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); radioButton.SetProperty( Toolkit::Button::Property::SELECTED, true ); radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton ); @@ -280,7 +280,7 @@ class ButtonsController: public ConnectionTracker radioButton.SetProperty( Dali::Actor::Property::NAME, "radioSelectDisable" ); radioButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); radioButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - radioButton.SetPosition( 0, DP(50) ); + radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(50) )); radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton ); diff --git a/examples/clipping/clipping-example.cpp b/examples/clipping/clipping-example.cpp index 9f37db8..408d5c5 100644 --- a/examples/clipping/clipping-example.cpp +++ b/examples/clipping/clipping-example.cpp @@ -123,7 +123,7 @@ private: .Add( BorderVisual::Property::COLOR, Color::WHITE ) .Add( BorderVisual::Property::SIZE, 2.0f ) .Add( BorderVisual::Property::ANTI_ALIASING, true ) ); - border.SetSize( Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) ); + border.SetProperty( Actor::Property::SIZE, Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) ); stage.Add( border ); // Constrain the border's orientation to the orientation of item-view. diff --git a/examples/color-visual/color-visual-example.cpp b/examples/color-visual/color-visual-example.cpp index 92f0d89..ea630d9 100644 --- a/examples/color-visual/color-visual-example.cpp +++ b/examples/color-visual/color-visual-example.cpp @@ -74,7 +74,7 @@ public: mImageView = ImageView::New( IMAGE_FILE ); mImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mImageView.SetSize( 200.0f, 200.0f ); + mImageView.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); mImageView.SetProperty( DevelControl::Property::SHADOW, SHADOW ); stage.Add( mImageView ); diff --git a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp index 247a523..a62791e 100644 --- a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp +++ b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp @@ -77,7 +77,7 @@ void AddImage( const char*imagePath, Actor& actor, Geometry& geometry, Shader& s renderer.SetTextures( textureSet ); //Set actor size and add the renderer - actor.SetSize( texture.GetWidth(), texture.GetHeight() ); + actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) ); actor.AddRenderer( renderer ); } diff --git a/examples/contact-cards/contact-card.cpp b/examples/contact-cards/contact-card.cpp index 01ff791..97c1b94 100644 --- a/examples/contact-cards/contact-card.cpp +++ b/examples/contact-cards/contact-card.cpp @@ -118,35 +118,35 @@ ContactCard::ContactCard( mContactCard.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); mContactCard.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mContactCard.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mContactCard.SetPosition( foldedPosition.x, foldedPosition.y ); - mContactCard.SetSize( mContactCardLayoutInfo.foldedSize ); + mContactCard.SetProperty( Actor::Property::POSITION, Vector2( foldedPosition.x, foldedPosition.y )); + mContactCard.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.foldedSize ); stage.Add( mContactCard ); // Create the header which will be shown only when the contact is unfolded mHeader = Control::New(); - mHeader.SetSize( mContactCardLayoutInfo.headerSize ); + mHeader.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.headerSize ); mHeader.SetProperty( Control::Property::BACKGROUND, Property::Map{ { Toolkit::Visual::Property::TYPE, Visual::COLOR }, { ColorVisual::Property::MIX_COLOR, HEADER_COLOR } } ); mHeader.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mHeader.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mHeader.SetPosition( mContactCardLayoutInfo.headerFoldedPosition.x, mContactCardLayoutInfo.headerFoldedPosition.y ); + mHeader.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.headerFoldedPosition.x, mContactCardLayoutInfo.headerFoldedPosition.y )); // Create a clipped image (whose clipping can be animated) mClippedImage = ClippedImage::Create( imagePath, mClippedImagePropertyIndex ); - mClippedImage.SetSize( mContactCardLayoutInfo.imageSize ); + mClippedImage.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.imageSize ); mClippedImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mClippedImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mClippedImage.SetPosition( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y ); + mClippedImage.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y )); mClippedImage.SetProperty( Actor::Property::VISIBLE, false ); // Hide image as we only want to display it if we are animating or unfolded mContactCard.Add( mClippedImage ); // Create an image with a mask which is to be used when the contact is folded mMaskedImage = MaskedImage::Create( imagePath ); - mMaskedImage.SetSize( mContactCardLayoutInfo.imageSize ); + mMaskedImage.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.imageSize ); mMaskedImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mMaskedImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mMaskedImage.SetPosition( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y ); + mMaskedImage.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y )); mContactCard.Add( mMaskedImage ); // Add the text label for just the name @@ -155,7 +155,7 @@ ContactCard::ContactCard( mNameText.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mNameText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mNameText.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - mNameText.SetPosition( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y ); + mNameText.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y )); mContactCard.Add( mNameText ); // Create the detail text-label @@ -167,8 +167,8 @@ ContactCard::ContactCard( mDetailText.SetStyleName( "ContactDetailTextLabel" ); mDetailText.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mDetailText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mDetailText.SetPosition( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y ); - mDetailText.SetSize( Vector2( mContactCardLayoutInfo.unfoldedSize.width - mContactCardLayoutInfo.textFoldedPosition.x * 2.0f, 0.0f ) ); + mDetailText.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y )); + mDetailText.SetProperty( Actor::Property::SIZE, Vector2( mContactCardLayoutInfo.unfoldedSize.width - mContactCardLayoutInfo.textFoldedPosition.x * 2.0f, 0.0f ) ); mDetailText.SetProperty( DevelActor::Property::OPACITY, 0.0f ); // Attach tap detection to the overall clip control diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index 8ee466c..fd4ce0a 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -252,7 +252,7 @@ void CubeTransitionApp::OnInit( Application& application ) mCubeWaveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT_WAVE ); mCubeWaveEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); - mCubeWaveEffect.SetSize( mViewSize ); + mCubeWaveEffect.SetProperty( Actor::Property::SIZE, mViewSize ); mCubeWaveEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCubeWaveEffect.SetCurrentTexture( mCurrentTexture ); @@ -262,7 +262,7 @@ void CubeTransitionApp::OnInit( Application& application ) mCubeCrossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT_CROSS ); mCubeCrossEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); - mCubeCrossEffect.SetSize( mViewSize ); + mCubeCrossEffect.SetProperty( Actor::Property::SIZE, mViewSize ); mCubeCrossEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCubeCrossEffect.SetCurrentTexture( mCurrentTexture ); @@ -270,7 +270,7 @@ void CubeTransitionApp::OnInit( Application& application ) mCubeFoldEffect.SetTransitionDuration( ANIMATION_DURATION_FOLD ); mCubeFoldEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); - mCubeFoldEffect.SetSize( mViewSize ); + mCubeFoldEffect.SetProperty( Actor::Property::SIZE, mViewSize ); mCubeFoldEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCubeFoldEffect.SetCurrentTexture( mCurrentTexture ); diff --git a/examples/deferred-shading/deferred-shading.cpp b/examples/deferred-shading/deferred-shading.cpp index dcc4262..b3819e7 100644 --- a/examples/deferred-shading/deferred-shading.cpp +++ b/examples/deferred-shading/deferred-shading.cpp @@ -579,11 +579,11 @@ private: CenterActor(a); Vector3 position{ v * unit * 5.f }; - a.SetPosition(position); + a.SetProperty( Actor::Property::POSITION, position ); float scale = (c + ((v.x + v.y + v.z) + c * 3.f) * .5f) / (c * 4.f); Vector3 size{ Vector3::ONE * scale * unit * 2.f }; - a.SetSize(size); + a.SetProperty( Actor::Property::SIZE, size); a.SetProperty( Actor::Property::COLOR,Color::WHITE * .25f + (Color::RED * (v.x + c) / (c * 2.f) + @@ -625,7 +625,7 @@ private: // Create final image for deferred shading auto finalImage = Actor::New(); CenterActor(finalImage); - finalImage.SetSize(stageSize); + finalImage.SetProperty( Actor::Property::SIZE, stageSize); TextureSet finalImageTextures = TextureSet::New(); finalImageTextures.SetTexture(0, rttNormal); diff --git a/examples/dissolve-effect/dissolve-effect-example.cpp b/examples/dissolve-effect/dissolve-effect-example.cpp index d9ce582..b335e11 100644 --- a/examples/dissolve-effect/dissolve-effect-example.cpp +++ b/examples/dissolve-effect/dissolve-effect-example.cpp @@ -248,7 +248,7 @@ void DissolveEffectApp::OnInit( Application& application ) // Set size to stage size to avoid seeing a black border on transition mParent = Actor::New(); - mParent.SetSize( Stage::GetCurrent().GetSize() ); + mParent.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize() ); mParent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mContent.Add( mParent ); @@ -290,7 +290,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); - mNextImage.SetZ(INITIAL_DEPTH); + mNextImage.SetProperty( Actor::Property::POSITION_Z, INITIAL_DEPTH); mParent.Add( mNextImage ); Vector2 size = Vector2( mCurrentImage.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); StartTransition( gesture.position / size, gesture.displacement * Vector2(1.0, size.x/size.y)); @@ -405,7 +405,7 @@ bool DissolveEffectApp::OnTimerTick() mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); - mNextImage.SetZ(INITIAL_DEPTH); + mNextImage.SetProperty( Actor::Property::POSITION_Z, INITIAL_DEPTH); mParent.Add( mNextImage ); switch( mCentralLineIndex%4 ) { diff --git a/examples/drag-and-drop/drag-and-drop-example.cpp b/examples/drag-and-drop/drag-and-drop-example.cpp index 91202fc..4cbe592 100755 --- a/examples/drag-and-drop/drag-and-drop-example.cpp +++ b/examples/drag-and-drop/drag-and-drop-example.cpp @@ -80,7 +80,7 @@ public: stage.KeyEventSignal().Connect( this, &DragAndDropExample::OnKeyEvent ); TextLabel hintText = TextLabel::New("please drag one textlabel, move and drop on other textlabel"); - hintText.SetPosition(0.0f, 700.0f); + hintText.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 700.0f)); hintText.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); hintText.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); hintText.SetProperty(TextLabel::Property::MULTI_LINE, true); @@ -98,8 +98,8 @@ public: mTextLabel[i].SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER"); mTextLabel[i].SetBackgroundColor(TEXT_LABEL_COLOR[i]); - mTextLabel[i].SetSize(TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT); - mTextLabel[i].SetPosition(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i); + mTextLabel[i].SetProperty( Actor::Property::SIZE, Vector2(TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT) ); + mTextLabel[i].SetProperty( Actor::Property::POSITION, Vector2(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i)); mDragAndDropDetector.Attach(mTextLabel[i]); mRect[i] = Rect(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i, TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT); diff --git a/examples/effects-view/effects-view-example.cpp b/examples/effects-view/effects-view-example.cpp index d280f46..597bd40 100644 --- a/examples/effects-view/effects-view-example.cpp +++ b/examples/effects-view/effects-view-example.cpp @@ -142,13 +142,13 @@ void EffectsViewApp::OnAppInitialize( Application& application ) mDropShadowView = CreateEffectsView( EffectsView::DROP_SHADOW, effectsViewSize, mEffectSize ); mDropShadowView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mDropShadowView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); - mDropShadowView.SetZ( -mStageSize.height * 0.1f ); + mDropShadowView.SetProperty( Actor::Property::POSITION_Z, -mStageSize.height * 0.1f ); mContents.Add( mDropShadowView ); mEmbossView = CreateEffectsView( EffectsView::EMBOSS, effectsViewSize, mEffectSize ); mEmbossView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mEmbossView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); - mEmbossView.SetZ( mStageSize.height * 0.1f ); + mEmbossView.SetProperty( Actor::Property::POSITION_Z, mStageSize.height * 0.1f ); mContents.Add( mEmbossView ); SetTitle( mEffectSize ); @@ -159,7 +159,7 @@ EffectsView EffectsViewApp::CreateEffectsView( EffectsView::EffectType type, con { Toolkit::EffectsView effectsView = Toolkit::EffectsView::New(type); // set control size - effectsView.SetSize( viewSize.width, viewSize.height ); + effectsView.SetProperty( Actor::Property::SIZE, Vector2( viewSize.width, viewSize.height ) ); // set effect size property effectsView.SetProperty( EffectsView::Property::EFFECT_SIZE, effectSize ); @@ -169,8 +169,8 @@ EffectsView EffectsViewApp::CreateEffectsView( EffectsView::EffectType type, con TextLabel textActor( TextLabel::New( text ) ); textActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); textActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); - textActor.SetSize( viewSize ); - textActor.SetPosition( viewSize.width*0.4f, viewSize.height*0.3f ); + textActor.SetProperty( Actor::Property::SIZE, viewSize ); + textActor.SetProperty( Actor::Property::POSITION, Vector2( viewSize.width*0.4f, viewSize.height*0.3f )); textActor.SetProperty( TextLabel::Property::POINT_SIZE, DemoHelper::ScalePointSize(14.f) ); effectsView.Add( textActor ); @@ -178,8 +178,8 @@ EffectsView EffectsViewApp::CreateEffectsView( EffectsView::EffectType type, con ImageView icon = ImageView::New( TEST_IMAGE ); icon.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); icon.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); - icon.SetX( viewSize.width*0.1f ); - icon.SetSize( viewSize.height*0.8f, viewSize.height*0.8f ); + icon.SetProperty( Actor::Property::POSITION_X, viewSize.width*0.1f ); + icon.SetProperty( Actor::Property::SIZE, Vector2( viewSize.height*0.8f, viewSize.height*0.8f ) ); effectsView.Add( icon ); AnimateEffectProperties( effectsView ); diff --git a/examples/flex-container/flex-container-example.cpp b/examples/flex-container/flex-container-example.cpp index 3a5a099..0d5acb4 100644 --- a/examples/flex-container/flex-container-example.cpp +++ b/examples/flex-container/flex-container-example.cpp @@ -192,8 +192,8 @@ public: mFlexContainer = FlexContainer::New(); mFlexContainer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); mFlexContainer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - mFlexContainer.SetSize( stageSize.width, stageSize.height - VIEW_STYLE.mToolBarHeight ); - mFlexContainer.SetY(VIEW_STYLE.mToolBarHeight); + mFlexContainer.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width, stageSize.height - VIEW_STYLE.mToolBarHeight ) ); + mFlexContainer.SetProperty( Actor::Property::POSITION_Y, VIEW_STYLE.mToolBarHeight); mFlexContainer.SetProperty(FlexContainer::Property::FLEX_DIRECTION, FlexContainer::COLUMN); // column as main axis contents.Add(mFlexContainer); @@ -237,7 +237,7 @@ public: // flex properties that only work when there are multiple lines in the layout flexItem.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); // Make sure there are still extra space in the line after wrapping - flexItem.SetSize(stageSize.width / NUM_FLEX_ITEMS * 1.25f, (stageSize.height - VIEW_STYLE.mToolBarHeight) * 0.95f / NUM_FLEX_ITEMS * 1.25f); + flexItem.SetProperty( Actor::Property::SIZE, Vector2(stageSize.width / NUM_FLEX_ITEMS * 1.25f, (stageSize.height - VIEW_STYLE.mToolBarHeight) * 0.95f / NUM_FLEX_ITEMS * 1.25f) ); mFlexItemContainer.Add( flexItem ); } diff --git a/examples/focus-integration/focus-integration.cpp b/examples/focus-integration/focus-integration.cpp index be23648..2c14a33 100644 --- a/examples/focus-integration/focus-integration.cpp +++ b/examples/focus-integration/focus-integration.cpp @@ -72,12 +72,12 @@ public: { contentTable.SetFitHeight( i ); } - contentTable.SetPosition( 0.0f, TOP_MARGIN ); + contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN )); mContentLayer.Add( contentTable ); // Create label to display which control's KeyEvent callback is called mEventLabel = TextLabel::New("Controls don't get KeyEvent yet"); - mEventLabel.SetSize( mStage.GetSize().width, mStage.GetSize().height*0.1f ); + mEventLabel.SetProperty( Actor::Property::SIZE, Vector2( mStage.GetSize().width, mStage.GetSize().height*0.1f ) ); mEventLabel.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH); mEventLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); mEventLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); @@ -85,7 +85,7 @@ public: contentTable.Add( mEventLabel ); mContainer = TableView::New( 4, 3 ); - mContainer.SetSize( mStage.GetSize().width, mStage.GetSize().height*0.4f ); + mContainer.SetProperty( Actor::Property::SIZE, Vector2( mStage.GetSize().width, mStage.GetSize().height*0.4f ) ); mContainer.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH); mContainer.SetBackgroundColor( BACKGROUND_COLOUR ); mContainer.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) ); diff --git a/examples/fpp-game/fpp-game-tutorial-controller.cpp b/examples/fpp-game/fpp-game-tutorial-controller.cpp index d692285..dd38419 100644 --- a/examples/fpp-game/fpp-game-tutorial-controller.cpp +++ b/examples/fpp-game/fpp-game-tutorial-controller.cpp @@ -113,7 +113,7 @@ void FppGameTutorialController::DisplayTutorial() mLeftLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLeftLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mLeftLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); - mLeftLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); + mLeftLabel.SetProperty( Actor::Property::SIZE, Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); mLeftLabel.SetProperty( Toolkit::Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ) .Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.0, 0.0, 0.7, 0.2 ) ) ); @@ -126,7 +126,7 @@ void FppGameTutorialController::DisplayTutorial() mRightLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mRightLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mRightLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); - mRightLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); + mRightLabel.SetProperty( Actor::Property::SIZE, Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); mRightLabel.SetProperty( Toolkit::Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ) .Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.5, 0.0, 0.0, 0.2 ) ) ); @@ -147,8 +147,8 @@ void FppGameTutorialController::DisplayTutorial() uiCamera.RotateBy( Degree(90.0f), Vector3( 0.0f, 0.0f, 1.0f )); } - mLeftLabel.SetPosition( Vector3( -stageSize.x*0.25f, 0.0, 0.0 ) ); - mRightLabel.SetPosition( Vector3( stageSize.x*0.25f, 0.0, 0.0 ) ); + mLeftLabel.SetProperty( Actor::Property::POSITION, Vector3( -stageSize.x*0.25f, 0.0, 0.0 ) ); + mRightLabel.SetProperty( Actor::Property::POSITION, Vector3( stageSize.x*0.25f, 0.0, 0.0 ) ); mUiRoot.Add( mLeftLabel ); mUiRoot.Add( mRightLabel ); diff --git a/examples/fpp-game/game-camera.cpp b/examples/fpp-game/game-camera.cpp index 6b4c672..2f99710 100644 --- a/examples/fpp-game/game-camera.cpp +++ b/examples/fpp-game/game-camera.cpp @@ -169,7 +169,7 @@ bool GameCamera::OnTick() position += sidewaysVector * (sidewaysSpeed * 0.5f); - mCameraActor.SetPosition( position ); + mCameraActor.SetProperty( Actor::Property::POSITION, position ); mCameraPosition = position; @@ -188,7 +188,7 @@ void GameCamera::InitialiseDefaultCamera() // should be read from file mCameraActor.SetNearClippingPlane( mNear ); mCameraActor.SetFarClippingPlane( mFar ); - mCameraActor.SetPosition( CAMERA_DEFAULT_POSITION ); + mCameraActor.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); // Camera position is shadowed in order to avoid using.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) mCameraPosition = CAMERA_DEFAULT_POSITION; @@ -200,8 +200,8 @@ void GameCamera::CreateInterceptorActor() mInterceptorActor = Actor::New(); mInterceptorActor.SetProperty( Dali::Actor::Property::NAME, "GameInputInterceptor" ); - mInterceptorActor.SetSize( Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); - mInterceptorActor.SetPosition( Vector3( 0.0, 0.0, 1.0 ) ); + mInterceptorActor.SetProperty( Actor::Property::SIZE, Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); + mInterceptorActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 1.0 ) ); mInterceptorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mInterceptorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCameraActor.Add( mInterceptorActor ); diff --git a/examples/fpp-game/game-entity.cpp b/examples/fpp-game/game-entity.cpp index eb531ef..7a03759 100644 --- a/examples/fpp-game/game-entity.cpp +++ b/examples/fpp-game/game-entity.cpp @@ -57,7 +57,7 @@ Dali::Actor& GameEntity::GetActor() void GameEntity::SetLocation( const Dali::Vector3& loc ) { - mActor.SetPosition( loc ); + mActor.SetProperty( Dali::Actor::Property::POSITION, loc ); } void GameEntity::SetRotation( const Dali::Quaternion& rot ) @@ -67,10 +67,10 @@ void GameEntity::SetRotation( const Dali::Quaternion& rot ) void GameEntity::SetScale( const Dali::Vector3& scale ) { - mActor.SetScale( scale ); + mActor.SetProperty( Dali::Actor::Property::SCALE, scale ); } void GameEntity::SetSize( const Dali::Vector3& size ) { - mActor.SetSize( size ); + mActor.SetProperty( Dali::Actor::Property::SIZE, size ); } diff --git a/examples/fpp-game/game-scene.cpp b/examples/fpp-game/game-scene.cpp index dc61707..7142c0e 100644 --- a/examples/fpp-game/game-scene.cpp +++ b/examples/fpp-game/game-scene.cpp @@ -156,8 +156,8 @@ bool GameScene::Load(const char *filename) mRootActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.GetRootLayer().Add( mRootActor ); - mRootActor.SetScale( -1.0, 1.0, 1.0 ); - mRootActor.SetPosition( 0.0, 0.0, 0.0 ); + mRootActor.SetProperty( Actor::Property::SCALE, Vector3( -1.0, 1.0, 1.0 ) ); + mRootActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 0.0 ) ); mRootActor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90 ), Vector3( 1.0, 0.0, 0.0 ) ) ); for( size_t i = 0; i < mEntities.Size(); ++i ) { diff --git a/examples/frame-callback/frame-callback-example.cpp b/examples/frame-callback/frame-callback-example.cpp index 4041d76..07ebd6d 100644 --- a/examples/frame-callback/frame-callback-example.cpp +++ b/examples/frame-callback/frame-callback-example.cpp @@ -108,7 +108,7 @@ private: ImageView imageView = ImageView::New( IMAGE_NAME ); imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - imageView.SetY( yPos ); + imageView.SetProperty( Actor::Property::POSITION_Y, yPos ); yPos += imageView.GetNaturalSize().height; // Add the ID of the created ImageView to mFrameCallback. diff --git a/examples/gaussian-blur-view/gaussian-blur-view-example.cpp b/examples/gaussian-blur-view/gaussian-blur-view-example.cpp index d30bddb..87adb08 100644 --- a/examples/gaussian-blur-view/gaussian-blur-view-example.cpp +++ b/examples/gaussian-blur-view/gaussian-blur-view-example.cpp @@ -86,7 +86,7 @@ private: Layer onTop = Layer::New(); onTop.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); onTop.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - onTop.SetSize( stageSize ); + onTop.SetProperty( Actor::Property::SIZE, stageSize ); stage.Add( onTop ); onTop.RaiseToTop(); @@ -120,7 +120,7 @@ private: mGaussianBlurView = GaussianBlurView::New( 30, 8.0f, Pixel::RGBA8888, 0.5f, 0.5f, false ); mGaussianBlurView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mGaussianBlurView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mGaussianBlurView.SetSize( stage.GetSize() ); + mGaussianBlurView.SetProperty( Actor::Property::SIZE, stage.GetSize() ); stage.Add( mGaussianBlurView ); mGaussianBlurView.Add( mImageView ); diff --git a/examples/gestures/gesture-example.cpp b/examples/gestures/gesture-example.cpp index 6d5a3a0..cad0c66 100644 --- a/examples/gestures/gesture-example.cpp +++ b/examples/gestures/gesture-example.cpp @@ -88,7 +88,7 @@ void AddHelpInfo( const std::string&& string, Actor parent, Animation animation, text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - text.SetPosition( position ); + text.SetProperty( Actor::Property::POSITION, position ); text.SetProperty( DevelActor::Property::OPACITY, 0.0f ); text.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, Text::HorizontalAlignment::CENTER ); text.SetProperty( TextLabel::Property::MULTI_LINE, true ); @@ -154,7 +154,7 @@ private: // Create a control with a circular gradient that we'll use for the gestures and be a quarter of the size of the stage. Actor touchControl = Control::New(); - touchControl.SetSize( stage.GetSize() * 0.25f ); + touchControl.SetProperty( Actor::Property::SIZE, stage.GetSize() * 0.25f ); touchControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); touchControl.SetProperty( Control::Property::BACKGROUND, CONTROL_BACKGROUND ); background.Add( touchControl ); @@ -303,7 +303,7 @@ private: actor.GetProperty( Actor::Property::POSITION ).Get( currentPosition ); Vector3 newPosition = currentPosition + scaledDisplacement; - actor.SetPosition( newPosition ); + actor.SetProperty( Actor::Property::POSITION, newPosition ); switch( pan.state ) { @@ -408,7 +408,7 @@ private: } } - actor.SetScale( mStartingScale * pinch.scale ); + actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.scale ); } /** diff --git a/examples/hello-world/hello-world-example.cpp b/examples/hello-world/hello-world-example.cpp index 3f3d458..f0f830e 100644 --- a/examples/hello-world/hello-world-example.cpp +++ b/examples/hello-world/hello-world-example.cpp @@ -50,24 +50,6 @@ public: textLabel.SetProperty( Dali::Actor::Property::NAME, "helloWorldLabel" ); stage.Add( textLabel ); - - Actor parent = Actor::New(); - Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f ); - parent.SetProperty( Actor::Property::COLOR, parentColor ); - Stage::GetCurrent().Add( parent ); - - Actor child = Actor::New(); - Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f ); - child.SetProperty( Actor::Property::COLOR, childColor ); - parent.Add( child ); - - std::string colorMode = static_cast( child.GetProperty< std::string >( Actor::Property::COLOR_MODE ) ); - printf("color mode: %s, should be: %d\n", colorMode.c_str(), ColorMode::USE_OWN_MULTIPLY_PARENT_ALPHA ); - - child.SetProperty( Actor::Property::COLOR_MODE, ColorMode::USE_PARENT_COLOR ); - colorMode = static_cast( child.GetProperty< std::string >( Actor::Property::COLOR_MODE ) ); - printf("color mode: %s, should be: %d\n", colorMode.c_str(), ColorMode::USE_PARENT_COLOR ); - // Respond to a click anywhere on the stage stage.GetRootLayer().TouchSignal().Connect( this, &HelloWorldController::OnTouch ); diff --git a/examples/homescreen-benchmark/homescreen-benchmark.cpp b/examples/homescreen-benchmark/homescreen-benchmark.cpp index 52e64a6..3e2627e 100644 --- a/examples/homescreen-benchmark/homescreen-benchmark.cpp +++ b/examples/homescreen-benchmark/homescreen-benchmark.cpp @@ -277,8 +277,8 @@ public: { float rowX = x * COL_WIDTH + PADDING; float rowY = y * ROW_HEIGHT + PADDING; - iconView.SetSize( Vector3( COL_WIDTH, ROW_HEIGHT, 1.0f ) ); - iconView.SetPosition( Vector3( rowX, rowY, 0.0f ) ); + iconView.SetProperty( Actor::Property::SIZE, Vector3( COL_WIDTH, ROW_HEIGHT, 1.0f ) ); + iconView.SetProperty( Actor::Property::POSITION, Vector3( rowX, rowY, 0.0f ) ); } else { @@ -385,12 +385,12 @@ public: // Move page 'a little bit up'. page.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); page.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - page.SetPosition( Vector3( stageSize.x * i, 0.0f, 0.0f ) ); + page.SetProperty( Actor::Property::POSITION, Vector3( stageSize.x * i, 0.0f, 0.0f ) ); mScrollParent.Add( page ); } mScrollParent.SetProperty( DevelActor::Property::OPACITY, 1.0f ); - mScrollParent.SetScale( Vector3::ONE ); + mScrollParent.SetProperty( Actor::Property::SCALE, Vector3::ONE ); // Fade in. ShowAnimation(); diff --git a/examples/image-policies/image-policies-example.cpp b/examples/image-policies/image-policies-example.cpp index 2f8c93a..8860ef0 100644 --- a/examples/image-policies/image-policies-example.cpp +++ b/examples/image-policies/image-policies-example.cpp @@ -416,8 +416,8 @@ class ImagePolicies: public ConnectionTracker mNextButton.SetProperty( Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, LOADING_IMAGE ); mNextButton.SetProperty( Button::Property::DISABLED_SELECTED_BACKGROUND_VISUAL, NEXT_BUTTON_DISABLED_IMAGE ); mNextButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); - mNextButton.SetY( -50.0f ); - mNextButton.SetSize( 100.0f, 100.0f ); + mNextButton.SetProperty( Actor::Property::POSITION_Y, -50.0f ); + mNextButton.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); mNextButton.ClickedSignal().Connect( this, &ImagePolicies::ChangeImageClicked ); mTable.AddChild( mNextButton, TableView::CellPosition( TableRowPlacement::NEXT_BUTTON, 0 ) ); mTable.SetCellPadding( Vector2( 2.0f, 2.0f ) ); diff --git a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp index 821375b..7c7a0f0 100644 --- a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp +++ b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp @@ -191,7 +191,7 @@ public: Toolkit::ImageView background = Toolkit::ImageView::New(); background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage ); background.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - background.SetSize( stage.GetSize() ); + background.SetProperty( Actor::Property::SIZE, stage.GetSize() ); stage.Add( background ); BufferImage heightBackground = BufferImage::WHITE(); @@ -217,15 +217,15 @@ public: mDesiredBox = Toolkit::ImageView::New( BORDER_IMAGE ); background.Add( mDesiredBox ); - mDesiredBox.SetSize( stage.GetSize() * mImageStageScale ); + mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * mImageStageScale ); mDesiredBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mDesiredBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mHeightBox.SetSize( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ); + mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) ); mHeightBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mHeightBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mWidthBox.SetSize( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ); + mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) ); mWidthBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mWidthBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); @@ -239,7 +239,7 @@ public: // Display the actor on the stage mDesiredBox.Add( mImageView ); - mImageView.SetSize( stage.GetSize() * mImageStageScale ); + mImageView.SetProperty( Actor::Property::SIZE, stage.GetSize() * mImageStageScale ); // Setup the pinch detector for scaling the desired image load dimensions: mPinchDetector = PinchGestureDetector::New(); @@ -251,7 +251,7 @@ public: mGrabCorner.SetProperty( Dali::Actor::Property::NAME, "GrabCorner" ); mGrabCorner.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); mGrabCorner.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT ); - mGrabCorner.SetPosition( -BORDER_WIDTH, -BORDER_WIDTH ); + mGrabCorner.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH )); mGrabCorner.SetProperty( DevelActor::Property::OPACITY, 0.6f ); Layer grabCornerLayer = Layer::New(); @@ -293,8 +293,8 @@ public: // Last image button: imagePrevious.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); imagePrevious.RotateBy( Radian(3.14159265358979323846f), Vector3( 0, 1.0f, 0 ) ); - imagePrevious.SetY( playWidth * 0.5f ); - imagePrevious.SetX( playWidth + playWidth * 0.5f ); + imagePrevious.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f ); + imagePrevious.SetProperty( Actor::Property::POSITION_X, playWidth + playWidth * 0.5f ); imagePrevious.SetProperty( DevelActor::Property::OPACITY, 0.6f ); controlsLayer.Add( imagePrevious ); imagePrevious.SetProperty( Dali::Actor::Property::NAME, PREVIOUS_BUTTON_ID ); @@ -303,8 +303,8 @@ public: // Next image button: Toolkit::ImageView imageNext = Toolkit::ImageView::New( DALI_ICON_PLAY, ImageDimensions( playWidth, playWidth ) ); imageNext.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); - imageNext.SetY( playWidth * 0.5f ); - imageNext.SetX( stage.GetSize().x - playWidth * 0.5f ); + imageNext.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f ); + imageNext.SetProperty( Actor::Property::POSITION_X, stage.GetSize().x - playWidth * 0.5f ); imageNext.SetProperty( DevelActor::Property::OPACITY, 0.6f ); controlsLayer.Add( imageNext ); imageNext.SetProperty( Dali::Actor::Property::NAME, NEXT_BUTTON_ID ); @@ -322,7 +322,7 @@ public: modesGroupBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); modesGroupBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); - modesGroupBackground.SetPosition( 0.0f, 0.0f ); + modesGroupBackground.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); controlsLayer.Add( modesGroupBackground ); @@ -390,7 +390,7 @@ public: popup.SetProperty( Dali::Actor::Property::NAME, "POPUP" ); popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - popup.SetSize( POPUP_WIDTH_DP, 0.0f ); + popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) ); popup.OutsideTouchedSignal().Connect( this, &ImageScalingAndFilteringController::OnPopupOutsideTouched ); @@ -673,7 +673,7 @@ private: const char * const path = IMAGE_PATHS[ mCurrentPath ]; Stage stage = Stage::GetCurrent(); Size imageSize = stage.GetSize() * mImageStageScale; - mImageView.SetSize( imageSize ); + mImageView.SetProperty( Actor::Property::SIZE, imageSize ); Property::Map map; map[Toolkit::ImageVisual::Property::URL] = path; @@ -696,10 +696,10 @@ private: // Border size needs to be modified to take into account the width of the frame. Vector2 borderScale( ( imageSize + Vector2( BORDER_WIDTH * 2.0f, BORDER_WIDTH * 2.0f ) ) / stage.GetSize() ); - mDesiredBox.SetSize( stage.GetSize() * borderScale ); + mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * borderScale ); - mHeightBox.SetSize( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ); - mWidthBox.SetSize( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ); + mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) ); + mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) ); } private: diff --git a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp index d73ec86..70f662e 100644 --- a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp +++ b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp @@ -393,7 +393,7 @@ public: void OnScrollViewRelayout(Actor actor) { // Make the height of the horizontal scroll bar to be the same as the width of scroll view. - mScrollBarHorizontal.SetSize(Vector2(0.0f, mScrollView.GetRelayoutSize( Dimension::WIDTH) )); + mScrollBarHorizontal.SetProperty( Actor::Property::SIZE, Vector2(0.0f, mScrollView.GetRelayoutSize( Dimension::WIDTH) )); } /** @@ -473,8 +473,8 @@ public: const Vector2 imagePosition = imageRegionCorner + Vector2( GRID_CELL_PADDING , GRID_CELL_PADDING ) + imageSize * 0.5f; ImageView image = CreateImageView( imageSource.configuration.path, imageSize.x, imageSize.y, fittingMode ); - image.SetPosition( Vector3( imagePosition.x, imagePosition.y, 0 ) ); - image.SetSize( imageSize ); + image.SetProperty( Actor::Property::POSITION, Vector3( imagePosition.x, imagePosition.y, 0 ) ); + image.SetProperty( Actor::Property::SIZE, imageSize ); image.TouchSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage ); image.ResourceReadySignal().Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal ); mFittingModes[image.GetId()] = fittingMode; diff --git a/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp b/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp index df0b523..554a913 100644 --- a/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp +++ b/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp @@ -57,23 +57,23 @@ private: float imageSize = 512.f; Toolkit::ImageView imageView0 = CreateImageView( IMAGE_PATH ); - imageView0.SetSize(imageSize, imageSize); + imageView0.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); imageView0.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - imageView0.SetY( -imageSize*0.5f ); + imageView0.SetProperty( Actor::Property::POSITION_Y, -imageSize*0.5f ); stage.Add(imageView0); Toolkit::ImageView imageView1 = CreateImageView( redGreen0 ); imageView1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - imageView1.SetSize(imageSize, imageSize); + imageView1.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); imageView0.Add(imageView1); Toolkit::ImageView imageView2 = CreateImageView( IMAGE_PATH ); - imageView2.SetSize(imageSize, imageSize); + imageView2.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); imageView2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - imageView2.SetY( imageSize*0.5f ); + imageView2.SetProperty( Actor::Property::POSITION_Y, imageSize*0.5f ); stage.Add(imageView2); Toolkit::ImageView imageView3 = CreateImageView( redGreen1); imageView3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - imageView3.SetSize(imageSize, imageSize); + imageView3.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); imageView2.Add(imageView3); imageView2.SetProperty( Toolkit::ImageView::Property::PRE_MULTIPLIED_ALPHA, true ); diff --git a/examples/image-view-pixel-area/image-view-pixel-area-example.cpp b/examples/image-view-pixel-area/image-view-pixel-area-example.cpp index dd33abe..fa0884e 100644 --- a/examples/image-view-pixel-area/image-view-pixel-area-example.cpp +++ b/examples/image-view-pixel-area/image-view-pixel-area-example.cpp @@ -121,17 +121,17 @@ private: { mImageView[i][j] = Toolkit::ImageView::New(); mImageView[i][j].SetProperty( Toolkit::ImageView::Property::IMAGE, propertyMap ); - mImageView[i][j].SetPosition( 50.f*(i-1), 50.f*(j-1) ); + mImageView[i][j].SetProperty( Actor::Property::POSITION, Vector2( 50.f*(i-1), 50.f*(j-1) )); } mImageView[1][1].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mImageView[1][1].SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER ); - mImageView[1][1].SetScale( 1.f/3.f ); + mImageView[1][1].SetProperty( Actor::Property::SCALE, 1.f/3.f ); mContent.Add( mImageView[1][1] ); mImageView[0][0].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mImageView[0][0].SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT ); - mImageView[0][0].SetPosition( -50.f, -50.f ); + mImageView[0][0].SetProperty( Actor::Property::POSITION, Vector2( -50.f, -50.f )); mImageView[1][1].Add( mImageView[0][0] ); mImageView[1][0].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); diff --git a/examples/image-view-svg/image-view-svg-example.cpp b/examples/image-view-svg/image-view-svg-example.cpp index 30eb58f..b62b6fe 100644 --- a/examples/image-view-svg/image-view-svg-example.cpp +++ b/examples/image-view-svg/image-view-svg-example.cpp @@ -78,7 +78,7 @@ public: mStageBackground = Actor::New(); mStageBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); mStageBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - mStageBackground.SetSize( stageSize.x, stageSize.y ); + mStageBackground.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, stageSize.y ) ); stage.Add(mStageBackground); // Push button, for changing the image set for displaying @@ -101,7 +101,7 @@ public: for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) { mSvgActor[i] = Toolkit::ImageView::New(SVG_IMAGES[mIndex+i]); - mSvgActor[i].SetSize( mActorSize ); + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize ); mSvgActor[i].TranslateBy( Vector3( 0.0, stageSize.height * 0.05, 0.0f ) ); stage.Add( mSvgActor[i] ); } @@ -145,8 +145,8 @@ public: { for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED ; i++ ) { - mSvgActor[i].SetSize(mActorSize); - mSvgActor[i].SetPosition( Vector3::ZERO ); + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize); + mSvgActor[i].SetProperty( Actor::Property::POSITION, Vector3::ZERO ); mScale = 1.f; } @@ -180,7 +180,7 @@ public: for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) { - mSvgActor[i].SetScale( scale ); + mSvgActor[i].SetProperty( Actor::Property::SCALE, scale ); } break; } @@ -194,8 +194,8 @@ public: mScale = mScale < MIN_SCALE ? MIN_SCALE : mScale; for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) { - mSvgActor[i].SetSize( mActorSize * mScale ); - mSvgActor[i].SetScale( 1.0f ); + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale ); + mSvgActor[i].SetProperty( Actor::Property::SCALE, 1.0f ); } break; } @@ -229,7 +229,7 @@ public: } for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) { - mSvgActor[i].SetSize( mActorSize * mScale ); + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale ); } } else if( strcmp(keyName, "Right") == 0 ) @@ -240,7 +240,7 @@ public: } for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) { - mSvgActor[i].SetSize( mActorSize * mScale ); + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale ); } } } diff --git a/examples/image-view-url/image-view-url-example.cpp b/examples/image-view-url/image-view-url-example.cpp index 73226fb..5046f08 100644 --- a/examples/image-view-url/image-view-url-example.cpp +++ b/examples/image-view-url/image-view-url-example.cpp @@ -118,7 +118,7 @@ private: // create actor to render input with applied shader mActorForInput = Toolkit::ImageView::New( url ); mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - mActorForInput.SetSize(TARGET_SIZE); + mActorForInput.SetProperty( Actor::Property::SIZE, TARGET_SIZE); Property::Map customShader; customShader[Toolkit::Visual::Shader::Property::FRAGMENT_SHADER] = FILTER_FRAGMENT_SOURCE; Property::Map visualMap; diff --git a/examples/image-view/image-view-example.cpp b/examples/image-view/image-view-example.cpp index 3ae1c73..8377159 100644 --- a/examples/image-view/image-view-example.cpp +++ b/examples/image-view/image-view-example.cpp @@ -122,7 +122,7 @@ class ImageViewController: public ConnectionTracker Toolkit::TextLabel instructions = Toolkit::TextLabel::New( EXAMPLE_INSTRUCTIONS ); instructions.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); instructions.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_CENTER); - instructions.SetY(-50.0f); + instructions.SetProperty( Actor::Property::POSITION_Y, -50.0f); instructions.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL, true ); instructions.SetProperty( Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 10 ); mContentLayer.Add(instructions); diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index 7a8dffd..677232d 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -232,12 +232,12 @@ public: mDeleteButton = Toolkit::PushButton::New(); mDeleteButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); mDeleteButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); - mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); + mDeleteButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER )); mDeleteButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); mDeleteButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, DELETE_IMAGE ); mDeleteButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, DELETE_IMAGE_SELECTED ); mDeleteButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE ); - mDeleteButton.SetSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); + mDeleteButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked); mDeleteButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); mDeleteButton.SetProperty( Actor::Property::VISIBLE, false ); @@ -247,12 +247,12 @@ public: mInsertButton = Toolkit::PushButton::New(); mInsertButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); mInsertButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); - mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); + mInsertButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER )); mInsertButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); mInsertButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, INSERT_IMAGE ); mInsertButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, INSERT_IMAGE_SELECTED ); mInsertButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE ); - mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); + mInsertButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked); mInsertButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); mInsertButton.SetProperty( Actor::Property::VISIBLE, false ); @@ -262,12 +262,12 @@ public: mReplaceButton = Toolkit::PushButton::New(); mReplaceButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); mReplaceButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); - mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); + mReplaceButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER )); mReplaceButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); mReplaceButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, REPLACE_IMAGE ); mReplaceButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, REPLACE_IMAGE_SELECTED ); mReplaceButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE ); - mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); + mReplaceButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked); mReplaceButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); mReplaceButton.SetProperty( Actor::Property::VISIBLE, false ); @@ -872,8 +872,8 @@ public: // From ItemFactory propertyMap.Insert(DevelVisual::Property::VISUAL_FITTING_MODE, DevelVisual::FILL); ImageView actor = ImageView::New(); actor.SetProperty( Toolkit::ImageView::Property::IMAGE, propertyMap ); - actor.SetZ( 0.0f ); - actor.SetPosition( INITIAL_OFFSCREEN_POSITION ); + actor.SetProperty( Actor::Property::POSITION_Z, 0.0f ); + actor.SetProperty( Actor::Property::POSITION, INITIAL_OFFSCREEN_POSITION ); // Add a border image child actor ImageView borderActor = ImageView::New(); @@ -903,9 +903,9 @@ public: // From ItemFactory checkbox.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR ); checkbox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); checkbox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); - checkbox.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ); - checkbox.SetPosition( -SELECTION_BORDER_WIDTH, SELECTION_BORDER_WIDTH ); - checkbox.SetZ( 0.1f ); + checkbox.SetProperty( Actor::Property::SIZE, Vector2( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ) ); + checkbox.SetProperty( Actor::Property::POSITION, Vector2( -SELECTION_BORDER_WIDTH, SELECTION_BORDER_WIDTH )); + checkbox.SetProperty( Actor::Property::POSITION_Z, 0.1f ); Property::Map solidColorProperty; solidColorProperty.Insert( Toolkit::Visual::Property::TYPE, Visual::COLOR ); @@ -925,8 +925,8 @@ public: // From ItemFactory tick.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR ); tick.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); tick.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); - tick.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ); - tick.SetZ( 0.2f ); + tick.SetProperty( Actor::Property::SIZE, Vector2( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ) ); + tick.SetProperty( Actor::Property::POSITION_Z, 0.2f ); tick.SetProperty( Actor::Property::VISIBLE, false ); checkbox.Add( tick ); diff --git a/examples/line-mesh/line-mesh-example.cpp b/examples/line-mesh/line-mesh-example.cpp index 6dc82ff..b4fd114 100644 --- a/examples/line-mesh/line-mesh-example.cpp +++ b/examples/line-mesh/line-mesh-example.cpp @@ -194,7 +194,7 @@ public: mMeshActor = Actor::New(); mMeshActor.AddRenderer( mRenderer ); - mMeshActor.SetSize(200, 200); + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(200, 200) ); Property::Index morphAmountIndex = mMeshActor.RegisterProperty( "uMorphAmount", 0.0f ); @@ -228,7 +228,7 @@ public: modeSelectTableView.SetFitHeight( 1 ); modeSelectTableView.SetFitHeight( 2 ); modeSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) ); - modeSelectTableView.SetScale( Vector3( 0.8f, 0.8f, 0.8f )); + modeSelectTableView.SetProperty( Actor::Property::SCALE, Vector3( 0.8f, 0.8f, 0.8f )); const char* labels[] = { diff --git a/examples/magnifier/magnifier-example.cpp b/examples/magnifier/magnifier-example.cpp index dca210d..0f0f08f 100644 --- a/examples/magnifier/magnifier-example.cpp +++ b/examples/magnifier/magnifier-example.cpp @@ -220,14 +220,14 @@ public: Layer overlay = Layer::New(); overlay.SetProperty( Actor::Property::SENSITIVE,false); overlay.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - overlay.SetSize(mStageSize); + overlay.SetProperty( Actor::Property::SIZE, mStageSize); Stage::GetCurrent().Add(overlay); mMagnifier = Toolkit::Magnifier::New(); mMagnifier.SetSourceActor( mView ); - mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width + mMagnifier.SetProperty( Actor::Property::SIZE, MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width mMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR ); - mMagnifier.SetScale(Vector3::ZERO); + mMagnifier.SetProperty( Actor::Property::SCALE,Vector3::ZERO); overlay.Add( mMagnifier ); // Apply constraint to animate the position of the magnifier. @@ -242,7 +242,7 @@ public: // Create bouncing magnifier automatically bounces around screen. mBouncingMagnifier = Toolkit::Magnifier::New(); mBouncingMagnifier.SetSourceActor( mView ); - mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width + mBouncingMagnifier.SetProperty( Actor::Property::SIZE, MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width mBouncingMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR ); overlay.Add( mBouncingMagnifier ); @@ -374,7 +374,7 @@ public: Vector3 glassPosition(position); glassPosition.y -= mStageSize.width * MAGNIFIER_SIZE.height * 0.5f + Stage::GetCurrent().GetDpi().height * FINGER_RADIUS_INCHES; - mMagnifier.SetPosition( glassPosition ); + mMagnifier.SetProperty( Actor::Property::POSITION, glassPosition ); } void OnKeyEvent(const KeyEvent& event) diff --git a/examples/mesh-morph/mesh-morph-example.cpp b/examples/mesh-morph/mesh-morph-example.cpp index aa18a4d..e2d0773 100644 --- a/examples/mesh-morph/mesh-morph-example.cpp +++ b/examples/mesh-morph/mesh-morph-example.cpp @@ -296,7 +296,7 @@ public: mMeshActor = Actor::New(); mMeshActor.AddRenderer( mRenderer ); - mMeshActor.SetSize(400, 400); + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); Property::Index morphDeltaIndex = mMeshActor.RegisterProperty( "uDelta", 0.f ); diff --git a/examples/mesh-visual/mesh-visual-example.cpp b/examples/mesh-visual/mesh-visual-example.cpp index 0d1fd30..23f18a9 100644 --- a/examples/mesh-visual/mesh-visual-example.cpp +++ b/examples/mesh-visual/mesh-visual-example.cpp @@ -273,7 +273,7 @@ public: //Set position relative to top left, as the light source property is also relative to the top left. mLightSource.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mLightSource.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mLightSource.SetPosition( Stage::GetCurrent().GetSize().x * 0.85f, Stage::GetCurrent().GetSize().y * 0.125 ); + mLightSource.SetProperty( Actor::Property::POSITION, Vector2( Stage::GetCurrent().GetSize().x * 0.85f, Stage::GetCurrent().GetSize().y * 0.125 )); //Supply an image to represent the light. SetLightImage(); @@ -440,7 +440,7 @@ public: case LIGHT_TAG: //Drag light { //Set light source to new position and update the models accordingly. - mLightSource.SetPosition( Vector3( touch.GetScreenPosition( 0 ) ) ); + mLightSource.SetProperty( Actor::Property::POSITION, Vector3( touch.GetScreenPosition( 0 ) ) ); UpdateLight(); break; diff --git a/examples/metaball-explosion/metaball-explosion-example.cpp b/examples/metaball-explosion/metaball-explosion-example.cpp index 1e65c5f..283bc0c 100644 --- a/examples/metaball-explosion/metaball-explosion-example.cpp +++ b/examples/metaball-explosion/metaball-explosion-example.cpp @@ -444,7 +444,7 @@ void MetaballExplosionController::CreateMetaballActors() mMetaballs[i].actor = Actor::New( ); mMetaballs[i].actor.SetProperty( Dali::Actor::Property::NAME, "Metaball" ); - mMetaballs[i].actor.SetScale( 1.0f ); + mMetaballs[i].actor.SetProperty( Actor::Property::SCALE, 1.0f ); mMetaballs[i].actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mMetaballs[i].actor.AddRenderer( renderer ); @@ -506,8 +506,8 @@ void MetaballExplosionController::CreateComposition() // Create actor mCompositionActor = Actor::New( ); mCompositionActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y); + mCompositionActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f)); + mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) ); mCompositionActor.AddRenderer( mRenderer ); Vector2 metaballCenter(0.0,0); @@ -517,7 +517,7 @@ void MetaballExplosionController::CreateComposition() SetPositionToMetaballs( metaballCenter ); - mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y); + mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) ); Stage stage = Stage::GetCurrent(); stage.Add( mCompositionActor ); diff --git a/examples/metaball-refrac/metaball-refrac-example.cpp b/examples/metaball-refrac/metaball-refrac-example.cpp index 5646e0a..3b41883 100644 --- a/examples/metaball-refrac/metaball-refrac-example.cpp +++ b/examples/metaball-refrac/metaball-refrac-example.cpp @@ -423,7 +423,7 @@ void MetaballRefracController::CreateMetaballActors() mMetaballs[i].actor = Actor::New(); mMetaballs[i].actor.SetProperty( Dali::Actor::Property::NAME, "Metaball" ); - mMetaballs[i].actor.SetScale( 1.0f ); + mMetaballs[i].actor.SetProperty( Actor::Property::SCALE, 1.0f ); mMetaballs[i].actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); @@ -485,8 +485,8 @@ void MetaballRefracController::CreateComposition() // Create actor mCompositionActor = Actor::New( ); mCompositionActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y); + mCompositionActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f)); + mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) ); // Create geometry Geometry metaballGeometry = CreateGeometry( false ); diff --git a/examples/model3d-view/model3d-view-example.cpp b/examples/model3d-view/model3d-view-example.cpp index 522d7e9..721bd5f 100644 --- a/examples/model3d-view/model3d-view-example.cpp +++ b/examples/model3d-view/model3d-view-example.cpp @@ -97,7 +97,7 @@ public: mModel3dView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mModel3dView.SetProperty( Dali::Actor::Property::NAME, "model3dViewControl" ); mModel3dView.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); - mModel3dView.SetSize(screenSize); + mModel3dView.SetProperty( Actor::Property::SIZE, screenSize); mModel3dView.SetProperty(Model3dView::Property::LIGHT_POSITION, Vector3(5,10.,0)); @@ -170,8 +170,8 @@ public: { if (mScaled) { - mModel3dView.SetScale(1.0); - mModel3dView.SetPosition(0,0,0); + mModel3dView.SetProperty( Actor::Property::SCALE, 1.0f ); + mModel3dView.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, 0 ) ); mScaled = false; } else @@ -185,8 +185,8 @@ public: float size = 2.5; - mModel3dView.SetScale(size); - mModel3dView.SetPosition(-position.x * size,-position.y * size, 0); + mModel3dView.SetProperty( Actor::Property::SCALE, size ); + mModel3dView.SetProperty( Actor::Property::POSITION, Vector3( -position.x * size, -position.y * size, 0 ) ); mScaled = true; } } diff --git a/examples/motion-blur/motion-blur-example.cpp b/examples/motion-blur/motion-blur-example.cpp index 3f0d052..e8f034e 100644 --- a/examples/motion-blur/motion-blur-example.cpp +++ b/examples/motion-blur/motion-blur-example.cpp @@ -164,7 +164,7 @@ public: // Ensure the content layer is a square so the touch area works in all orientations Vector2 stageSize = Stage::GetCurrent().GetSize(); float size = std::max( stageSize.width, stageSize.height ); - mContentLayer.SetSize( size, size ); + mContentLayer.SetProperty( Actor::Property::SIZE, Vector2( size, size ) ); //Add an effects icon on the right of the title mActorEffectsButton = Toolkit::PushButton::New(); @@ -210,7 +210,7 @@ public: mMotionBlurImageView = ImageView::New(); SetImageFittedInBox( mMotionBlurImageView, mMotionBlurEffect, MOTION_BLUR_ACTOR_IMAGE1, mMotionBlurActorSize.x, mMotionBlurActorSize.y ); mMotionBlurImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mMotionBlurImageView.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y); + mMotionBlurImageView.SetProperty( Actor::Property::SIZE, Vector2(mMotionBlurActorSize.x, mMotionBlurActorSize.y) ); mContentLayer.Add( mMotionBlurImageView ); @@ -253,13 +253,13 @@ public: } else { - mView.SetSize( targetSize ); + mView.SetProperty( Actor::Property::SIZE, targetSize ); } } else { // for first time just set size - mView.SetSize( targetSize ); + mView.SetProperty( Actor::Property::SIZE, targetSize ); } } diff --git a/examples/motion-stretch/motion-stretch-example.cpp b/examples/motion-stretch/motion-stretch-example.cpp index 63787f9..0dc404d 100644 --- a/examples/motion-stretch/motion-stretch-example.cpp +++ b/examples/motion-stretch/motion-stretch-example.cpp @@ -143,7 +143,7 @@ public: // Ensure the content layer is a square so the touch area works in all orientations Vector2 stageSize = Stage::GetCurrent().GetSize(); float size = std::max( stageSize.width, stageSize.height ); - mContentLayer.SetSize( size, size ); + mContentLayer.SetProperty( Actor::Property::SIZE, Vector2( size, size ) ); //Add an slideshow icon on the right of the title mActorEffectsButton = Toolkit::PushButton::New(); @@ -187,7 +187,7 @@ public: mMotionStretchImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionStretchEffect ); mMotionStretchImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mMotionStretchImageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mMotionStretchImageView.SetSize( MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT ); + mMotionStretchImageView.SetProperty( Actor::Property::SIZE, Vector2( MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT ) ); mContentLayer.Add( mMotionStretchImageView ); @@ -226,13 +226,13 @@ public: } else { - mView.SetSize( targetSize ); + mView.SetProperty( Actor::Property::SIZE, targetSize ); } } else { // for first time just set size - mView.SetSize( targetSize ); + mView.SetProperty( Actor::Property::SIZE, targetSize ); } } diff --git a/examples/native-image-source/native-image-source-example.cpp b/examples/native-image-source/native-image-source-example.cpp index d4865cf..aa91c0d 100644 --- a/examples/native-image-source/native-image-source-example.cpp +++ b/examples/native-image-source/native-image-source-example.cpp @@ -146,7 +146,7 @@ public: Vector2 stageSize = stage.GetSize(); mButtonArea = Layer::New(); - mButtonArea.SetSize( stageSize.x, BUTTON_HEIGHT ); + mButtonArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, BUTTON_HEIGHT ) ); mButtonArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); mButtonArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); stage.Add( mButtonArea ); @@ -156,7 +156,7 @@ public: mButtonShow.SetProperty( Toolkit::Button::Property::LABEL, "SHOW" ); mButtonShow.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonShow.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonShow.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); + mButtonShow.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); mButtonShow.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonShow ); @@ -165,8 +165,8 @@ public: mButtonRefreshAlways.SetProperty( Toolkit::Button::Property::LABEL, "ALWAYS" ); mButtonRefreshAlways.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonRefreshAlways.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonRefreshAlways.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonRefreshAlways.SetPosition( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f ); + mButtonRefreshAlways.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonRefreshAlways.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f )); mButtonRefreshAlways.StateChangedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonRefreshAlways ); @@ -174,8 +174,8 @@ public: mButtonRefreshOnce.SetProperty( Toolkit::Button::Property::LABEL, "ONCE" ); mButtonRefreshOnce.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonRefreshOnce.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonRefreshOnce.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonRefreshOnce.SetPosition( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f ); + mButtonRefreshOnce.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonRefreshOnce.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f )); mButtonRefreshOnce.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonRefreshOnce ); @@ -183,8 +183,8 @@ public: mButtonCapture.SetProperty( Toolkit::Button::Property::LABEL, "CAPTURE" ); mButtonCapture.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonCapture.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonCapture.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonCapture.SetPosition( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f ); + mButtonCapture.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonCapture.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f )); mButtonCapture.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonCapture ); @@ -192,8 +192,8 @@ public: mButtonReset.SetProperty( Toolkit::Button::Property::LABEL, "RESET" ); mButtonReset.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonReset.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonReset.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonReset.SetPosition( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f ); + mButtonReset.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonReset.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f )); mButtonReset.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonReset ); } @@ -206,14 +206,14 @@ public: float contentHeight( (stageSize.y - BUTTON_HEIGHT)/2.0f ); mTopContentArea = Actor::New(); - mTopContentArea.SetSize( stageSize.x, contentHeight ); + mTopContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) ); mTopContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); mTopContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); - mTopContentArea.SetY( BUTTON_HEIGHT ); + mTopContentArea.SetProperty( Actor::Property::POSITION_Y, BUTTON_HEIGHT ); stage.Add( mTopContentArea ); mBottomContentArea = Actor::New(); - mBottomContentArea.SetSize( stageSize.x, contentHeight ); + mBottomContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) ); mBottomContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mBottomContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); stage.Add( mBottomContentArea ); @@ -311,7 +311,7 @@ public: renderer.SetTextures( textureSet ); mDisplayActor.AddRenderer( renderer ); - mDisplayActor.SetSize( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() ); + mDisplayActor.SetProperty( Actor::Property::SIZE, Vector2( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() ) ); mBottomContentArea.Add( mDisplayActor ); } diff --git a/examples/perf-scroll/perf-scroll.cpp b/examples/perf-scroll/perf-scroll.cpp index c0b8c00..503dcc5 100644 --- a/examples/perf-scroll/perf-scroll.cpp +++ b/examples/perf-scroll/perf-scroll.cpp @@ -288,7 +288,7 @@ public: propertyMap.Insert(Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FILL); mImageView[i].SetProperty(Toolkit::ImageView::Property::IMAGE, propertyMap); - mImageView[i].SetSize( Vector3(0.0f,0.0f,0.0f) ); + mImageView[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); mImageView[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); mParent.Add( mImageView[i] ); } @@ -315,7 +315,7 @@ public: { mActor[i] = Actor::New(); mActor[i].AddRenderer( renderers[i % numImages] ); - mActor[i].SetSize(0.0f,0.0f,0.0f); + mActor[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); mParent.Add(mActor[i]); } } @@ -369,16 +369,16 @@ public: } if( gUseMesh ) { - mActor[count].SetPosition( initialPosition ); - mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); + mActor[count].SetProperty( Actor::Property::POSITION, initialPosition ); + mActor[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); mActor[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 0.0f ), Vector3::XAXIS ) ) ); mShow.AnimateTo( Property( mActor[count], Actor::Property::POSITION ), Vector3( xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); mShow.AnimateTo( Property( mActor[count], Actor::Property::SIZE ), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); } else { - mImageView[count].SetPosition( initialPosition ); - mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); + mImageView[count].SetProperty( Actor::Property::POSITION, initialPosition ); + mImageView[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); mImageView[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian(0.0f), Vector3::XAXIS ) ) ); mShow.AnimateTo( Property( mImageView[count], Actor::Property::POSITION ), Vector3( xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f ), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); mShow.AnimateTo( Property( mImageView[count], Actor::Property::SIZE ), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); diff --git a/examples/point-mesh/point-mesh-example.cpp b/examples/point-mesh/point-mesh-example.cpp index e785ebd..126b9d6 100644 --- a/examples/point-mesh/point-mesh-example.cpp +++ b/examples/point-mesh/point-mesh-example.cpp @@ -168,7 +168,7 @@ public: mMeshActor = Actor::New(); mMeshActor.AddRenderer( mRenderer ); - mMeshActor.SetSize(400, 400); + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); mMeshActor.RegisterProperty( "uFadeColor", Color::GREEN ); diff --git a/examples/popup/popup-example.cpp b/examples/popup/popup-example.cpp index 9f6d308..41471a2 100644 --- a/examples/popup/popup-example.cpp +++ b/examples/popup/popup-example.cpp @@ -279,7 +279,7 @@ public: if( modifySize ) { // The size is set once at the end. - popup.SetSize( Vector2( newSize[ 0 ], newSize[ 1 ] ) ); + popup.SetProperty( Actor::Property::SIZE, Vector2( newSize[ 0 ], newSize[ 1 ] ) ); } } @@ -337,7 +337,7 @@ public: popup.SetProperty( Dali::Actor::Property::NAME, "popup" ); popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - popup.SetSize( POPUP_WIDTH_DP, 0.0f ); + popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) ); popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false ); popup.OutsideTouchedSignal().Connect( this, &PopupExample::HidePopup ); @@ -359,7 +359,7 @@ public: // Set up the container's layout. footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); - footer.SetSize( 0.0f, 130.0f ); + footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 130.0f ) ); footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); footer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); @@ -565,7 +565,7 @@ public: mPopup.Add( text ); // Fix the popup's size. - mPopup.SetSize( 240.0f, 400.0f ); + mPopup.SetProperty( Actor::Property::SIZE, Vector2( 240.0f, 400.0f ) ); mPopup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); SetupPopup( mPopup, button ); @@ -632,7 +632,7 @@ public: root.SetProperty( Actor::Property::PADDING, Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); - checkBox.SetSize( 48, 48 ); + checkBox.SetProperty( Actor::Property::SIZE, Vector2( 48, 48 ) ); root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Don't show again" ); diff --git a/examples/pre-render-callback/pre-render-callback-example.cpp b/examples/pre-render-callback/pre-render-callback-example.cpp index 6ca853e..68957cd 100644 --- a/examples/pre-render-callback/pre-render-callback-example.cpp +++ b/examples/pre-render-callback/pre-render-callback-example.cpp @@ -34,8 +34,8 @@ void AddText( Control textContainer, std::string text, unsigned int yIndex ) auto label = TextLabel::New(text); label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - label.SetSize( 300,TEXT_HEIGHT ); - label.SetY( yIndex*TEXT_HEIGHT ); + label.SetProperty( Actor::Property::SIZE, Vector2( 300,TEXT_HEIGHT ) ); + label.SetProperty( Actor::Property::POSITION_Y, yIndex*TEXT_HEIGHT ); textContainer.Add( label ); } @@ -114,7 +114,7 @@ private: mSpinner = TextLabel::New(""); mSpinner.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mSpinner.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - mSpinner.SetSize(100,100); + mSpinner.SetProperty( Actor::Property::SIZE, Vector2(100,100) ); mStage.Add(mSpinner); mStage.Add(textContainer); @@ -168,8 +168,8 @@ private: mSceneAnimation.SetLooping(true); mSceneAnimation.Play(); - mSceneActor.SetSize(250.0f, 250.0f); - mSceneActor.SetPosition(0.0f, 0.0f, 130.0f); + mSceneActor.SetProperty( Actor::Property::SIZE, Vector2(250.0f, 250.0f) ); + mSceneActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 130.0f ) ); Quaternion p( Degree( -6.0f ), Vector3::XAXIS ); Quaternion q( Degree( 20.0f ), Vector3::YAXIS ); mSceneActor.SetProperty( Actor::Property::ORIENTATION, p * q ); diff --git a/examples/progress-bar/progress-bar-example.cpp b/examples/progress-bar/progress-bar-example.cpp index 038e87b..9b14cac 100644 --- a/examples/progress-bar/progress-bar-example.cpp +++ b/examples/progress-bar/progress-bar-example.cpp @@ -95,7 +95,7 @@ private: contentTable.SetFitHeight( i ); } - contentTable.SetPosition( 0.0f, TOP_MARGIN ); + contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN )); mContentLayer.Add( contentTable ); // Image selector for progress bar diff --git a/examples/reflection-demo/reflection-example.cpp b/examples/reflection-demo/reflection-example.cpp index 4ffaf31..013c0b6 100644 --- a/examples/reflection-demo/reflection-example.cpp +++ b/examples/reflection-demo/reflection-example.cpp @@ -192,7 +192,7 @@ private: stage.GetRenderTaskList().GetTask(0).SetClearEnabled(false); mLayer3D = Layer::New(); - mLayer3D.SetSize( stageWidth, stageHeight ); + mLayer3D.SetProperty( Actor::Property::SIZE, Vector2( stageWidth, stageHeight ) ); stage.Add(mLayer3D); mLayer3D.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); @@ -301,11 +301,11 @@ private: Actor panScreen = Actor::New(); auto stageSize = stage.GetSize(); - panScreen.SetSize( stageSize.width, stageSize.height ); + panScreen.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width, stageSize.height ) ); panScreen.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); panScreen.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); auto camera2d = stage.GetRenderTaskList().GetTask(0).GetCameraActor(); - panScreen.SetPosition( 0, 0, camera2d.GetNearClippingPlane() ); + panScreen.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, camera2d.GetNearClippingPlane() )); camera2d.Add(panScreen); camera2d.RotateBy( Degree(180.0f), Vector3( 0.0, 1.0, 0.0 ) ); mPanGestureDetector = PanGestureDetector::New(); @@ -330,12 +330,12 @@ private: { auto actor = node.cameraId != 0xffffffff ? CameraActor::New( stage.GetSize() ) : Actor::New(); - actor.SetSize( 1, 1, 1 ); + actor.SetProperty( Actor::Property::SIZE, Vector3( 1, 1, 1 ) ); actor.SetProperty( Dali::Actor::Property::NAME, node.name ); actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actor.SetPosition( node.translation[0], node.translation[1], node.translation[2] ); - actor.SetScale( node.scale[0], node.scale[1], node.scale[2] ); + actor.SetProperty( Actor::Property::POSITION, Vector3( node.translation[0], node.translation[1], node.translation[2] )); + actor.SetProperty( Actor::Property::SCALE, Vector3( node.scale[0], node.scale[1], node.scale[2] ) ); actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(node.rotationQuaternion[3], node.rotationQuaternion[0], node.rotationQuaternion[1], diff --git a/examples/refraction-effect/refraction-effect-example.cpp b/examples/refraction-effect/refraction-effect-example.cpp index 4bc2445..dae8568 100644 --- a/examples/refraction-effect/refraction-effect-example.cpp +++ b/examples/refraction-effect/refraction-effect-example.cpp @@ -293,7 +293,7 @@ private: mMeshActor = Actor::New(); mMeshActor.AddRenderer( mRenderer ); - mMeshActor.SetSize( stageSize ); + mMeshActor.SetProperty( Actor::Property::SIZE, stageSize ); mMeshActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); mContent.Add( mMeshActor ); diff --git a/examples/remote-image-loading/remote-image-loading-example.cpp b/examples/remote-image-loading/remote-image-loading-example.cpp index 791d9f2..bbe3279 100644 --- a/examples/remote-image-loading/remote-image-loading-example.cpp +++ b/examples/remote-image-loading/remote-image-loading-example.cpp @@ -76,7 +76,7 @@ public: mImageView1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); mImageView1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); mImageView1.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); - mImageView1.SetPosition(0, 100); + mImageView1.SetProperty( Actor::Property::POSITION, Vector2(0, 100)); mImageView1.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); stage.Add(mImageView1); @@ -85,7 +85,7 @@ public: mImageView2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); mImageView2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); mImageView2.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); - mImageView2.SetPosition(400, 100); + mImageView2.SetProperty( Actor::Property::POSITION, Vector2(400, 100)); mImageView2.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); stage.Add(mImageView2); @@ -94,7 +94,7 @@ public: mImageView3.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); mImageView3.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); mImageView3.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); - mImageView3.SetPosition(0, 400); + mImageView3.SetProperty( Actor::Property::POSITION, Vector2(0, 400)); mImageView3.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); stage.Add(mImageView3); @@ -103,7 +103,7 @@ public: mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); mImageView4.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); mImageView4.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); - mImageView4.SetPosition(400, 400); + mImageView4.SetProperty( Actor::Property::POSITION, Vector2(400, 400)); mImageView4.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); stage.Add(mImageView4); @@ -112,7 +112,7 @@ public: mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); mImageView5.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); mImageView5.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); - mImageView5.SetPosition(800, 100); + mImageView5.SetProperty( Actor::Property::POSITION, Vector2(800, 100)); mImageView5.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); stage.Add(mImageView5); diff --git a/examples/renderer-stencil/renderer-stencil-example.cpp b/examples/renderer-stencil/renderer-stencil-example.cpp index a5f24c0..2e14a48 100644 --- a/examples/renderer-stencil/renderer-stencil-example.cpp +++ b/examples/renderer-stencil/renderer-stencil-example.cpp @@ -280,7 +280,7 @@ private: Toolkit::Control container = Toolkit::Control::New(); container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); - container.SetSize( size ); + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); // Create a renderer from the geometry and add the texture. @@ -317,7 +317,7 @@ private: Toolkit::Control container = Toolkit::Control::New(); container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - container.SetSize( size ); + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); // Create a renderer from the geometry and add the texture. @@ -355,7 +355,7 @@ private: Toolkit::Control container = Toolkit::Control::New(); container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - container.SetSize( size ); + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); // We rotate the plane as the geometry is created flat in X & Y. We want it to span X & Z axis. @@ -404,7 +404,7 @@ private: Toolkit::Control container = Toolkit::Control::New(); container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - container.SetSize( size ); + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); // Create the cube geometry of unity size. diff --git a/examples/rendering-basic-light/rendering-basic-light-example.cpp b/examples/rendering-basic-light/rendering-basic-light-example.cpp index 02daf2f..2441743 100644 --- a/examples/rendering-basic-light/rendering-basic-light-example.cpp +++ b/examples/rendering-basic-light/rendering-basic-light-example.cpp @@ -163,7 +163,7 @@ public: mLabel = TextLabel::New( material[MaterialID].name ); mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.0f, 0.5f ) ); - mLabel.SetSize( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f ); + mLabel.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f ) ); mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Vector4( 1.0f, 1.0f, 1.0f, 1.0f )); @@ -380,7 +380,7 @@ public: mActor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 1.0f, 0.6f, 1.0f ) ); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); + mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); mActor.AddRenderer( mRenderer ); stage.Add( mActor ); } diff --git a/examples/rendering-basic-pbr/model-pbr.cpp b/examples/rendering-basic-pbr/model-pbr.cpp index 5dce6a5..d570b73 100644 --- a/examples/rendering-basic-pbr/model-pbr.cpp +++ b/examples/rendering-basic-pbr/model-pbr.cpp @@ -72,8 +72,8 @@ void ModelPbr::Init( Shader shader, const std::string& modelUrl, const Vector3& mActor = Actor::New(); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetPosition( position ); - mActor.SetSize( size ); + mActor.SetProperty( Actor::Property::POSITION, position ); + mActor.SetProperty( Actor::Property::SIZE, size ); mActor.AddRenderer( renderer ); } diff --git a/examples/rendering-basic-pbr/model-skybox.cpp b/examples/rendering-basic-pbr/model-skybox.cpp index 2e5709f..a6bf5e3 100644 --- a/examples/rendering-basic-pbr/model-skybox.cpp +++ b/examples/rendering-basic-pbr/model-skybox.cpp @@ -96,7 +96,7 @@ void ModelSkybox::Init( const Vector3& size ) mActor = Actor::New(); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetSize( size ); + mActor.SetProperty( Actor::Property::SIZE, size ); mActor.AddRenderer( renderer ); } diff --git a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp index cdf4426..17a181d 100644 --- a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp +++ b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp @@ -115,7 +115,7 @@ public: mLabel = TextLabel::New( "R:1 M:0" ); mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - mLabel.SetSize( stage.GetSize().width * 0.5f, stage.GetSize().height * 0.083f ); + mLabel.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width * 0.5f, stage.GetSize().height * 0.083f ) ); mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -293,16 +293,16 @@ public: mUiRoot.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); mUiRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); - mUiRoot.SetSize(stage.GetSize()); + mUiRoot.SetProperty( Actor::Property::SIZE, stage.GetSize()); m3dRoot.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); m3dRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); // Setting camera parameters for 3D Scene - mSkybox.GetActor().SetPosition( CAMERA_DEFAULT_POSITION ); + mSkybox.GetActor().SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); CameraActor camera3d = stage.GetRenderTaskList().GetTask(0).GetCameraActor(); camera3d.SetInvertYAxis( true ); - camera3d.SetPosition( CAMERA_DEFAULT_POSITION ); + camera3d.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); camera3d.SetNearClippingPlane( CAMERA_DEFAULT_NEAR ); camera3d.SetFarClippingPlane( CAMERA_DEFAULT_FAR ); camera3d.SetFieldOfView( Radian( Degree( CAMERA_DEFAULT_FOV ) ) ); diff --git a/examples/rendering-cube/rendering-cube.cpp b/examples/rendering-cube/rendering-cube.cpp index 6cc563e..c80ca3a 100644 --- a/examples/rendering-cube/rendering-cube.cpp +++ b/examples/rendering-cube/rendering-cube.cpp @@ -249,8 +249,8 @@ public: mActor = Actor::New(); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); - mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); + mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); mActor.AddRenderer( mRenderer ); stage.Add( mActor ); } diff --git a/examples/rendering-line/rendering-line.cpp b/examples/rendering-line/rendering-line.cpp index 67e5198..4006ac3 100644 --- a/examples/rendering-line/rendering-line.cpp +++ b/examples/rendering-line/rendering-line.cpp @@ -170,9 +170,9 @@ public: mActor = Actor::New(); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); mActor.SetProperty( Actor::Property::COLOR, Color::BLACK ); - mActor.SetSize( Vector3( size.x, size.x, size.x ) ); + mActor.SetProperty( Actor::Property::SIZE, Vector3( size.x, size.x, size.x ) ); mActor.AddRenderer( mRenderer ); stage.Add( mActor ); } diff --git a/examples/rendering-radial-progress/radial-progress.cpp b/examples/rendering-radial-progress/radial-progress.cpp index 2bef6b3..5628c62 100644 --- a/examples/rendering-radial-progress/radial-progress.cpp +++ b/examples/rendering-radial-progress/radial-progress.cpp @@ -134,7 +134,7 @@ public: mActor = Actor::New(); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetSize( Vector2( TEXTURE_WIDTH, TEXTURE_HEIGHT ) ); + mActor.SetProperty( Actor::Property::SIZE, Vector2( TEXTURE_WIDTH, TEXTURE_HEIGHT ) ); mActor.RegisterProperty("uProgress", float(1.0f) ); stage.Add( mActor ); diff --git a/examples/rendering-skybox/look-camera.cpp b/examples/rendering-skybox/look-camera.cpp index 36240ad..d64c29c 100644 --- a/examples/rendering-skybox/look-camera.cpp +++ b/examples/rendering-skybox/look-camera.cpp @@ -129,7 +129,7 @@ void LookCamera::InitialiseDefaultCamera() // should be read from file mCameraActor.SetNearClippingPlane( mNear ); mCameraActor.SetFarClippingPlane( mFar ); - mCameraActor.SetPosition( mCameraPosition ); + mCameraActor.SetProperty( Actor::Property::POSITION, mCameraPosition ); } void LookCamera::CreateInterceptorActor() @@ -138,8 +138,8 @@ void LookCamera::CreateInterceptorActor() mInterceptorActor = Actor::New(); mInterceptorActor.SetProperty( Dali::Actor::Property::NAME, "InputInterceptor" ); - mInterceptorActor.SetSize( Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); - mInterceptorActor.SetPosition( Vector3( 0.0, 0.0, 1.0 ) ); + mInterceptorActor.SetProperty( Actor::Property::SIZE, Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); + mInterceptorActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 1.0 ) ); mInterceptorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mInterceptorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCameraActor.Add( mInterceptorActor ); diff --git a/examples/rendering-skybox/rendering-skybox.cpp b/examples/rendering-skybox/rendering-skybox.cpp index c9c925c..670d5f3 100644 --- a/examples/rendering-skybox/rendering-skybox.cpp +++ b/examples/rendering-skybox/rendering-skybox.cpp @@ -407,7 +407,7 @@ public: mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mActor.AddRenderer( mRenderer ); - mActor.SetSize( 10.f, 10.f, 10.f ); + mActor.SetProperty( Actor::Property::SIZE, Vector3( 10.f, 10.f, 10.f ) ); Stage stage = Stage::GetCurrent(); stage.Add( mActor ); @@ -446,7 +446,7 @@ public: mSkyboxActor.SetProperty( Dali::Actor::Property::NAME, "SkyBox" ); mSkyboxActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mSkyboxActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mSkyboxActor.SetPosition( CAMERA_DEFAULT_POSITION ); + mSkyboxActor.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); mSkyboxActor.AddRenderer( mSkyboxRenderer ); stage.Add( mSkyboxActor ); } diff --git a/examples/rendering-textured-cube/rendering-textured-cube.cpp b/examples/rendering-textured-cube/rendering-textured-cube.cpp index 858b020..d472e65 100644 --- a/examples/rendering-textured-cube/rendering-textured-cube.cpp +++ b/examples/rendering-textured-cube/rendering-textured-cube.cpp @@ -267,8 +267,8 @@ public: mActor = Actor::New(); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); - mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); + mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); mActor.AddRenderer( mRenderer ); stage.Add( mActor ); } diff --git a/examples/rendering-triangle/rendering-triangle.cpp b/examples/rendering-triangle/rendering-triangle.cpp index af50653..f637e50 100644 --- a/examples/rendering-triangle/rendering-triangle.cpp +++ b/examples/rendering-triangle/rendering-triangle.cpp @@ -171,9 +171,9 @@ public: mActor = Actor::New(); mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); mActor.SetProperty( Actor::Property::COLOR, Color::RED ); - mActor.SetSize( Vector3( size.x, size.x, size.x ) ); + mActor.SetProperty( Actor::Property::SIZE, Vector3( size.x, size.x, size.x ) ); mActor.AddRenderer( mRenderer ); stage.Add( mActor ); } diff --git a/examples/scroll-view/scroll-view-example.cpp b/examples/scroll-view/scroll-view-example.cpp index c636e2d..8a2a81d 100644 --- a/examples/scroll-view/scroll-view-example.cpp +++ b/examples/scroll-view/scroll-view-example.cpp @@ -217,7 +217,7 @@ private: mScrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); mScrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); mContentLayer.Add( mScrollView ); - mScrollView.SetSize( stageSize ); + mScrollView.SetProperty( Actor::Property::SIZE, stageSize ); mScrollView.SetAxisAutoLock( true ); mScrollView.SetAxisAutoLockGradient( 1.0f ); @@ -230,7 +230,7 @@ private: { Actor page = CreatePage(); - page.SetPosition( column * stageSize.x, row * stageSize.y ); + page.SetProperty( Actor::Property::POSITION, Vector2( column * stageSize.x, row * stageSize.y )); mScrollView.Add( page ); mPages.push_back(page); @@ -300,8 +300,8 @@ private: Vector3 position( margin * 0.5f + (imageSize.x + margin) * column - stageSize.width * 0.5f, margin * 0.5f + (imageSize.y + margin) * row - stageSize.height * 0.5f, 0.0f); - image.SetPosition( position + imageSize * 0.5f ); - image.SetSize( imageSize ); + image.SetProperty( Actor::Property::POSITION, position + imageSize * 0.5f ); + image.SetProperty( Actor::Property::SIZE, imageSize ); page.Add(image); } } diff --git a/examples/shadows-and-lights/shadows-and-lights-example.cpp b/examples/shadows-and-lights/shadows-and-lights-example.cpp index d69e958..597599a 100644 --- a/examples/shadows-and-lights/shadows-and-lights-example.cpp +++ b/examples/shadows-and-lights/shadows-and-lights-example.cpp @@ -186,12 +186,12 @@ public: toolBar.AddControl( resetButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); // Setup - mView.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); + mView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); mContents.SetBehavior(Layer::LAYER_3D); - mContents.SetPosition(mTranslation); + mContents.SetProperty( Actor::Property::POSITION, mTranslation ); mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); - mContents.SetScale(mPinchScale, mPinchScale, mPinchScale); + mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) ); mPanGestureDetector = PanGestureDetector::New(); mPanGestureDetector.Attach( mView ); @@ -222,9 +222,9 @@ public: mShadowPlaneBg.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); mShadowPlaneBg.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); mShadowPlaneBg.SetProperty( Dali::Actor::Property::NAME,"Plane"); - mShadowPlaneBg.SetSize(1000.0f, 1000.0f); + mShadowPlaneBg.SetProperty( Actor::Property::SIZE, Vector2(1000.0f, 1000.0f) ); mContents.Add(mShadowPlaneBg); - mShadowPlaneBg.SetPosition(Vector3(50.0f, 50.0f, -200.0f)); + mShadowPlaneBg.SetProperty( Actor::Property::POSITION, Vector3(50.0f, 50.0f, -200.0f)); mShadowView.SetShadowPlaneBackground(mShadowPlaneBg); mShadowView.Activate(); @@ -242,7 +242,7 @@ public: mCastingLight = Actor::New(); mCastingLight.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); mCastingLight.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); - mCastingLight.SetPosition( Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor ); + mCastingLight.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor ); TextLabel text = TextLabel::New( "Light" ); text.SetProperty( TextLabel::Property::POINT_SIZE, 20.0f ); @@ -303,8 +303,8 @@ public: mSceneAnimation.SetLooping(true); mSceneAnimation.Play(); - mSceneActor.SetSize(250.0f, 250.0f); - mSceneActor.SetPosition(0.0f, 0.0f, 130.0f); + mSceneActor.SetProperty( Actor::Property::SIZE, Vector2( 250.0f, 250.0f ) ); + mSceneActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 130.0f ) ); mShadowView.Add(mSceneActor); } @@ -354,7 +354,7 @@ public: case PAN_SCENE: { mTranslation += Vector3(gesture.displacement.x, gesture.displacement.y, 0.f); - mContents.SetPosition(mTranslation); + mContents.SetProperty( Actor::Property::POSITION, mTranslation ); break; } @@ -396,7 +396,7 @@ public: } mPinchScale = Clamp(mScaleAtPinchStart * gesture.scale, MIN_PINCH_SCALE, MAX_PINCH_SCALE); - mContents.SetScale(mPinchScale, mPinchScale, mPinchScale); + mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) ); } void Terminate(Application& app) @@ -453,7 +453,7 @@ public: { // Reset translation mTranslation = Vector3::ZERO; - mContents.SetPosition(mTranslation); + mContents.SetProperty( Actor::Property::POSITION, mTranslation ); // Align scene so that light anchor orientation is Z Axis mSceneXRotation = -mLightXRotation; diff --git a/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp b/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp index 0bdcc9b..4976cd5 100644 --- a/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp +++ b/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp @@ -108,8 +108,8 @@ public: TextLabel label01 = TextLabel::New(); label01.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); label01.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - label01.SetSize( 400.f, 50.f ); - label01.SetPosition( 0.f, -100.f ); + label01.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); + label01.SetProperty( Actor::Property::POSITION, Vector2( 0.f, -100.f )); label01.SetProperty( TextLabel::Property::MULTI_LINE, true ); label01.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); @@ -125,8 +125,8 @@ public: TextLabel label02 = TextLabel::New(); label02.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); label02.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - label02.SetSize( 400.f, 50.f ); - label02.SetPosition( 0.f, -50.f ); + label02.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); + label02.SetProperty( Actor::Property::POSITION, Vector2( 0.f, -50.f )); label02.SetProperty( TextLabel::Property::MULTI_LINE, true ); label02.SetProperty( TextLabel::Property::TEXT, "0123456789:" ); @@ -140,8 +140,8 @@ public: TextLabel label03 = TextLabel::New(); label03.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); label03.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - label03.SetSize( 400.f, 50.f ); - label03.SetPosition( 0.f, 0.f ); + label03.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); + label03.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f )); label03.SetProperty( TextLabel::Property::MULTI_LINE, true ); label03.SetProperty( TextLabel::Property::TEXT, "0123456789:" ); @@ -154,8 +154,8 @@ public: TextLabel label04 = TextLabel::New(); label04.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); label04.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - label04.SetSize( 400.f, 50.f ); - label04.SetPosition( 0.f, 50.f ); + label04.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); + label04.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 50.f )); label04.SetProperty( TextLabel::Property::MULTI_LINE, true ); label04.SetProperty( TextLabel::Property::TEXT, "0123456789:" ); diff --git a/examples/simple-scroll-view/simple-scroll-view-example.cpp b/examples/simple-scroll-view/simple-scroll-view-example.cpp index 675bb6b..461aa40 100644 --- a/examples/simple-scroll-view/simple-scroll-view-example.cpp +++ b/examples/simple-scroll-view/simple-scroll-view-example.cpp @@ -69,7 +69,7 @@ private: ScrollView scrollView = ScrollView::New(); scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - scrollView.SetSize( pageSize ); + scrollView.SetProperty( Actor::Property::SIZE, pageSize ); scrollView.SetAxisAutoLock( true ); stage.Add( scrollView ); @@ -89,7 +89,7 @@ private: for( int column = 0, textNumber = 0; column < NUMBER_OF_PAGES; column++ ) { Actor page = CreatePage( pageSize, textNumber ); - page.SetPosition( column * pageSize.x, 0.0f ); + page.SetProperty( Actor::Property::POSITION, Vector2( column * pageSize.x, 0.0f )); scrollView.Add( page ); } diff --git a/examples/simple-text-field/simple-text-field.cpp b/examples/simple-text-field/simple-text-field.cpp index ee9b3e7..3f3731f 100644 --- a/examples/simple-text-field/simple-text-field.cpp +++ b/examples/simple-text-field/simple-text-field.cpp @@ -58,7 +58,7 @@ public: TextField field = TextField::New(); field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - field.SetSize( 300.f, 60.f ); + field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 60.f ) ); field.SetBackgroundColor( Color::WHITE ); field.SetBackgroundColor( Vector4( 1.f, 1.f, 1.f, 0.15f ) ); diff --git a/examples/simple-text-label/simple-text-label-example.cpp b/examples/simple-text-label/simple-text-label-example.cpp index 0cadfe8..e3078e6 100644 --- a/examples/simple-text-label/simple-text-label-example.cpp +++ b/examples/simple-text-label/simple-text-label-example.cpp @@ -58,7 +58,7 @@ public: mLabel.SetProperty( Dali::Actor::Property::NAME, "SimpleTextLabel" ); mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mLabel.SetSize( 400.f, 400.f ); + mLabel.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 400.f ) ); mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK ); mLabel.SetBackgroundColor( Color::WHITE ); diff --git a/examples/simple-text-renderer/simple-text-renderer-example.cpp b/examples/simple-text-renderer/simple-text-renderer-example.cpp index 21f07ce..283c26a 100644 --- a/examples/simple-text-renderer/simple-text-renderer-example.cpp +++ b/examples/simple-text-renderer/simple-text-renderer-example.cpp @@ -313,8 +313,8 @@ public: Actor actor = Actor::New(); actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actor.SetPosition( 0.f, 0.f); - actor.SetSize( 360.f, 360.f ); + actor.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f)); + actor.SetProperty( Actor::Property::SIZE, Vector2( 360.f, 360.f ) ); actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); actor.AddRenderer( renderer ); diff --git a/examples/size-negotiation/size-negotiation-example.cpp b/examples/size-negotiation/size-negotiation-example.cpp index cfb43e7..dab5447 100644 --- a/examples/size-negotiation/size-negotiation-example.cpp +++ b/examples/size-negotiation/size-negotiation-example.cpp @@ -183,7 +183,7 @@ public: popup.SetProperty( Dali::Actor::Property::NAME, "popup" ); popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - popup.SetSize( POPUP_WIDTH_DP, 0.0f ); + popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) ); popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false ); popup.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::OnPopupOutsideTouched ); @@ -428,7 +428,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 100.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -461,7 +461,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 100.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -509,7 +509,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 200.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -561,7 +561,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 100.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -578,7 +578,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 200.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -595,7 +595,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 300.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 300.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -631,7 +631,7 @@ public: Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); - backing.SetSize( 0.0f, 100.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -648,7 +648,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 200.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -699,7 +699,7 @@ public: { Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); - backing.SetSize( 0.0f, 200.0f ); + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); diff --git a/examples/sparkle/sparkle-effect-example.cpp b/examples/sparkle/sparkle-effect-example.cpp index 689a369..7c61588 100644 --- a/examples/sparkle/sparkle-effect-example.cpp +++ b/examples/sparkle/sparkle-effect-example.cpp @@ -101,8 +101,8 @@ private: stage.Add( mMeshActor ); - mMeshActor.SetPosition( ACTOR_POSITION ); - mMeshActor.SetScale( ACTOR_SCALE ); + mMeshActor.SetProperty( Actor::Property::POSITION, ACTOR_POSITION ); + mMeshActor.SetProperty( Actor::Property::SCALE, ACTOR_SCALE ); mTapDetector = TapGestureDetector::New(); mTapDetector.Attach(mCircleBackground); @@ -167,7 +167,7 @@ private: Actor meshActor = Actor::New(); meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - meshActor.SetSize( 1, 1 ); + meshActor.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) ); meshActor.AddRenderer( renderer ); return meshActor; @@ -354,9 +354,9 @@ private: // prepare the animation by setting the uniform to the required value mEffect.SetProperty( mEffect.GetPropertyIndex( BREAK_UNIFORM_NAME ), 1.f ); - mMeshActor.SetScale(0.01f); + mMeshActor.SetProperty( Actor::Property::SCALE,0.01f); mEffect.SetProperty( mEffect.GetPropertyIndex( "uScale" ), 0.01f ); - mMeshActor.SetPosition( 0.f, 0.f, 1.f ); + mMeshActor.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, 1.f ) ); Animation breakAnimation = Animation::New(duration*1.5f); breakAnimation.AnimateTo( Property(mMeshActor, Actor::Property::SCALE), Vector3(ACTOR_SCALE,ACTOR_SCALE,ACTOR_SCALE), EaseOutSquare); diff --git a/examples/styling/styling-application.cpp b/examples/styling/styling-application.cpp index b9d969d..b386432 100644 --- a/examples/styling/styling-application.cpp +++ b/examples/styling/styling-application.cpp @@ -113,7 +113,7 @@ void StylingApplication::Create( Application& application ) mContentPane = CreateContentPane(); stage.Add( mContentPane ); - mContentPane.SetSize( stage.GetSize() ); + mContentPane.SetProperty( Actor::Property::SIZE, stage.GetSize() ); // Content panes: TableView contentLayout = TableView::New( 5, 1 ); @@ -179,7 +179,7 @@ void StylingApplication::Create( Application& application ) std::ostringstream thumbnailName; thumbnailName << "thumbnail" << i+1; ImageView image = ImageView::New( images[i] ); image.SetProperty( Dali::Actor::Property::NAME, thumbnailName.str() ); - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); std::ostringstream label; label << (i+1); std::ostringstream radioButtonStyleName; @@ -379,7 +379,7 @@ Actor StylingApplication::CreateResizableContentPane() grabHandle.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); grabHandle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT ); grabHandle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); - grabHandle.SetPosition( -BORDER_WIDTH, -BORDER_WIDTH ); + grabHandle.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH )); grabHandle.SetProperty( DevelActor::Property::OPACITY, 0.6f ); Layer grabCornerLayer = Layer::New(); @@ -405,7 +405,7 @@ Popup StylingApplication::CreateResetPopup() popup.SetStyleName("ResetPopup"); popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - popup.SetSize( stage.GetSize().width * 0.75f, 0.0f ); + popup.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width * 0.75f, 0.0f ) ); popup.SetProperty( Popup::Property::TAIL_VISIBILITY, false ); popup.OutsideTouchedSignal().Connect( this, &StylingApplication::HidePopup ); popup.HiddenSignal().Connect( this, &StylingApplication::PopupHidden ); @@ -426,7 +426,7 @@ Popup StylingApplication::CreateResetPopup() footer.SetStyleName( "PopupFooter" ); 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.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); @@ -630,7 +630,7 @@ void StylingApplication::PopupHidden() void StylingApplication::OnPan( Actor actor, const PanGesture& gesture ) { Vector3 size = mContentPane.GetTargetSize(); - mContentPane.SetSize( size.GetVectorXY() + gesture.displacement * 2.0f ); + mContentPane.SetProperty( Actor::Property::SIZE, Vector2( size.GetVectorXY() + gesture.displacement * 2.0f ) ); } void StylingApplication::OnKeyEvent( const KeyEvent& keyEvent ) diff --git a/examples/super-blur-view/super-blur-view-example.cpp b/examples/super-blur-view/super-blur-view-example.cpp index a33bbfc..a659a2e 100644 --- a/examples/super-blur-view/super-blur-view-example.cpp +++ b/examples/super-blur-view/super-blur-view-example.cpp @@ -58,7 +58,7 @@ private: mSuperBlurView = SuperBlurView::New( DEFAULT_BLUR_LEVEL ); mSuperBlurView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mSuperBlurView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mSuperBlurView.SetSize( 800, 1280 ); + mSuperBlurView.SetProperty( Actor::Property::SIZE, Vector2( 800, 1280 ) ); mSuperBlurView.SetProperty( SuperBlurView::Property::IMAGE_URL, BACKGROUND_IMAGE ); stage.Add( mSuperBlurView ); diff --git a/examples/text-editor/text-editor-example.cpp b/examples/text-editor/text-editor-example.cpp index 97a14a9..4183daa 100644 --- a/examples/text-editor/text-editor-example.cpp +++ b/examples/text-editor/text-editor-example.cpp @@ -152,7 +152,7 @@ public: mEditor = TextEditor::New(); mEditor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); mEditor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); - mEditor.SetPosition( 0.f, toolBarHeight * 2.0f, 0.f ); + mEditor.SetProperty( Actor::Property::POSITION, Vector3( 0.f, toolBarHeight * 2.0f, 0.f )); mEditor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); mEditor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, TEXT_EDITOR_RELATIVE_SIZE ); @@ -195,7 +195,7 @@ public: // Place below color selection button. mButtonContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mButtonContainer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); - mButtonContainer.SetPosition( 0.0f, 2.f * TOOLBAR_PADDING, 0.f ); + mButtonContainer.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 2.f * TOOLBAR_PADDING, 0.f )); mColorContainer.Add( mButtonContainer ); const Vector3 buttonPercentage( 1.f, 0.8f / static_cast( NUMBER_OF_COLORS ), 1.f ); diff --git a/examples/text-fonts/text-fonts-example.cpp b/examples/text-fonts/text-fonts-example.cpp index d815ede..30860c4 100644 --- a/examples/text-fonts/text-fonts-example.cpp +++ b/examples/text-fonts/text-fonts-example.cpp @@ -92,7 +92,7 @@ public: void CreateContainer( Control& container, const Vector2 size ) { container = Control::New(); - container.SetSize( size ); + container.SetProperty( Actor::Property::SIZE, size ); container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); container.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); } @@ -102,7 +102,7 @@ public: button = PushButton::New(); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - button.SetSize( 50.0f, 50.0f ); + button.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) ); } bool OnButtonClicked( Toolkit::Button button ) @@ -117,7 +117,7 @@ public: CreateContainer ( mContainer4 , mLayoutSize); Stage stage = Stage::GetCurrent(); Vector2 stageSize = stage.GetSize(); - mContainer4.SetPosition( 0, stageSize.height*0.25f*3 ); + mContainer4.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f*3 )); stage.Add( mContainer4 ); // Info CreateContainer ( mContainer4Info , mLayoutSize ); @@ -192,9 +192,9 @@ public: CreateTextLabel ( mLabel3, LABEL_TEXT, Color::WHITE ); mLabel3.SetProperty( TextLabel::Property::FONT_FAMILY, "SamsungOneUI" ); - mContainer.SetPosition( 0, 0 ); - mContainer2.SetPosition( 0, stageSize.height*0.25f ); - mContainer3.SetPosition( 0, stageSize.height*0.25f*2 ); + mContainer.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); + mContainer2.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f )); + mContainer3.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f*2 )); mContainer.Add( mLabel ); mContainer2.Add( mLabel2 ); diff --git a/examples/text-label/expanding-buttons-impl.cpp b/examples/text-label/expanding-buttons-impl.cpp index ee2f87f..a4892a8 100644 --- a/examples/text-label/expanding-buttons-impl.cpp +++ b/examples/text-label/expanding-buttons-impl.cpp @@ -84,7 +84,7 @@ void ExpandingButtons::OnInitialize() void ExpandingButtons::OnRelayout( const Dali::Vector2& targetSize, Dali::RelayoutContainer& container ) { mButtonSize = targetSize; - mExpandButton.SetSize( targetSize ); + mExpandButton.SetProperty( Actor::Property::SIZE, targetSize ); } void ExpandingButtons::RegisterButton( Dali::Toolkit::Control& control ) diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp index 8faf0a6..54ce940 100644 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -185,9 +185,9 @@ public: void SetUpExpandingStyleButtons( Vector2 position ) { mExpandingButtons = Demo::ExpandingButtons::New(); - mExpandingButtons.SetPosition( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE ); + mExpandingButtons.SetProperty( Actor::Property::POSITION, Vector2( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE )); mExpandingButtons.CollapsingSignal().Connect( this, &TextLabelExample::OnExpandingButtonCollapsing ); - mExpandingButtons.SetSize( mButtonSize ); + mExpandingButtons.SetProperty( Actor::Property::SIZE, mButtonSize ); // Creates the buttons to be expanded CreateStyleButtons(); @@ -213,7 +213,7 @@ public: mContainer.SetProperty( Dali::Actor::Property::NAME, "Container" ); mContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mLayoutSize = Vector2(mStageSize.width*0.6f, mStageSize.width*0.6f); - mContainer.SetSize( mLayoutSize ); + mContainer.SetProperty( Actor::Property::SIZE, mLayoutSize ); stage.Add( mContainer ); // Resize the center layout when the corner is grabbed @@ -232,7 +232,7 @@ public: mLabel.SetProperty( Dali::Actor::Property::NAME, "TextLabel" ); mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mLabel.SetSize(mLayoutSize); + mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize ); mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN ); mLabel.SetBackgroundColor( Color::WHITE ); @@ -446,7 +446,7 @@ public: if ( ! mColorButtons[index] ) { mColorButtons[index] = RadioButton::New(); - mColorButtons[index].SetSize( mButtonSize ); + mColorButtons[index].SetProperty( Actor::Property::SIZE, mButtonSize ); mColorButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnColorSelected ); mColorButtons[index].SetProperty( Button::Property::TOGGLABLE, true ); Property::Map propertyMap; @@ -489,7 +489,7 @@ public: mColorButtons[index].Lower(); // Position button using nice animation - mColorButtons[index].SetY( -GAP_BETWEEN_BUTTONS ); + mColorButtons[index].SetProperty( Actor::Property::POSITION_Y, -GAP_BETWEEN_BUTTONS ); float desiredPosition = -( mButtonSize.height + GAP_BETWEEN_BUTTONS ) * (index); AlphaFunction focusedAlphaFunction = AlphaFunction( Vector2 ( 0.32f, 0.08f ), Vector2( 0.38f, 1.72f ) ); mColorButtonsAnimation.AnimateBy( Property( mColorButtons[index], Actor::Property::POSITION_Y ), desiredPosition, focusedAlphaFunction ); @@ -533,7 +533,7 @@ public: mStyleButtons[index].SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, BUTTON_IMAGES[ index ] ); mStyleButtons[index].SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, STYLE_SELECTED_IMAGE ); mStyleButtons[index].SetProperty( Dali::Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mStyleButtons[index].SetSize( mButtonSize ); + mStyleButtons[index].SetProperty( Actor::Property::SIZE, mButtonSize ); mStyleButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnStyleButtonClicked ); } } @@ -603,13 +603,13 @@ public: Vector2 clampedSize = Vector2( std::max( ConvertToEven( static_cast( mLayoutSize.x )), 2 ), std::max( ConvertToEven( static_cast( mLayoutSize.y )), 2 ) ); - mContainer.SetSize( clampedSize ); + mContainer.SetProperty( Actor::Property::SIZE, clampedSize ); } if( gesture.state == Gesture::Cancelled || gesture.state == Gesture::Finished ) { // Resize the text label to match the container size when panning is finished - mLabel.SetSize(mLayoutSize); + mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize ); mBorder.SetProperty( Actor::Property::VISIBLE,false); } } diff --git a/examples/text-memory-profiling/text-memory-profiling-example.cpp b/examples/text-memory-profiling/text-memory-profiling-example.cpp index d06408a..176ebed 100644 --- a/examples/text-memory-profiling/text-memory-profiling-example.cpp +++ b/examples/text-memory-profiling/text-memory-profiling-example.cpp @@ -107,7 +107,7 @@ public: label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); Vector2 stageSize = Stage::GetCurrent().GetSize(); - label.SetPosition( Vector3( Random::Range( 0.0f, stageSize.x ), Random::Range( 0.0f, stageSize.y ), 0.0f) ); + label.SetProperty( Actor::Property::POSITION, Vector3( Random::Range( 0.0f, stageSize.x ), Random::Range( 0.0f, stageSize.y ), 0.0f) ); switch ( type ) { @@ -181,7 +181,7 @@ public: shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) ); label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); - label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size + label.SetProperty( Actor::Property::SIZE, Vector2(stageSize.x, stageSize.y * 0.25f) ); // Set the text label in larger size break; } default: diff --git a/examples/text-overlap/text-overlap-example.cpp b/examples/text-overlap/text-overlap-example.cpp index 7140614..8ce642e 100644 --- a/examples/text-overlap/text-overlap-example.cpp +++ b/examples/text-overlap/text-overlap-example.cpp @@ -47,7 +47,7 @@ void TextOverlapController::Create( Application& app ) mLabels[i].SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); mLabels[i].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mLabels[i].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); - mLabels[i].SetPosition( 0, (i*2+1) * stageSize.height * 0.25f ); + mLabels[i].SetProperty( Actor::Property::POSITION, Vector2( 0, (i*2+1) * stageSize.height * 0.25f )); } stage.Add( mLabels[0] ); @@ -94,7 +94,7 @@ void TextOverlapController::OnPan( Actor actor, const PanGesture& gesture ) Vector2 stageSize = Stage::GetCurrent().GetSize(); Vector3 size = mGrabbedActor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); float y = Clamp( gesture.position.y, size.y * 0.5f, stageSize.y - size.y*0.5f ); - mGrabbedActor.SetPosition( 0, y ); + mGrabbedActor.SetProperty( Actor::Property::POSITION, Vector2( 0, y )); } else { diff --git a/examples/text-scrolling/text-scrolling-example.cpp b/examples/text-scrolling/text-scrolling-example.cpp index b6651d8..52c35d4 100644 --- a/examples/text-scrolling/text-scrolling-example.cpp +++ b/examples/text-scrolling/text-scrolling-example.cpp @@ -81,7 +81,7 @@ public: box.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); box.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT ); box.SetResizePolicy( ResizePolicy::FIXED, Dimension::WIDTH ); - box.SetSize( size.width, 0.f ); + box.SetProperty( Actor::Property::SIZE, Vector2( size.width, 0.f ) ); parent.Add( box ); Dali::Property::Map border; @@ -107,7 +107,7 @@ public: } button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - button.SetSize(BOX_SIZE.height,BOX_SIZE.height); + button.SetProperty( Actor::Property::SIZE, Vector2(BOX_SIZE.height,BOX_SIZE.height) ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); parent.Add(button); @@ -128,7 +128,7 @@ public: Actor rootActor = Actor::New(); rootActor.SetProperty( Dali::Actor::Property::NAME,"rootActor"); rootActor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - rootActor.SetSize( mStageSize ); + rootActor.SetProperty( Actor::Property::SIZE, mStageSize ); rootActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); stage.Add( rootActor ); @@ -143,7 +143,7 @@ public: desktop.SetProperty( Dali::Actor::Property::NAME,"desktopActor"); desktop.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); desktop.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - desktop.SetSize( mTargetActorSize ); + desktop.SetProperty( Actor::Property::SIZE, mTargetActorSize ); rootActor.Add( desktop ); // Add desktop (content) to offscreen actor @@ -155,7 +155,7 @@ public: Control boxE = Control::New(); CreateBox( "boxA", boxA, desktop, BOX_SIZE ); - boxA.SetPosition( 0.0f, -500.0f, 1.0f ); + boxA.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -500.0f, 1.0f )); // Create TextField TextField field = TextField::New(); @@ -165,16 +165,16 @@ public: field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Enter Folder Name" ); field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect( SCREEN_BORDER, SCREEN_BORDER, mStageSize.width - SCREEN_BORDER*2, mStageSize.height - SCREEN_BORDER*2 ) ); boxA.Add( field ); - boxA.SetSize(BOX_SIZE); + boxA.SetProperty( Actor::Property::SIZE, BOX_SIZE); CreateBox( "boxB", boxB, desktop, SCROLLING_BOX_SIZE ); - boxB.SetPosition( 0.0f, -400.0f, 1.0f ); + boxB.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -400.0f, 1.0f )); Toolkit::PushButton scrollLargeButton = Toolkit::PushButton::New(); scrollLargeButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedLarge ); CreateLabel( mLargeLabel, "A Quick Brown Fox Jumps Over The Lazy Dog", boxB, false ,scrollLargeButton ); CreateBox( "boxC", boxC, desktop, SCROLLING_BOX_SIZE ); - boxC.SetPosition( 0.0f, -300.0f, 1.0f ); + boxC.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -300.0f, 1.0f )); Toolkit::PushButton scrollSmallButton = Toolkit::PushButton::New(); scrollSmallButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedSmall ); CreateLabel( mSmallLabel, "Hello Text", boxC , true, scrollSmallButton ); @@ -185,7 +185,7 @@ public: mSmallLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); CreateBox( "boxD", boxD, desktop, SCROLLING_BOX_SIZE ); - boxD.SetPosition( 0.0f, -200.0f, 1.0f ); + boxD.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -200.0f, 1.0f )); Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New(); scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl ); CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton ); @@ -193,7 +193,7 @@ public: mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f ); CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE ); - boxE.SetPosition( 0.0f, -100.0f, 1.0f ); + boxE.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -100.0f, 1.0f )); Toolkit::PushButton scrollRtlLongButton = Toolkit::PushButton::New(); scrollRtlLongButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtlLong ); CreateLabel( mRtlLongLabel, " مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم", boxE , false, scrollRtlLongButton ); @@ -213,7 +213,7 @@ public: colorButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); colorButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); colorButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - colorButton.SetSize(BOX_SIZE.height,BOX_SIZE.height); + colorButton.SetProperty( Actor::Property::SIZE, Vector2(BOX_SIZE.height,BOX_SIZE.height) ); colorButton.ClickedSignal().Connect( this, &TextScrollingExample::OnColorButtonClicked ); rootActor.Add( colorButton ); @@ -383,7 +383,7 @@ public: mTargetActorPosition.y = mTargetActorPosition.y + position.y; mTargetActorPosition.y = std::min( mTargetActorPosition.y, -mTargetActorSize.height ); mTargetActorPosition.y = std::max( mTargetActorPosition.y, ( mTargetActorSize.height - mStageSize.height*0.25f ) ); - actor.SetPosition( 0.0f, mTargetActorPosition.y ); + actor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, mTargetActorPosition.y )); } } diff --git a/examples/textured-mesh/textured-mesh-example.cpp b/examples/textured-mesh/textured-mesh-example.cpp index 7d59d60..99f189e 100644 --- a/examples/textured-mesh/textured-mesh-example.cpp +++ b/examples/textured-mesh/textured-mesh-example.cpp @@ -129,7 +129,7 @@ public: mMeshActor = Actor::New(); mMeshActor.AddRenderer( mRenderer ); - mMeshActor.SetSize(400, 400); + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); Property::Index fadeColorIndex = mRenderer.RegisterProperty( "uFadeColor", Color::MAGENTA ); mRenderer.SetProperty( Renderer::Property::DEPTH_INDEX, 0 ); @@ -143,7 +143,7 @@ public: mMeshActor2 = Actor::New(); mMeshActor2.AddRenderer( mRenderer2 ); - mMeshActor2.SetSize(400, 400); + mMeshActor2.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); mMeshActor2.RegisterProperty( "anotherProperty", Color::GREEN ); diff --git a/examples/tooltip/tooltip-example.cpp b/examples/tooltip/tooltip-example.cpp index 2d67b0c..36f436e 100644 --- a/examples/tooltip/tooltip-example.cpp +++ b/examples/tooltip/tooltip-example.cpp @@ -157,7 +157,7 @@ private: control.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75, 0.1, 1.0 ) ); control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); - control.SetY( stageSize.height * previousPosition ); + control.SetProperty( Actor::Property::POSITION_Y, stageSize.height * previousPosition ); } } diff --git a/examples/video-view/video-view-example.cpp b/examples/video-view/video-view-example.cpp index 60180db..093ddff 100644 --- a/examples/video-view/video-view-example.cpp +++ b/examples/video-view/video-view-example.cpp @@ -68,7 +68,7 @@ class VideoViewController: public ConnectionTracker mVideoView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mVideoView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mVideoView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); - mVideoView.SetSize( INIT_WIDTH, INIT_HEIGHT ); + mVideoView.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, INIT_HEIGHT ) ); mVideoView.SetProperty( VideoView::Property::LOOPING, true ); mVideoView.SetProperty( VideoView::Property::MUTED, false ); mVideoView.SetProperty( VideoView::Property::VIDEO, PLAY_FILE ); @@ -77,7 +77,7 @@ class VideoViewController: public ConnectionTracker mMenu.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); mMenu.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); mMenu.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - mMenu.SetSize( INIT_WIDTH, 120 ); + mMenu.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, 120 ) ); mVideoView.Add( mMenu ); mPlayButton = PushButton::New(); @@ -85,8 +85,8 @@ class VideoViewController: public ConnectionTracker mPlayButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mPlayButton.SetProperty( Dali::Actor::Property::NAME, "Play" ); mPlayButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - mPlayButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); - mPlayButton.SetPosition( 40, 10 ); + mPlayButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); + mPlayButton.SetProperty( Actor::Property::POSITION, Vector2( 40, 10 )); mPlayButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); mPauseButton = PushButton::New(); @@ -94,8 +94,8 @@ class VideoViewController: public ConnectionTracker mPauseButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mPauseButton.SetProperty( Dali::Actor::Property::NAME, "Pause" ); mPauseButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - mPauseButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); - mPauseButton.SetPosition( 40, 10 ); + mPauseButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); + mPauseButton.SetProperty( Actor::Property::POSITION, Vector2( 40, 10 )); mPauseButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); mChangeButton = PushButton::New(); @@ -103,8 +103,8 @@ class VideoViewController: public ConnectionTracker mChangeButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mChangeButton.SetProperty( Dali::Actor::Property::NAME, "Change" ); mChangeButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - mChangeButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); - mChangeButton.SetPosition( 140, 10 ); + mChangeButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); + mChangeButton.SetProperty( Actor::Property::POSITION, Vector2( 140, 10 )); mChangeButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); mBackwardButton = PushButton::New(); @@ -112,8 +112,8 @@ class VideoViewController: public ConnectionTracker mBackwardButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mBackwardButton.SetProperty( Dali::Actor::Property::NAME, "Backward" ); mBackwardButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - mBackwardButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); - mBackwardButton.SetPosition( 240, 10 ); + mBackwardButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); + mBackwardButton.SetProperty( Actor::Property::POSITION, Vector2( 240, 10 )); mBackwardButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); mForwardButton = PushButton::New(); @@ -121,8 +121,8 @@ class VideoViewController: public ConnectionTracker mForwardButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mForwardButton.SetProperty( Dali::Actor::Property::NAME, "Forward" ); mForwardButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); - mForwardButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); - mForwardButton.SetPosition( 340, 10 ); + mForwardButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); + mForwardButton.SetProperty( Actor::Property::POSITION, Vector2( 340, 10 )); mForwardButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); mMenu.Add( mPlayButton ); @@ -239,7 +239,7 @@ class VideoViewController: public ConnectionTracker if( gesture.state == Gesture::Finished ) { mScale = mPinchStartScale * gesture.scale; - mVideoView.SetScale( mScale ); + mVideoView.SetProperty( Actor::Property::SCALE, mScale ); } } @@ -247,12 +247,12 @@ class VideoViewController: public ConnectionTracker { if( !mIsFullScreen ) { - mVideoView.SetSize( mStageSize.x, mStageSize.y ); + mVideoView.SetProperty( Actor::Property::SIZE, mStageSize ); mIsFullScreen = true; } else { - mVideoView.SetSize( INIT_WIDTH, INIT_HEIGHT ); + mVideoView.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, INIT_HEIGHT ) ); mIsFullScreen = false; } } diff --git a/examples/visual-transitions/transition-application.cpp b/examples/visual-transitions/transition-application.cpp index 60db182..4802537 100644 --- a/examples/visual-transitions/transition-application.cpp +++ b/examples/visual-transitions/transition-application.cpp @@ -127,7 +127,7 @@ void TransitionApplication::Create( Application& application ) mVisualButtons[i].SetProperty( BeatControl::Property::BEAT_VISUAL, map ); mVisualButtons[i].SetProperty( Dali::Actor::Property::NAME,"VisualButton"); mVisualButtons[i].SetStyleName("VisualButton"); - mVisualButtons[i].SetSize(0, 50); + mVisualButtons[i].SetProperty( Actor::Property::SIZE, Vector2(0, 50) ); mVisualButtons[i].SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); mVisualButtons[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); mVisualIndex = mVisualButtons[i].RegisterProperty( "visualId", i, Property::READ_WRITE ); diff --git a/examples/web-view/web-view-example.cpp b/examples/web-view/web-view-example.cpp index 5d765c1..6a54a2c 100644 --- a/examples/web-view/web-view-example.cpp +++ b/examples/web-view/web-view-example.cpp @@ -68,8 +68,8 @@ public: mWebView = Toolkit::WebView::New( "ko-KR", "Asia/Seoul" ); mWebView.SetProperty( Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::CENTER ); mWebView.SetProperty( Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER ); - mWebView.SetPosition( 0, 0 ); - mWebView.SetSize( width, height ); + mWebView.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); + mWebView.SetProperty( Actor::Property::SIZE, Vector2( width, height ) ); mWebView.PageLoadStartedSignal().Connect( this, &WebViewController::OnPageLoadStarted ); mWebView.PageLoadFinishedSignal().Connect( this, &WebViewController::OnPageLoadFinished ); diff --git a/shared/dali-table-view.cpp b/shared/dali-table-view.cpp index fab87c3..1987b31 100644 --- a/shared/dali-table-view.cpp +++ b/shared/dali-table-view.cpp @@ -739,7 +739,7 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor ) Random::Range( -size.y, size.y ), Random::Range( BUBBLE_MIN_Z, BUBBLE_MAX_Z ) ); - child.SetPosition( childPos ); + child.SetProperty( Actor::Property::POSITION, childPos ); // Define bubble horizontal parallax and vertical wrapping Constraint animConstraint = Constraint::New < Vector3 > ( child, Actor::Property::POSITION, AnimateBubbleConstraint( childPos, Random::Range( -0.85f, 0.25f ) ) ); @@ -766,7 +766,7 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count ) int shapeType = static_cast( Random::Range( 0.0f, NUMBER_OF_SHAPE_IMAGES - 1 ) + 0.5f ); ImageView dfActor = ImageView::New(); - dfActor.SetSize( Vector2( randSize, randSize ) ); + dfActor.SetProperty( Actor::Property::SIZE, Vector2( randSize, randSize ) ); dfActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); // Set the Image URL and the custom shader at the same time diff --git a/shared/view.h b/shared/view.h index 67dee20..e27e374 100644 --- a/shared/view.h +++ b/shared/view.h @@ -70,7 +70,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar, toolBarLayer.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_CENTER ); toolBarLayer.SetProperty( Dali::Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::TOP_CENTER ); toolBarLayer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::WIDTH ); - toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); + toolBarLayer.SetProperty( Dali::Actor::Property::SIZE, Dali::Vector2( 0.0f, style.mToolBarHeight ) ); // Raise tool bar layer to the top. toolBarLayer.RaiseToTop(); -- 2.7.4