Commit ef4c6564a6f1dbf4e3e2d2a4a43f3b3616b359fc

Authored by Tom Robinson
1 parent 547dbafe

Property refactor in dali-core: Demo changes for compiling

Change-Id: Ie3085ce4986965da3743efc9ab6585176d0cdb23
demo/dali-table-view.cpp
@@ -262,7 +262,7 @@ void DaliTableView::Initialize( Application& application ) @@ -262,7 +262,7 @@ void DaliTableView::Initialize( Application& application )
262 mScrollView.SetParentOrigin( ParentOrigin::CENTER ); 262 mScrollView.SetParentOrigin( ParentOrigin::CENTER );
263 // Note: Currently, changing mScrollView to use SizeMode RELATIVE_TO_PARENT 263 // Note: Currently, changing mScrollView to use SizeMode RELATIVE_TO_PARENT
264 // will cause scroll ends to appear in the wrong position. 264 // will cause scroll ends to appear in the wrong position.
265 - mScrollView.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::RelativeToConstraint( SCROLLVIEW_RELATIVE_SIZE ) ) ); 265 + mScrollView.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::Property::Size, Dali::ParentSource( Dali::Actor::Property::Size ), Dali::RelativeToConstraint( SCROLLVIEW_RELATIVE_SIZE ) ) );
266 mScrollView.SetAxisAutoLock( true ); 266 mScrollView.SetAxisAutoLock( true );
267 mScrollView.ScrollCompletedSignal().Connect( this, &DaliTableView::OnScrollComplete ); 267 mScrollView.ScrollCompletedSignal().Connect( this, &DaliTableView::OnScrollComplete );
268 mScrollView.ScrollStartedSignal().Connect( this, &DaliTableView::OnScrollStart ); 268 mScrollView.ScrollStartedSignal().Connect( this, &DaliTableView::OnScrollStart );
@@ -733,9 +733,9 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis @@ -733,9 +733,9 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis
733 dfActor.SetPosition( actorPos ); 733 dfActor.SetPosition( actorPos );
734 734
735 // Define bubble horizontal parallax and vertical wrapping 735 // Define bubble horizontal parallax and vertical wrapping
736 - Constraint animConstraint = Constraint::New < Vector3 > ( Actor::POSITION, 736 + Constraint animConstraint = Constraint::New < Vector3 > ( Actor::Property::Position,
737 Source( mScrollView, mScrollView.GetPropertyIndex( ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ), 737 Source( mScrollView, mScrollView.GetPropertyIndex( ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
738 - Dali::ParentSource( Dali::Actor::SIZE ), 738 + Dali::ParentSource( Dali::Actor::Property::Size ),
739 AnimateBubbleConstraint( actorPos, Random::Range( -0.85f, 0.25f ), randSize ) ); 739 AnimateBubbleConstraint( actorPos, Random::Range( -0.85f, 0.25f ), randSize ) );
740 dfActor.ApplyConstraint( animConstraint ); 740 dfActor.ApplyConstraint( animConstraint );
741 741
@@ -746,7 +746,7 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis @@ -746,7 +746,7 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis
746 Vector3 toPos( actorPos ); 746 Vector3 toPos( actorPos );
747 toPos.y -= ( size.y + randSize ); 747 toPos.y -= ( size.y + randSize );
748 keyframes.Add( 1.0f, toPos ); 748 keyframes.Add( 1.0f, toPos );
749 - animation.AnimateBetween( Property( dfActor, Actor::POSITION ), keyframes ); 749 + animation.AnimateBetween( Property( dfActor, Actor::Property::Position ), keyframes );
750 animation.SetLooping( true ); 750 animation.SetLooping( true );
751 animation.Play(); 751 animation.Play();
752 mBackgroundAnimations.push_back( animation ); 752 mBackgroundAnimations.push_back( animation );
examples/blocks/blocks-example.cpp
@@ -348,7 +348,7 @@ private: @@ -348,7 +348,7 @@ private:
348 mPaddleImage.SetSize( mPaddleFullSize ); 348 mPaddleImage.SetSize( mPaddleFullSize );
349 349
350 mWobbleProperty = mPaddle.RegisterProperty(WOBBLE_PROPERTY_NAME, 0.0f); 350 mWobbleProperty = mPaddle.RegisterProperty(WOBBLE_PROPERTY_NAME, 0.0f);
351 - Constraint wobbleConstraint = Constraint::New<Quaternion>( Actor::ROTATION, 351 + Constraint wobbleConstraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
352 LocalSource(mWobbleProperty), 352 LocalSource(mWobbleProperty),
353 WobbleConstraint(10.0f)); 353 WobbleConstraint(10.0f));
354 mPaddle.ApplyConstraint(wobbleConstraint); 354 mPaddle.ApplyConstraint(wobbleConstraint);
@@ -361,16 +361,16 @@ private: @@ -361,16 +361,16 @@ private:
361 const float margin(BALL_SIZE.width * stageSize.width * 0.5f); 361 const float margin(BALL_SIZE.width * stageSize.width * 0.5f);
362 362
363 // Set up notifications for ball's collisions against walls. 363 // Set up notifications for ball's collisions against walls.
364 - PropertyNotification leftNotification = mBall.AddPropertyNotification( Actor::POSITION_X, LessThanCondition(margin) ); 364 + PropertyNotification leftNotification = mBall.AddPropertyNotification( Actor::Property::PositionX, LessThanCondition(margin) );
365 leftNotification.NotifySignal().Connect( this, &ExampleController::OnHitLeftWall ); 365 leftNotification.NotifySignal().Connect( this, &ExampleController::OnHitLeftWall );
366 366
367 - PropertyNotification rightNotification = mBall.AddPropertyNotification( Actor::POSITION_X, GreaterThanCondition(stageSize.width - margin) ); 367 + PropertyNotification rightNotification = mBall.AddPropertyNotification( Actor::Property::PositionX, GreaterThanCondition(stageSize.width - margin) );
368 rightNotification.NotifySignal().Connect( this, &ExampleController::OnHitRightWall ); 368 rightNotification.NotifySignal().Connect( this, &ExampleController::OnHitRightWall );
369 369
370 - PropertyNotification topNotification = mBall.AddPropertyNotification( Actor::POSITION_Y, LessThanCondition(margin) ); 370 + PropertyNotification topNotification = mBall.AddPropertyNotification( Actor::Property::PositionY, LessThanCondition(margin) );
371 topNotification.NotifySignal().Connect( this, &ExampleController::OnHitTopWall ); 371 topNotification.NotifySignal().Connect( this, &ExampleController::OnHitTopWall );
372 372
373 - PropertyNotification bottomNotification = mBall.AddPropertyNotification( Actor::POSITION_Y, GreaterThanCondition(stageSize.height + margin) ); 373 + PropertyNotification bottomNotification = mBall.AddPropertyNotification( Actor::Property::PositionY, GreaterThanCondition(stageSize.height + margin) );
374 bottomNotification.NotifySignal().Connect( this, &ExampleController::OnHitBottomWall ); 374 bottomNotification.NotifySignal().Connect( this, &ExampleController::OnHitBottomWall );
375 375
376 // Set up notification for ball colliding against paddle. 376 // Set up notification for ball colliding against paddle.
@@ -378,10 +378,10 @@ private: @@ -378,10 +378,10 @@ private:
378 stage.Add(delegate); 378 stage.Add(delegate);
379 Property::Index property = delegate.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO); 379 Property::Index property = delegate.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO);
380 Constraint constraint = Constraint::New<Vector3>( property, 380 Constraint constraint = Constraint::New<Vector3>( property,
381 - Source(mBall, Actor::POSITION),  
382 - Source(mPaddle, Actor::POSITION),  
383 - Source(mBall, Actor::SIZE),  
384 - Source(mPaddle, Actor::SIZE), 381 + Source(mBall, Actor::Property::Position),
  382 + Source(mPaddle, Actor::Property::Position),
  383 + Source(mBall, Actor::Property::Size),
  384 + Source(mPaddle, Actor::Property::Size),
385 CollisionCircleRectangleConstraint( -Vector3(0.0f, mPaddleHitMargin.height * 0.575f, 0.0f),-Vector3(mPaddleHitMargin) )); 385 CollisionCircleRectangleConstraint( -Vector3(0.0f, mPaddleHitMargin.height * 0.575f, 0.0f),-Vector3(mPaddleHitMargin) ));
386 delegate.ApplyConstraint(constraint); 386 delegate.ApplyConstraint(constraint);
387 387
@@ -601,10 +601,10 @@ private: @@ -601,10 +601,10 @@ private:
601 // Add a constraint on the brick between it and the ball generating a collision-property 601 // Add a constraint on the brick between it and the ball generating a collision-property
602 Property::Index property = brick.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO); 602 Property::Index property = brick.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO);
603 Constraint constraint = Constraint::New<Vector3>( property, 603 Constraint constraint = Constraint::New<Vector3>( property,
604 - Source(mBall, Actor::POSITION),  
605 - Source(brick, Actor::POSITION),  
606 - Source(mBall, Actor::SIZE),  
607 - Source(brick, Actor::SIZE), 604 + Source(mBall, Actor::Property::Position),
  605 + Source(brick, Actor::Property::Position),
  606 + Source(mBall, Actor::Property::Size),
  607 + Source(brick, Actor::Property::Size),
608 CollisionCircleRectangleConstraint(BRICK_COLLISION_MARGIN)); 608 CollisionCircleRectangleConstraint(BRICK_COLLISION_MARGIN));
609 brick.ApplyConstraint(constraint); 609 brick.ApplyConstraint(constraint);
610 610
@@ -641,7 +641,7 @@ private: @@ -641,7 +641,7 @@ private:
641 } 641 }
642 642
643 mBallAnimation = Animation::New(MAX_ANIMATION_DURATION); 643 mBallAnimation = Animation::New(MAX_ANIMATION_DURATION);
644 - mBallAnimation.AnimateBy( Property( mBall, Actor::POSITION ), mBallVelocity * MAX_ANIMATION_DURATION); 644 + mBallAnimation.AnimateBy( Property( mBall, Actor::Property::Position ), mBallVelocity * MAX_ANIMATION_DURATION);
645 mBallAnimation.Play(); 645 mBallAnimation.Play();
646 } 646 }
647 647
@@ -663,8 +663,8 @@ private: @@ -663,8 +663,8 @@ private:
663 663
664 mDragActor = actor; 664 mDragActor = actor;
665 mDragAnimation = Animation::New(0.25f); 665 mDragAnimation = Animation::New(0.25f);
666 - mDragAnimation.AnimateTo( Property(mDragActor, Actor::SCALE), Vector3(1.1f, 1.1f, 1.0f), AlphaFunctions::EaseOut);  
667 - mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::COLOR), Vector4(1.0f, 1.0f, 1.0f, 0.0f), AlphaFunctions::EaseOut); 666 + mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::Scale), Vector3(1.1f, 1.1f, 1.0f), AlphaFunctions::EaseOut);
  667 + mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::Color), Vector4(1.0f, 1.0f, 1.0f, 0.0f), AlphaFunctions::EaseOut);
668 mDragAnimation.Play(); 668 mDragAnimation.Play();
669 } 669 }
670 } 670 }
@@ -689,8 +689,8 @@ private: @@ -689,8 +689,8 @@ private:
689 if(point.state==TouchPoint::Up) // Stop dragging 689 if(point.state==TouchPoint::Up) // Stop dragging
690 { 690 {
691 mDragAnimation = Animation::New(0.25f); 691 mDragAnimation = Animation::New(0.25f);
692 - mDragAnimation.AnimateTo( Property(mDragActor, Actor::SCALE), Vector3(1.0f, 1.0f, 1.0f), AlphaFunctions::EaseIn);  
693 - mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f), AlphaFunctions::EaseOut); 692 + mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::Scale), Vector3(1.0f, 1.0f, 1.0f), AlphaFunctions::EaseIn);
  693 + mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::Color), Vector4(1.0f, 1.0f, 1.0f, 1.0f), AlphaFunctions::EaseOut);
694 mDragAnimation.Play(); 694 mDragAnimation.Play();
695 mDragActor.Reset(); 695 mDragActor.Reset();
696 } 696 }
@@ -747,8 +747,8 @@ private: @@ -747,8 +747,8 @@ private:
747 mBallVelocity = Vector3::ZERO; 747 mBallVelocity = Vector3::ZERO;
748 748
749 Animation shrink = Animation::New(0.5f); 749 Animation shrink = Animation::New(0.5f);
750 - shrink.AnimateTo( Property(mPaddle, Actor::SIZE_WIDTH), mPaddleFullSize.x * f + mPaddleHitMargin.x);  
751 - shrink.AnimateTo( Property(mPaddleImage, Actor::SIZE_WIDTH), mPaddleFullSize.x * f ); 750 + shrink.AnimateTo( Property(mPaddle, Actor::Property::SizeWidth), mPaddleFullSize.x * f + mPaddleHitMargin.x);
  751 + shrink.AnimateTo( Property(mPaddleImage, Actor::Property::SizeWidth), mPaddleFullSize.x * f );
752 752
753 shrink.FinishedSignal().Connect( this, &ExampleController::OnPaddleShrunk ); 753 shrink.FinishedSignal().Connect( this, &ExampleController::OnPaddleShrunk );
754 shrink.Play(); 754 shrink.Play();
@@ -765,7 +765,7 @@ private: @@ -765,7 +765,7 @@ private:
765 mBall.SetPosition( mBallStartPosition ); 765 mBall.SetPosition( mBallStartPosition );
766 mBall.SetColor( Vector4(1.0f, 1.0f, 1.0f, 0.1f) ); 766 mBall.SetColor( Vector4(1.0f, 1.0f, 1.0f, 0.1f) );
767 Animation appear = Animation::New(0.5f); 767 Animation appear = Animation::New(0.5f);
768 - appear.AnimateTo( Property(mBall, Actor::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f) ); 768 + appear.AnimateTo( Property(mBall, Actor::Property::Color), Vector4(1.0f, 1.0f, 1.0f, 1.0f) );
769 appear.Play(); 769 appear.Play();
770 770
771 if(!mLives) 771 if(!mLives)
@@ -832,7 +832,7 @@ private: @@ -832,7 +832,7 @@ private:
832 832
833 // fade brick (destroy) 833 // fade brick (destroy)
834 Animation destroyAnimation = Animation::New(0.5f); 834 Animation destroyAnimation = Animation::New(0.5f);
835 - destroyAnimation.AnimateTo( Property( brick, Actor::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn ); 835 + destroyAnimation.AnimateTo( Property( brick, Actor::Property::ColorAlpha ), 0.0f, AlphaFunctions::EaseIn );
836 destroyAnimation.Play(); 836 destroyAnimation.Play();
837 destroyAnimation.FinishedSignal().Connect( this, &ExampleController::OnBrickDestroyed ); 837 destroyAnimation.FinishedSignal().Connect( this, &ExampleController::OnBrickDestroyed );
838 mDestroyAnimationMap[destroyAnimation] = brick; 838 mDestroyAnimationMap[destroyAnimation] = brick;
examples/cluster/cluster-example.cpp
@@ -707,7 +707,7 @@ public: @@ -707,7 +707,7 @@ public:
707 Vector2 shearCenter( Vector2(position.x + size.width * shearAnchor.x, position.y + size.height * shearAnchor.y) ); 707 Vector2 shearCenter( Vector2(position.x + size.width * shearAnchor.x, position.y + size.height * shearAnchor.y) );
708 Property::Index centerProperty = shaderEffect.GetPropertyIndex(shaderEffect.GetCenterPropertyName()); 708 Property::Index centerProperty = shaderEffect.GetPropertyIndex(shaderEffect.GetCenterPropertyName());
709 Constraint constraint = Constraint::New<Vector2>( centerProperty, 709 Constraint constraint = Constraint::New<Vector2>( centerProperty,
710 - Source(mView, Actor::SIZE), 710 + Source(mView, Actor::Property::Size),
711 ShearEffectCenterConstraint(stageSize, shearCenter) ); 711 ShearEffectCenterConstraint(stageSize, shearCenter) );
712 shaderEffect.ApplyConstraint(constraint); 712 shaderEffect.ApplyConstraint(constraint);
713 713
@@ -720,12 +720,12 @@ public: @@ -720,12 +720,12 @@ public:
720 720
721 constraint = Constraint::New<float>( angleXAxisProperty, 721 constraint = Constraint::New<float>( angleXAxisProperty,
722 Source(mScrollView, scrollOvershootProperty), 722 Source(mScrollView, scrollOvershootProperty),
723 - Source(mView, Actor::ROTATION), 723 + Source(mView, Actor::Property::Rotation),
724 ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::XAXIS) ); 724 ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::XAXIS) );
725 shaderEffect.ApplyConstraint(constraint); 725 shaderEffect.ApplyConstraint(constraint);
726 constraint = Constraint::New<float>( angleYAxisProperty, 726 constraint = Constraint::New<float>( angleYAxisProperty,
727 Source(mScrollView, scrollOvershootProperty), 727 Source(mScrollView, scrollOvershootProperty),
728 - Source(mView, Actor::ROTATION), 728 + Source(mView, Actor::Property::Rotation),
729 ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::YAXIS) ); 729 ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::YAXIS) );
730 shaderEffect.ApplyConstraint(constraint); 730 shaderEffect.ApplyConstraint(constraint);
731 731
@@ -752,7 +752,7 @@ public: @@ -752,7 +752,7 @@ public:
752 752
753 Property::Index anglePerUnit = shaderEffect.GetPropertyIndex( shaderEffect.GetAnglePerUnitPropertyName() ); 753 Property::Index anglePerUnit = shaderEffect.GetPropertyIndex( shaderEffect.GetAnglePerUnitPropertyName() );
754 shaderEffect.ApplyConstraint( Constraint::New<Vector2>( anglePerUnit, 754 shaderEffect.ApplyConstraint( Constraint::New<Vector2>( anglePerUnit,
755 - Source(mView, Actor::ROTATION), 755 + Source(mView, Actor::Property::Rotation),
756 CarouselEffectOrientationConstraint( angleSweep ) ) ); 756 CarouselEffectOrientationConstraint( angleSweep ) ) );
757 757
758 break; 758 break;
@@ -779,7 +779,7 @@ public: @@ -779,7 +779,7 @@ public:
779 // dont apply shader effect to scrollview as it might override internal shaders for bounce effect etc 779 // dont apply shader effect to scrollview as it might override internal shaders for bounce effect etc
780 for( std::vector<ClusterInfo>::iterator i = mClusterInfo.begin(); i != mClusterInfo.end(); ++i ) 780 for( std::vector<ClusterInfo>::iterator i = mClusterInfo.begin(); i != mClusterInfo.end(); ++i )
781 { 781 {
782 - Constraint constraint = Constraint::New<float>(Actor::POSITION_Z, SphereEffectOffsetConstraint(SPHERE_EFFECT_POSITION_Z)); 782 + Constraint constraint = Constraint::New<float>(Actor::Property::PositionZ, SphereEffectOffsetConstraint(SPHERE_EFFECT_POSITION_Z));
783 constraint.SetRemoveAction(Constraint::Discard); 783 constraint.SetRemoveAction(Constraint::Discard);
784 Cluster cluster = i->mCluster; 784 Cluster cluster = i->mCluster;
785 SetShaderEffectRecursively( cluster, shaderEffect ); 785 SetShaderEffectRecursively( cluster, shaderEffect );
examples/cube-transition-effect/cube-transition-effect-example.cpp
@@ -264,7 +264,7 @@ void CubeTransitionApp::OnInit( Application&amp; application ) @@ -264,7 +264,7 @@ void CubeTransitionApp::OnInit( Application&amp; application )
264 mViewTimer.TickSignal().Connect( this, &CubeTransitionApp::OnTimerTick ); 264 mViewTimer.TickSignal().Connect( this, &CubeTransitionApp::OnTimerTick );
265 265
266 // show the first image 266 // show the first image
267 - mImageConstraint = Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() ); 267 + mImageConstraint = Constraint::New<Vector3>( Actor::Property::Scale, LocalSource( Actor::Property::Size ), ParentSource( Actor::Property::Size ), ScaleToFitKeepAspectRatioConstraint() );
268 268
269 mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) ); 269 mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) );
270 mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION ); 270 mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION );
examples/dissolve-effect/dissolve-effect-example.cpp
@@ -232,7 +232,7 @@ void DissolveEffectApp::OnInit( Application&amp; application ) @@ -232,7 +232,7 @@ void DissolveEffectApp::OnInit( Application&amp; application )
232 mParent.SetPositionInheritanceMode( USE_PARENT_POSITION ); 232 mParent.SetPositionInheritanceMode( USE_PARENT_POSITION );
233 mContent.Add( mParent ); 233 mContent.Add( mParent );
234 234
235 - mSizeConstraint= Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() ); 235 + mSizeConstraint= Constraint::New<Vector3>( Actor::Property::Scale, LocalSource( Actor::Property::Size ), ParentSource( Actor::Property::Size ), ScaleToFitKeepAspectRatioConstraint() );
236 236
237 // show the first image 237 // show the first image
238 mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) ); 238 mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) );
examples/item-view/item-view-example.cpp
@@ -993,7 +993,7 @@ private: @@ -993,7 +993,7 @@ private:
993 text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft ); 993 text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft );
994 text.SetStyleToCurrentText( defaultTextStyle ); 994 text.SetStyleToCurrentText( defaultTextStyle );
995 text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y ); 995 text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y );
996 - text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::SIZE_WIDTH, Dali::ParentSource( Dali::Actor::SIZE_WIDTH ), Dali::EqualToConstraint() ) ); 996 + text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::Property::SizeWidth, Dali::ParentSource( Dali::Actor::Property::SizeWidth ), Dali::EqualToConstraint() ) );
997 text.SetZ( -0.9f ); 997 text.SetZ( -0.9f );
998 slider.Add( text ); 998 slider.Add( text );
999 999
@@ -1016,7 +1016,7 @@ private: @@ -1016,7 +1016,7 @@ private:
1016 text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft ); 1016 text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft );
1017 text.SetStyleToCurrentText( defaultTextStyle ); 1017 text.SetStyleToCurrentText( defaultTextStyle );
1018 text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y ); 1018 text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y );
1019 - text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::SIZE_WIDTH, Dali::ParentSource( Dali::Actor::SIZE_WIDTH ), Dali::EqualToConstraint() ) ); 1019 + text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::Property::SizeWidth, Dali::ParentSource( Dali::Actor::Property::SizeWidth ), Dali::EqualToConstraint() ) );
1020 textContainer.Add( text ); 1020 textContainer.Add( text );
1021 1021
1022 mMenu.Show(); 1022 mMenu.Show();
examples/magnifier/magnifier-example.cpp
@@ -240,11 +240,11 @@ public: @@ -240,11 +240,11 @@ public:
240 overlay.Add( mMagnifier ); 240 overlay.Add( mMagnifier );
241 241
242 // Apply constraint to animate the position of the magnifier. 242 // Apply constraint to animate the position of the magnifier.
243 - Constraint constraint = Constraint::New<Vector3>(Actor::POSITION,  
244 - LocalSource(Actor::SIZE),  
245 - LocalSource(Actor::PARENT_ORIGIN),  
246 - LocalSource(Actor::ANCHOR_POINT),  
247 - ParentSource(Actor::SIZE), 243 + Constraint constraint = Constraint::New<Vector3>(Actor::Property::Position,
  244 + LocalSource(Actor::Property::Size),
  245 + LocalSource(Actor::Property::ParentOrigin),
  246 + LocalSource(Actor::Property::AnchorPoint),
  247 + ParentSource(Actor::Property::Size),
248 ConfinementConstraint(ParentOrigin::CENTER, Vector2::ONE * MAGNIFIER_INDENT, Vector2::ONE * MAGNIFIER_INDENT)); 248 ConfinementConstraint(ParentOrigin::CENTER, Vector2::ONE * MAGNIFIER_INDENT, Vector2::ONE * MAGNIFIER_INDENT));
249 constraint.SetRemoveAction(Constraint::Discard); 249 constraint.SetRemoveAction(Constraint::Discard);
250 mMagnifier.ApplyConstraint( constraint ); 250 mMagnifier.ApplyConstraint( constraint );
@@ -260,15 +260,15 @@ public: @@ -260,15 +260,15 @@ public:
260 ContinueAnimation(); 260 ContinueAnimation();
261 261
262 // Apply constraint to animate the position of the magnifier. 262 // Apply constraint to animate the position of the magnifier.
263 - constraint = Constraint::New<Vector3>(Actor::POSITION,  
264 - LocalSource(Actor::SIZE), 263 + constraint = Constraint::New<Vector3>(Actor::Property::Position,
  264 + LocalSource(Actor::Property::Size),
265 LocalSource(mAnimationTimeProperty), 265 LocalSource(mAnimationTimeProperty),
266 MagnifierPathConstraint(mStageSize, mStageSize * 0.5f)); 266 MagnifierPathConstraint(mStageSize, mStageSize * 0.5f));
267 mBouncingMagnifier.ApplyConstraint( constraint ); 267 mBouncingMagnifier.ApplyConstraint( constraint );
268 268
269 // Apply constraint to animate the source of the magnifier. 269 // Apply constraint to animate the source of the magnifier.
270 constraint = Constraint::New<Vector3>(mBouncingMagnifier.GetPropertyIndex( Toolkit::Magnifier::SOURCE_POSITION_PROPERTY_NAME ), 270 constraint = Constraint::New<Vector3>(mBouncingMagnifier.GetPropertyIndex( Toolkit::Magnifier::SOURCE_POSITION_PROPERTY_NAME ),
271 - LocalSource(Actor::SIZE), 271 + LocalSource(Actor::Property::Size),
272 LocalSource(mAnimationTimeProperty), 272 LocalSource(mAnimationTimeProperty),
273 MagnifierPathConstraint(mStageSize)); 273 MagnifierPathConstraint(mStageSize));
274 mBouncingMagnifier.ApplyConstraint( constraint ); 274 mBouncingMagnifier.ApplyConstraint( constraint );
@@ -355,7 +355,7 @@ public: @@ -355,7 +355,7 @@ public:
355 if(!mMagnifierShown) 355 if(!mMagnifierShown)
356 { 356 {
357 Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION); 357 Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
358 - animation.AnimateTo(Property(mMagnifier, Actor::SCALE), Vector3::ONE, AlphaFunctions::EaseIn); 358 + animation.AnimateTo(Property(mMagnifier, Actor::Property::Scale), Vector3::ONE, AlphaFunctions::EaseIn);
359 animation.Play(); 359 animation.Play();
360 mMagnifierShown = true; 360 mMagnifierShown = true;
361 } 361 }
@@ -369,7 +369,7 @@ public: @@ -369,7 +369,7 @@ public:
369 if(mMagnifierShown) 369 if(mMagnifierShown)
370 { 370 {
371 Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION); 371 Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
372 - animation.AnimateTo(Property(mMagnifier, Actor::SCALE), Vector3::ZERO, AlphaFunctions::EaseOut); 372 + animation.AnimateTo(Property(mMagnifier, Actor::Property::Scale), Vector3::ZERO, AlphaFunctions::EaseOut);
373 animation.Play(); 373 animation.Play();
374 mMagnifierShown = false; 374 mMagnifierShown = false;
375 } 375 }
examples/motion-blur/motion-blur-example.cpp
@@ -349,7 +349,7 @@ public: @@ -349,7 +349,7 @@ public:
349 mActorTapMovementAnimation = Animation::New( animDuration ); 349 mActorTapMovementAnimation = Animation::New( animDuration );
350 if ( mMotionBlurImageActor ) 350 if ( mMotionBlurImageActor )
351 { 351 {
352 - mActorTapMovementAnimation.AnimateTo( Property(mMotionBlurImageActor, Actor::POSITION), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) ); 352 + mActorTapMovementAnimation.AnimateTo( Property(mMotionBlurImageActor, Actor::Property::Position), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) );
353 } 353 }
354 mActorTapMovementAnimation.SetEndAction( Animation::Bake ); 354 mActorTapMovementAnimation.SetEndAction( Animation::Bake );
355 mActorTapMovementAnimation.Play(); 355 mActorTapMovementAnimation.Play();
examples/motion-stretch/motion-stretch-example.cpp
@@ -261,7 +261,7 @@ public: @@ -261,7 +261,7 @@ public:
261 mActorTapMovementAnimation = Animation::New( animDuration ); 261 mActorTapMovementAnimation = Animation::New( animDuration );
262 if ( mMotionStretchImageActor ) 262 if ( mMotionStretchImageActor )
263 { 263 {
264 - mActorTapMovementAnimation.AnimateTo( Property(mMotionStretchImageActor, Actor::POSITION), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) ); 264 + mActorTapMovementAnimation.AnimateTo( Property(mMotionStretchImageActor, Actor::Property::Position), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) );
265 } 265 }
266 mActorTapMovementAnimation.SetEndAction( Animation::Bake ); 266 mActorTapMovementAnimation.SetEndAction( Animation::Bake );
267 mActorTapMovementAnimation.Play(); 267 mActorTapMovementAnimation.Play();
examples/radial-menu/radial-sweep-view-impl.cpp
@@ -362,17 +362,17 @@ void RadialSweepViewImpl::CreateStencil( Degree initialSector ) @@ -362,17 +362,17 @@ void RadialSweepViewImpl::CreateStencil( Degree initialSector )
362 362
363 // Constrain the vertices of the square mesh to sweep out a sector as the 363 // Constrain the vertices of the square mesh to sweep out a sector as the
364 // rotation angle is animated. 364 // rotation angle is animated.
365 - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(1, AnimatableVertex::POSITION), 365 + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(1, AnimatableVertex::Property::Position),
366 srcStart, srcStart, SquareFanConstraint(0))); 366 srcStart, srcStart, SquareFanConstraint(0)));
367 - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(2, AnimatableVertex::POSITION), 367 + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(2, AnimatableVertex::Property::Position),
368 srcStart, srcRot, SquareFanConstraint(0))); 368 srcStart, srcRot, SquareFanConstraint(0)));
369 - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(3, AnimatableVertex::POSITION), 369 + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(3, AnimatableVertex::Property::Position),
370 srcStart, srcRot, SquareFanConstraint(1))); 370 srcStart, srcRot, SquareFanConstraint(1)));
371 - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(4, AnimatableVertex::POSITION), 371 + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(4, AnimatableVertex::Property::Position),
372 srcStart, srcRot, SquareFanConstraint(2))); 372 srcStart, srcRot, SquareFanConstraint(2)));
373 - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(5, AnimatableVertex::POSITION), 373 + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(5, AnimatableVertex::Property::Position),
374 srcStart, srcRot, SquareFanConstraint(3))); 374 srcStart, srcRot, SquareFanConstraint(3)));
375 - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(6, AnimatableVertex::POSITION), 375 + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(6, AnimatableVertex::Property::Position),
376 srcStart, srcRot, SquareFanConstraint(4))); 376 srcStart, srcRot, SquareFanConstraint(4)));
377 377
378 mStencilActor.SetDrawMode( DrawMode::STENCIL ); 378 mStencilActor.SetDrawMode( DrawMode::STENCIL );
examples/refraction-effect/refraction-effect-example.cpp
@@ -235,7 +235,7 @@ public: @@ -235,7 +235,7 @@ public:
235 handle.SetUniform( "uEffectStrength", 0.f ); 235 handle.SetUniform( "uEffectStrength", 0.f );
236 handle.SetUniform( "uLightIntensity", 2.5f ); 236 handle.SetUniform( "uLightIntensity", 2.5f );
237 237
238 - Property::Index index = handle.RegisterProperty( "uSpinAngle", 0.f ); 238 + Dali::Property::Index index = handle.RegisterProperty( "uSpinAngle", 0.f );
239 Constraint constraint = Constraint::New<Vector2>( handle.GetPropertyIndex("uLightSpinOffset"), 239 Constraint constraint = Constraint::New<Vector2>( handle.GetPropertyIndex("uLightSpinOffset"),
240 LocalSource(index), 240 LocalSource(index),
241 LightOffsetConstraint(stageSize.x*0.1f)); 241 LightOffsetConstraint(stageSize.x*0.1f));
examples/scroll-view/scroll-view-example.cpp
@@ -210,7 +210,7 @@ public: @@ -210,7 +210,7 @@ public:
210 210
211 // Hack to force screen refresh. 211 // Hack to force screen refresh.
212 Animation animation = Animation::New(1.0f); 212 Animation animation = Animation::New(1.0f);
213 - animation.AnimateTo(Property(mContentLayer, Actor::POSITION), Vector3::ZERO ); 213 + animation.AnimateTo(Property(mContentLayer, Actor::Property::Position), Vector3::ZERO );
214 animation.Play(); 214 animation.Play();
215 } 215 }
216 216
examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp
@@ -286,9 +286,9 @@ public: @@ -286,9 +286,9 @@ public:
286 286
287 Property::Index angleIndex = mImageActor2.RegisterProperty("angle", Property::Value(30.0f)); 287 Property::Index angleIndex = mImageActor2.RegisterProperty("angle", Property::Value(30.0f));
288 Source angleSrc( mImageActor2, angleIndex ); 288 Source angleSrc( mImageActor2, angleIndex );
289 - mImageActor1.ApplyConstraint(Constraint::New<Quaternion>( Actor::ROTATION, angleSrc, 289 + mImageActor1.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::Rotation, angleSrc,
290 RotationConstraint(-1.0f))); 290 RotationConstraint(-1.0f)));
291 - mImageActor3.ApplyConstraint(Constraint::New<Quaternion>( Actor::ROTATION, angleSrc, 291 + mImageActor3.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::Rotation, angleSrc,
292 RotationConstraint(+1.0f))); 292 RotationConstraint(+1.0f)));
293 293
294 mSceneAnimation = Animation::New(2.5f); 294 mSceneAnimation = Animation::New(2.5f);
shared/view.h
@@ -86,7 +86,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar, @@ -86,7 +86,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar,
86 Dali::Layer toolBarLayer = Dali::Layer::New(); 86 Dali::Layer toolBarLayer = Dali::Layer::New();
87 toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); 87 toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
88 toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); 88 toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER );
89 - toolBarLayer.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::SourceWidthFixedHeight( style.mToolBarHeight ) ) ); 89 + toolBarLayer.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::Property::Size, Dali::ParentSource( Dali::Actor::Property::Size ), Dali::SourceWidthFixedHeight( style.mToolBarHeight ) ) );
90 toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); 90 toolBarLayer.SetSize( 0.0f, style.mToolBarHeight );
91 91
92 // Raise tool bar layer to the top. 92 // Raise tool bar layer to the top.