From: Richard Huang Date: Wed, 27 May 2020 13:20:13 +0000 (+0100) Subject: Remove more public Setter/Getter APIs from Dali::Actor X-Git-Tag: dali_1.9.14~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F41%2F234641%2F1;p=platform%2Fcore%2Fuifw%2Fdali-demo.git Remove more public Setter/Getter APIs from Dali::Actor Change-Id: I40c438e3c0667cf2b3ce22aa3b2557a27bfc329b --- diff --git a/examples/animated-vector-images/animated-vector-images-example.cpp b/examples/animated-vector-images/animated-vector-images-example.cpp index 1d72654..0610b79 100644 --- a/examples/animated-vector-images/animated-vector-images-example.cpp +++ b/examples/animated-vector-images/animated-vector-images-example.cpp @@ -98,7 +98,7 @@ class AnimatedVectorImageViewController: public ConnectionTracker mTable.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mTable.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); Vector3 offset( 0.9f, 0.70f, 0.0f ); - mTable.SetSizeModeFactor( offset ); + mTable.SetProperty( Actor::Property::SIZE_MODE_FACTOR, offset ); mTable.SetFitHeight(CellPlacement::TOP_BUTTON); mTable.SetFitHeight(CellPlacement::LOWER_BUTTON); mContentLayer.Add( mTable ); diff --git a/examples/benchmark/benchmark.cpp b/examples/benchmark/benchmark.cpp index abdb5d5..6282b51 100644 --- a/examples/benchmark/benchmark.cpp +++ b/examples/benchmark/benchmark.cpp @@ -362,7 +362,7 @@ public: { mActor[count].SetPosition( initialPosition ); mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); - mActor[count].SetOrientation( Quaternion( Radian(0.0f),Vector3::XAXIS)); + mActor[count].SetProperty( Actor::Property::ORIENTATION, 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 )); } @@ -370,7 +370,7 @@ public: { mImageView[count].SetPosition( initialPosition ); mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); - mImageView[count].SetOrientation( Quaternion( Radian(0.0f),Vector3::XAXIS)); + mImageView[count].SetProperty( Actor::Property::ORIENTATION, 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/bezier-curve/bezier-curve-example.cpp b/examples/bezier-curve/bezier-curve-example.cpp index cf31616..4670c5f 100644 --- a/examples/bezier-curve/bezier-curve-example.cpp +++ b/examples/bezier-curve/bezier-curve-example.cpp @@ -230,7 +230,7 @@ public: .Add( Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, ANIMATION_BACKGROUND ) ); animRail.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - animRail.SetSizeModeFactor( Vector3( 0.666f, 0.2f, 1.0f ) ); + animRail.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.666f, 0.2f, 1.0f ) ); animRail.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); animContainer.Add( animRail ); @@ -382,7 +382,7 @@ public: { TextLabel progressionLabel = TextLabel::New( "Progression" ); progressionLabel.SetProperty( TextLabel::Property::POINT_SIZE, AXIS_LABEL_POINT_SIZE ); - progressionLabel.SetOrientation( Degree(-90.0f), Vector3::ZAXIS ); + progressionLabel.SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian( Degree(-90.0f) ), Vector3::ZAXIS ) ); progressionLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); progressionLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); CreateLine( progressionLabel, ParentOrigin::BOTTOM_LEFT ); diff --git a/examples/buttons/buttons-example.cpp b/examples/buttons/buttons-example.cpp index 509e93f..6c7e1ba 100644 --- a/examples/buttons/buttons-example.cpp +++ b/examples/buttons/buttons-example.cpp @@ -215,7 +215,7 @@ class ButtonsController: public ConnectionTracker // ImageView to display selected image mImage = Toolkit::ImageView::New( BIG_IMAGE_1 ); mImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + mImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); radioGroup2Background.AddChild( mImage, Toolkit::TableView::CellPosition( 0, 1, 2, 1 ) ); // The enable/disable radio group @@ -255,7 +255,7 @@ class ButtonsController: public ConnectionTracker Toolkit::ImageView image = Toolkit::ImageView::New( ENABLED_IMAGE ); image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); - image.SetPadding( Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) ); + image.SetProperty( Actor::Property::PADDING, Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) ); tableView.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) ); radioButtonsGroup1.Add( tableView ); diff --git a/examples/clipping/clipping-item-factory.cpp b/examples/clipping/clipping-item-factory.cpp index 7ec1082..a30afa1 100644 --- a/examples/clipping/clipping-item-factory.cpp +++ b/examples/clipping/clipping-item-factory.cpp @@ -116,8 +116,8 @@ Actor ClippingItemFactory::NewItem( unsigned int itemId ) borderActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); borderActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); borderActor.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS ); - borderActor.SetSizeModeFactor( Vector3( 2.0f * ITEM_BORDER_SIZE, 2.0f * ITEM_BORDER_SIZE, 0.0f ) ); - borderActor.SetColorMode( USE_PARENT_COLOR ); + borderActor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 2.0f * ITEM_BORDER_SIZE, 2.0f * ITEM_BORDER_SIZE, 0.0f ) ); + borderActor.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR ); borderActor.SetProperty( ImageView::Property::IMAGE, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER ) .Add( BorderVisual::Property::COLOR, Color::WHITE ) diff --git a/examples/dissolve-effect/dissolve-effect-example.cpp b/examples/dissolve-effect/dissolve-effect-example.cpp index 2cb8874..d9ce582 100644 --- a/examples/dissolve-effect/dissolve-effect-example.cpp +++ b/examples/dissolve-effect/dissolve-effect-example.cpp @@ -256,7 +256,7 @@ void DissolveEffectApp::OnInit( Application& application ) mCurrentImage = CreateStageFillingImageView( IMAGES[mIndex] ); mCurrentImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + mCurrentImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mParent.Add( mCurrentImage ); mPanGestureDetector.Attach( mCurrentImage ); @@ -289,7 +289,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) mNextImage = CreateStageFillingImageView( IMAGES[ mIndex ] ); mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mNextImage.SetZ(INITIAL_DEPTH); mParent.Add( mNextImage ); Vector2 size = Vector2( mCurrentImage.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); @@ -404,7 +404,7 @@ bool DissolveEffectApp::OnTimerTick() mNextImage = CreateStageFillingImageView( IMAGES[ mIndex ] ); mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mNextImage.SetZ(INITIAL_DEPTH); mParent.Add( mNextImage ); switch( mCentralLineIndex%4 ) diff --git a/examples/fpp-game/game-camera.cpp b/examples/fpp-game/game-camera.cpp index bb23ea5..6b4c672 100644 --- a/examples/fpp-game/game-camera.cpp +++ b/examples/fpp-game/game-camera.cpp @@ -134,7 +134,7 @@ bool GameCamera::OnTick() { rotation = ( rotY * rotX ); } - mCameraActor.SetOrientation( rotation ); + mCameraActor.SetProperty( Actor::Property::ORIENTATION, rotation ); // --------------------------------------------------------------------- // update position diff --git a/examples/fpp-game/game-entity.cpp b/examples/fpp-game/game-entity.cpp index 1f5621c..eb531ef 100644 --- a/examples/fpp-game/game-entity.cpp +++ b/examples/fpp-game/game-entity.cpp @@ -62,7 +62,7 @@ void GameEntity::SetLocation( const Dali::Vector3& loc ) void GameEntity::SetRotation( const Dali::Quaternion& rot ) { - mActor.SetOrientation( rot ); + mActor.SetProperty( Dali::Actor::Property::ORIENTATION, rot ); } void GameEntity::SetScale( const Dali::Vector3& scale ) diff --git a/examples/fpp-game/game-scene.cpp b/examples/fpp-game/game-scene.cpp index 5418b43..dc61707 100644 --- a/examples/fpp-game/game-scene.cpp +++ b/examples/fpp-game/game-scene.cpp @@ -158,7 +158,7 @@ bool GameScene::Load(const char *filename) stage.GetRootLayer().Add( mRootActor ); mRootActor.SetScale( -1.0, 1.0, 1.0 ); mRootActor.SetPosition( 0.0, 0.0, 0.0 ); - mRootActor.SetOrientation( Degree( 90 ), Vector3( 1.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 ) { Actor actor( mEntities[i]->GetActor() ); diff --git a/examples/gestures/gesture-example.cpp b/examples/gestures/gesture-example.cpp index 0e165fe..6d5a3a0 100644 --- a/examples/gestures/gesture-example.cpp +++ b/examples/gestures/gesture-example.cpp @@ -444,7 +444,7 @@ private: } } - actor.SetOrientation( mStartingOrientation * Quaternion( rotation.rotation, Vector3::ZAXIS ) ); + actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( mStartingOrientation * Quaternion( rotation.rotation, Vector3::ZAXIS ) ) ); } /** diff --git a/examples/gradients/gradients-example.cpp b/examples/gradients/gradients-example.cpp index 7d0adc5..0f59724 100644 --- a/examples/gradients/gradients-example.cpp +++ b/examples/gradients/gradients-example.cpp @@ -96,7 +96,7 @@ public: mGradientControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mGradientControl.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); Vector3 offset( 0.9f, 0.7f, 0.0f ); - mGradientControl.SetSizeModeFactor( offset ); + mGradientControl.SetProperty( Actor::Property::SIZE_MODE_FACTOR, offset ); content.Add( mGradientControl ); // ---- Gradient for background diff --git a/examples/hello-world/hello-world-example.cpp b/examples/hello-world/hello-world-example.cpp index f0f830e..3f3d458 100644 --- a/examples/hello-world/hello-world-example.cpp +++ b/examples/hello-world/hello-world-example.cpp @@ -50,6 +50,24 @@ 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 2493d3e..52e64a6 100644 --- a/examples/homescreen-benchmark/homescreen-benchmark.cpp +++ b/examples/homescreen-benchmark/homescreen-benchmark.cpp @@ -214,7 +214,7 @@ public: pageActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); pageActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); pageActor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - pageActor.SetSizeModeFactor( Vector3( PAGE_SCALE_FACTOR_X, PAGE_SCALE_FACTOR_Y, 1.0f ) ); + pageActor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( PAGE_SCALE_FACTOR_X, PAGE_SCALE_FACTOR_Y, 1.0f ) ); return pageActor; } @@ -231,10 +231,10 @@ public: imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map ); imageView.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - imageView.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + imageView.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - imageView.SetSizeModeFactor( Vector3( IMAGE_AREA, IMAGE_AREA, 1.0f ) ); + imageView.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( IMAGE_AREA, IMAGE_AREA, 1.0f ) ); return imageView; } @@ -243,7 +243,7 @@ public: { Toolkit::CheckBoxButton button = Toolkit::CheckBoxButton::New(); button.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - button.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + button.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); button.SetProperty( Toolkit::Button::Property::SELECTED, ( currentIconIndex % 2 == 0 ) ); // Select half the button @@ -283,7 +283,7 @@ public: else { iconView.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - iconView.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + iconView.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); } Actor icon; diff --git a/examples/image-policies/image-policies-example.cpp b/examples/image-policies/image-policies-example.cpp index f213236..2f8c93a 100644 --- a/examples/image-policies/image-policies-example.cpp +++ b/examples/image-policies/image-policies-example.cpp @@ -398,7 +398,7 @@ class ImagePolicies: public ConnectionTracker mTable.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mTable.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); Vector3 offset( 0.9f, 0.90f, 0.0f ); - mTable.SetSizeModeFactor( offset ); + mTable.SetProperty( Actor::Property::SIZE_MODE_FACTOR, offset ); mTable.SetFitHeight( TableRowPlacement::NEXT_BUTTON ); mTable.SetFitHeight( TableRowPlacement::LOADING_STATUS ); view.Add( mTable ); 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 f79667b..821375b 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 @@ -281,7 +281,7 @@ public: Dali::Layer controlsLayer = Dali::Layer::New(); controlsLayer.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - controlsLayer.SetSizeModeFactor( Vector3( 1.0f, 1.0f, 1.0f ) ); + controlsLayer.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 1.0f, 1.0f, 1.0f ) ); controlsLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); controlsLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT); stage.Add( controlsLayer ); 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 05bfccd..d73ec86 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 @@ -381,7 +381,7 @@ public: mScrollBarHorizontal.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_LEFT); mScrollBarHorizontal.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); mScrollBarHorizontal.SetResizePolicy(Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH); - mScrollBarHorizontal.SetOrientation(Quaternion(Radian( 1.5f * Math::PI ), Vector3::ZAXIS)); + mScrollBarHorizontal.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS) ) ); mScrollView.Add(mScrollBarHorizontal); mScrollView.OnRelayoutSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollViewRelayout ); diff --git a/examples/image-view/image-view-example.cpp b/examples/image-view/image-view-example.cpp index 3ca6dd6..3ae1c73 100644 --- a/examples/image-view/image-view-example.cpp +++ b/examples/image-view/image-view-example.cpp @@ -113,7 +113,7 @@ class ImageViewController: public ConnectionTracker mTable.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mTable.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); Vector3 offset( 0.9f, 0.70f, 0.0f ); - mTable.SetSizeModeFactor( offset ); + mTable.SetProperty( Actor::Property::SIZE_MODE_FACTOR, offset ); mTable.SetFitHeight(CellPlacement::TOP_BUTTON); mTable.SetFitHeight(CellPlacement::MID_BUTTON); mTable.SetFitHeight(CellPlacement::LOWER_BUTTON); diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index ccb74e2..7a8dffd 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -233,7 +233,7 @@ public: 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.SetDrawMode( DrawMode::OVERLAY_2D ); + 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 ); @@ -248,7 +248,7 @@ public: 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.SetDrawMode( DrawMode::OVERLAY_2D ); + 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 ); @@ -263,7 +263,7 @@ public: 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.SetDrawMode( DrawMode::OVERLAY_2D ); + 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 ); @@ -880,8 +880,8 @@ public: // From ItemFactory borderActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); borderActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); borderActor.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS ); - borderActor.SetSizeModeFactor( Vector3( 2.0f * ITEM_BORDER_SIZE, 2.0f * ITEM_BORDER_SIZE, 0.0f ) ); - borderActor.SetColorMode( USE_PARENT_COLOR ); + borderActor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 2.0f * ITEM_BORDER_SIZE, 2.0f * ITEM_BORDER_SIZE, 0.0f ) ); + borderActor.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR ); Property::Map borderProperty; borderProperty.Insert( Toolkit::Visual::Property::TYPE, Visual::BORDER ); @@ -900,7 +900,7 @@ public: // From ItemFactory // Add a checkbox child actor; invisible until edit-mode is enabled ImageView checkbox = ImageView::New(); checkbox.SetProperty( Dali::Actor::Property::NAME, "CheckBox" ); - checkbox.SetColorMode( USE_PARENT_COLOR ); + 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 ); @@ -922,7 +922,7 @@ public: // From ItemFactory ImageView tick = ImageView::New( SELECTED_IMAGE ); tick.SetProperty( Dali::Actor::Property::NAME, "Tick" ); - tick.SetColorMode( USE_PARENT_COLOR ); + 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 ); diff --git a/examples/mesh-visual/mesh-visual-example.cpp b/examples/mesh-visual/mesh-visual-example.cpp index 37d5450..0d1fd30 100644 --- a/examples/mesh-visual/mesh-visual-example.cpp +++ b/examples/mesh-visual/mesh-visual-example.cpp @@ -131,12 +131,12 @@ public: //Position each container individually on screen //Main, central model - mContainers[0].SetSizeModeFactor( Vector3( MODEL_SCALE, MODEL_SCALE, 0.0f ) ); + mContainers[0].SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( MODEL_SCALE, MODEL_SCALE, 0.0f ) ); mContainers[0].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mContainers[0].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); //Top left model - mContainers[1].SetSizeModeFactor( Vector3( MODEL_SCALE / 3.0f, MODEL_SCALE / 3.0f, 0.0f ) ); + mContainers[1].SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( MODEL_SCALE / 3.0f, MODEL_SCALE / 3.0f, 0.0f ) ); mContainers[1].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.05, 0.03, 0.5 ) ); //Offset from top left mContainers[1].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); @@ -260,14 +260,14 @@ public: //Scale to width. mLightSource.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH ); mLightSource.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); - mLightSource.SetSizeModeFactor( Vector3( LIGHT_SCALE, 0.0f, 0.0f ) ); + mLightSource.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( LIGHT_SCALE, 0.0f, 0.0f ) ); } else { //Scale to height. mLightSource.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::HEIGHT ); mLightSource.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH ); - mLightSource.SetSizeModeFactor( Vector3( 0.0f, LIGHT_SCALE, 0.0f ) ); + mLightSource.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.0f, LIGHT_SCALE, 0.0f ) ); } //Set position relative to top left, as the light source property is also relative to the top left. @@ -433,7 +433,7 @@ public: Quaternion( Radian( mModels[mSelectedModelIndex].rotation.y ), Vector3::YAXIS); //Apply rotation. - mModels[mSelectedModelIndex].control.SetOrientation( rotation ); + mModels[mSelectedModelIndex].control.SetProperty( Actor::Property::ORIENTATION, rotation ); break; } diff --git a/examples/perf-scroll/perf-scroll.cpp b/examples/perf-scroll/perf-scroll.cpp index c961ae3..c0b8c00 100644 --- a/examples/perf-scroll/perf-scroll.cpp +++ b/examples/perf-scroll/perf-scroll.cpp @@ -371,7 +371,7 @@ public: { mActor[count].SetPosition( initialPosition ); mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); - mActor[count].SetOrientation( Quaternion( Radian( 0.0f ), Vector3::XAXIS ) ); + 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 ) ); } @@ -379,7 +379,7 @@ public: { mImageView[count].SetPosition( initialPosition ); mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); - mImageView[count].SetOrientation( Quaternion( Radian(0.0f),Vector3::XAXIS ) ); + 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/pivot/pivot-example.cpp b/examples/pivot/pivot-example.cpp index af2b8d3..332fc00 100644 --- a/examples/pivot/pivot-example.cpp +++ b/examples/pivot/pivot-example.cpp @@ -74,7 +74,7 @@ private: tableView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); tableView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); tableView.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - tableView.SetSizeModeFactor( TABLE_VIEW_SIZE_MODE_FACTOR ); + tableView.SetProperty( Actor::Property::SIZE_MODE_FACTOR, TABLE_VIEW_SIZE_MODE_FACTOR ); stage.Add( tableView ); // Create a tap detector - we are going to rotate an actor round our anchor-point (pivot) when one of our controls is tapped. diff --git a/examples/popup/popup-example.cpp b/examples/popup/popup-example.cpp index 7c5e468..9f6d308 100644 --- a/examples/popup/popup-example.cpp +++ b/examples/popup/popup-example.cpp @@ -210,12 +210,12 @@ public: if( policyDimension == Dimension::WIDTH ) { stageDimensionSize = stageSize.x; - sizeModeFactor = popup.GetSizeModeFactor().x; + sizeModeFactor = popup.GetProperty< Vector3 >( Actor::Property::SIZE_MODE_FACTOR ).x; } else { stageDimensionSize = stageSize.y; - sizeModeFactor = popup.GetSizeModeFactor().y; + sizeModeFactor = popup.GetProperty< Vector3 >( Actor::Property::SIZE_MODE_FACTOR ).y; } bool modifyPolicy = false; @@ -367,7 +367,7 @@ public: okButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); okButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); okButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS ); - okButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0 ) ); + okButton.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( -20.0f, -20.0f, 0.0 ) ); if( numberOfButtons > 1 ) { @@ -380,7 +380,7 @@ public: cancelButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); cancelButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); cancelButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS ); - cancelButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0 ) ); + cancelButton.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( -20.0f, -20.0f, 0.0 ) ); controlLayout.SetCellPadding( Size( 10.0f, 10.0f ) ); @@ -499,7 +499,7 @@ public: text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); text.SetProperty( TextLabel::Property::MULTI_LINE, true ); - text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); + text.SetProperty( Actor::Property::PADDING, Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); mPopup.SetContent( text ); SetupPopup( mPopup, button ); @@ -516,7 +516,7 @@ public: text.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); - text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); + text.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); mPopup.Add( text ); @@ -528,7 +528,7 @@ public: Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE2 ); image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); - image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); + image.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); mPopup.Add( image ); @@ -545,7 +545,7 @@ public: text.SetProperty( TextLabel::Property::MULTI_LINE, true ); text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); - text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); + text.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); mPopup.Add( text ); @@ -560,7 +560,7 @@ public: text.SetProperty( Dali::Actor::Property::NAME, "POPUP_CONTENT_TEXT" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); text.SetProperty( TextLabel::Property::MULTI_LINE, true ); - text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); + text.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) ); mPopup.Add( text ); @@ -581,7 +581,7 @@ public: text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); text.SetProperty( TextLabel::Property::MULTI_LINE, true ); - text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); + text.SetProperty( Actor::Property::PADDING, Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); mPopup.Add( text ); @@ -599,7 +599,7 @@ public: content.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); content.SetFitHeight( 0 ); content.SetFitHeight( 1 ); - content.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 0.0f ) ); + content.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 0.0f ) ); // Text { @@ -618,7 +618,7 @@ public: image.SetProperty( Dali::Actor::Property::NAME, "COMPLEX_IMAGE" ); image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); - image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) ); + image.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 0.0f, 0.0f, 0.0f ) ); content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) ); } @@ -629,7 +629,7 @@ public: root.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); root.SetFitHeight( 0 ); root.SetFitWidth( 0 ); - root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); + root.SetProperty( Actor::Property::PADDING, Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); checkBox.SetSize( 48, 48 ); @@ -638,7 +638,7 @@ public: Toolkit::TextLabel text = Toolkit::TextLabel::New( "Don't show again" ); text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); Actor textActor = text; - textActor.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 10.0f ) ); + textActor.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 0.0f, 0.0f, 10.0f ) ); root.AddChild( text, Toolkit::TableView::CellPosition( 0, 1 ) ); diff --git a/examples/pre-render-callback/pre-render-callback-example.cpp b/examples/pre-render-callback/pre-render-callback-example.cpp index e389c51..6ca853e 100644 --- a/examples/pre-render-callback/pre-render-callback-example.cpp +++ b/examples/pre-render-callback/pre-render-callback-example.cpp @@ -172,7 +172,7 @@ private: mSceneActor.SetPosition(0.0f, 0.0f, 130.0f); Quaternion p( Degree( -6.0f ), Vector3::XAXIS ); Quaternion q( Degree( 20.0f ), Vector3::YAXIS ); - mSceneActor.SetOrientation( p * q ); + mSceneActor.SetProperty( Actor::Property::ORIENTATION, p * q ); mStage.Add( mSceneActor ); } diff --git a/examples/primitive-shapes/primitive-shapes-example.cpp b/examples/primitive-shapes/primitive-shapes-example.cpp index f7e9350..4eb57dd 100644 --- a/examples/primitive-shapes/primitive-shapes-example.cpp +++ b/examples/primitive-shapes/primitive-shapes-example.cpp @@ -163,7 +163,7 @@ public: mShapeTitle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mShapeTitle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mShapeTitle.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); - mShapeTitle.SetPadding( Padding( elementPadding, elementPadding, elementPadding, elementPadding ) ); + mShapeTitle.SetProperty( Actor::Property::PADDING, Padding( elementPadding, elementPadding, elementPadding, elementPadding ) ); topAlignment.Add( mShapeTitle ); //Create a variable-length container that can wrap buttons around as more are added. @@ -172,7 +172,7 @@ public: buttonContainer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); buttonContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); buttonContainer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); - buttonContainer.SetPadding( Padding( containerPadding, containerPadding, containerPadding, containerPadding ) ); + buttonContainer.SetProperty( Actor::Property::PADDING, Padding( containerPadding, containerPadding, containerPadding, containerPadding ) ); buttonContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW ); buttonContainer.SetProperty( FlexContainer::Property::FLEX_WRAP, FlexContainer::WRAP ); topAlignment.Add( buttonContainer ); @@ -184,7 +184,7 @@ public: button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); - button.SetPadding( Padding( elementPadding, elementPadding, elementPadding, elementPadding ) ); + button.SetProperty( Actor::Property::PADDING, Padding( elementPadding, elementPadding, elementPadding, elementPadding ) ); button.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, BUTTON_IMAGE_URL[modelNumber] ); button.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, BUTTON_IMAGE_URL[modelNumber] ); button.RegisterProperty( "modelNumber", Property::Value( modelNumber ) ); @@ -235,7 +235,7 @@ public: mSliderTable.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mSliderTable.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); mSliderTable.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mSliderTable.SetSizeModeFactor( Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height. + mSliderTable.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height. mSliderTable.SetFitWidth( 0 ); //Label column should fit to natural size of label. mSliderTable.SetRelativeWidth( 1, 1.0f ); //Slider column should fill remaining space. mSliderTable.SetCellPadding( Vector2( 10.0f, 0.0f ) ); //Leave a gap between the slider and its label. @@ -308,7 +308,7 @@ public: //Create a container to house the visual-holding actor, to provide a constant hitbox. Actor container = Actor::New(); container.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - container.SetSizeModeFactor( Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height. + container.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height. container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); layer.Add( container ); @@ -650,7 +650,7 @@ public: Quaternion rotation = Quaternion( Radian( mRotation.x ), Vector3::XAXIS) * Quaternion( Radian( mRotation.y ), Vector3::YAXIS); - mModel.SetOrientation( rotation ); + mModel.SetProperty( Actor::Property::ORIENTATION, rotation ); break; } diff --git a/examples/reflection-demo/reflection-example.cpp b/examples/reflection-demo/reflection-example.cpp index 7c5fadc..4ffaf31 100644 --- a/examples/reflection-demo/reflection-example.cpp +++ b/examples/reflection-demo/reflection-example.cpp @@ -336,7 +336,7 @@ private: 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.SetOrientation( Quaternion(node.rotationQuaternion[3], + actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(node.rotationQuaternion[3], node.rotationQuaternion[0], node.rotationQuaternion[1], node.rotationQuaternion[2])); @@ -374,7 +374,7 @@ private: mCameraPos = Vector3(node.translation[0], node.translation[1], node.translation[2]); auto quatY = Quaternion( Degree(180.0f), Vector3( 0.0, 1.0, 0.0) ); auto cameraActor = CameraActor::DownCast( actor ); - cameraActor.SetOrientation( Quaternion(node.rotationQuaternion[3], + cameraActor.SetProperty( Actor::Property::ORIENTATION, Quaternion(node.rotationQuaternion[3], node.rotationQuaternion[0], node.rotationQuaternion[1], node.rotationQuaternion[2] ) @@ -634,7 +634,7 @@ private: auto sun = root.FindChildByName( "sun" ); sun.SetProperty( mSunTimeUniformIndex, mMockTime ); sun.SetProperty( mSunKFactorUniformIndex, mKFactor ); - sun.SetOrientation( Quaternion( Radian(Degree(rotationAngle)), Vector3(0.0, 1.0, 0.0))); + sun.SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian(Degree(rotationAngle)), Vector3(0.0, 1.0, 0.0))); return true; } diff --git a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp index 03962e4..cdf4426 100644 --- a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp +++ b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp @@ -223,9 +223,9 @@ public: const Quaternion yawRot(Radian(Degree(angle2 * -200.0f)), modelOrientation.Rotate( Vector3::YAXIS ) ); mModelOrientation = mModelOrientation * yawRot * pitchRot ; - mSkybox.GetActor().SetOrientation( mModelOrientation ); - actor1.SetOrientation( mModelOrientation ); - actor2.SetOrientation( mModelOrientation ); + mSkybox.GetActor().SetProperty( Actor::Property::ORIENTATION, mModelOrientation ); + actor1.SetProperty( Actor::Property::ORIENTATION, mModelOrientation ); + actor2.SetProperty( Actor::Property::ORIENTATION, mModelOrientation ); mPointZ = point; } diff --git a/examples/rendering-skybox/look-camera.cpp b/examples/rendering-skybox/look-camera.cpp index 8e74743..36240ad 100644 --- a/examples/rendering-skybox/look-camera.cpp +++ b/examples/rendering-skybox/look-camera.cpp @@ -112,7 +112,7 @@ bool LookCamera::OnTick() Quaternion rotY( Degree( mCameraYawPitch.y), Vector3( 0.0f, 1.0f, 0.0f ) ); rotation = ( rotY * rotX ); - mCameraActor.SetOrientation( rotation ); + mCameraActor.SetProperty( Actor::Property::ORIENTATION, rotation ); return true; } diff --git a/examples/shadows-and-lights/shadows-and-lights-example.cpp b/examples/shadows-and-lights/shadows-and-lights-example.cpp index 4e83d32..d69e958 100644 --- a/examples/shadows-and-lights/shadows-and-lights-example.cpp +++ b/examples/shadows-and-lights/shadows-and-lights-example.cpp @@ -190,7 +190,7 @@ public: mContents.SetBehavior(Layer::LAYER_3D); mContents.SetPosition(mTranslation); - mContents.SetOrientation( CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); + mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); mContents.SetScale(mPinchScale, mPinchScale, mPinchScale); mPanGestureDetector = PanGestureDetector::New(); @@ -232,7 +232,7 @@ public: mLightAnchor = Actor::New(); mLightAnchor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); mLightAnchor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); - mLightAnchor.SetOrientation( CalculateWorldRotation( mLightXRotation, mLightYRotation ) ); + mLightAnchor.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mLightXRotation, mLightYRotation ) ); // Work out a scaling factor as the initial light position was calculated for desktop // Need to scale light position as scene actor size is based on stage size (i.e. much bigger on device) @@ -347,7 +347,7 @@ public: mLightXRotation = Clamp(mLightXRotation, -Dali::ANGLE_45, Dali::ANGLE_45 ); mLightYRotation = mLightYRotation + gesture.displacement.x * LIGHT_PAN_Y_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis mLightYRotation = Clamp(mLightYRotation, -Dali::ANGLE_45, Dali::ANGLE_45 ); - mLightAnchor.SetOrientation( CalculateWorldRotation( mLightXRotation, mLightYRotation ) ); + mLightAnchor.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mLightXRotation, mLightYRotation ) ); break; } @@ -364,7 +364,7 @@ public: mSceneXRotation = Clamp( mSceneXRotation, -Dali::ANGLE_90, Dali::ANGLE_90 ); mSceneYRotation = mSceneYRotation + gesture.displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis mSceneYRotation = Clamp( mSceneYRotation, -Dali::ANGLE_90, Dali::ANGLE_90 ); - mContents.SetOrientation( CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); + mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); break; } @@ -372,7 +372,7 @@ public: { mObjectXRotation = mObjectXRotation - gesture.displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis mObjectYRotation = mObjectYRotation + gesture.displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis - mSceneActor.SetOrientation( CalculateWorldRotation( mObjectXRotation, mObjectYRotation ) ); + mSceneActor.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mObjectXRotation, mObjectYRotation ) ); break; } } @@ -458,7 +458,7 @@ public: // Align scene so that light anchor orientation is Z Axis mSceneXRotation = -mLightXRotation; mSceneYRotation = -mLightYRotation; - mContents.SetOrientation( CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); + mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); return true; } diff --git a/examples/simple-visuals-control/simple-visuals-application.cpp b/examples/simple-visuals-control/simple-visuals-application.cpp index 627dc11..749d5be 100644 --- a/examples/simple-visuals-control/simple-visuals-application.cpp +++ b/examples/simple-visuals-control/simple-visuals-application.cpp @@ -114,7 +114,7 @@ void SimpleVisualsApplication::Create( Application& application ) contentLayout.SetProperty( Dali::Actor::Property::NAME,"ContentLayout"); contentLayout.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); contentLayout.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::HEIGHT ); - contentLayout.SetSizeModeFactor( Vector3( 1.0f, .5f, 1.0f ) ); + contentLayout.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 1.0f, .5f, 1.0f ) ); contentLayout.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); contentLayout.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); contentLayout.SetCellPadding( Vector2( 50.0f, 15.0f ) ); diff --git a/examples/size-negotiation/size-negotiation-example.cpp b/examples/size-negotiation/size-negotiation-example.cpp index 98228d9..cfb43e7 100644 --- a/examples/size-negotiation/size-negotiation-example.cpp +++ b/examples/size-negotiation/size-negotiation-example.cpp @@ -198,7 +198,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::TableView table = Toolkit::TableView::New( 0, 0 ); table.SetProperty( Dali::Actor::Property::NAME, "TABLEVIEW_BUTTON_1CELL_ID" ); @@ -216,7 +216,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -245,7 +245,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::TableView table = Toolkit::TableView::New( 3, 3 ); table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -309,7 +309,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -360,7 +360,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -418,7 +418,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -484,7 +484,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -548,7 +548,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) ); mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); @@ -618,7 +618,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) ); mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); @@ -671,7 +671,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) ); mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT ); Toolkit::TableView table = Toolkit::TableView::New( 3, 1 ); @@ -721,7 +721,7 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE ); image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -734,11 +734,11 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE ); image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - image.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + image.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mPopup.Add( image ); @@ -748,11 +748,11 @@ public: { mPopup = CreatePopup(); mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) ); + mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) ); Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE ); image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - image.SetSizeScalePolicy( SizeScalePolicy::FILL_WITH_ASPECT_RATIO ); + image.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FILL_WITH_ASPECT_RATIO ); mPopup.Add( image ); diff --git a/examples/styling/styling-application.cpp b/examples/styling/styling-application.cpp index 224ccf5..b9d969d 100644 --- a/examples/styling/styling-application.cpp +++ b/examples/styling/styling-application.cpp @@ -209,7 +209,7 @@ void StylingApplication::Create( Application& application ) mIcc1 = ImageChannelControl::New( BIG_IMAGE_1 ); mIcc1.SetProperty( Dali::Actor::Property::NAME,"ICC1"); mIcc1.SetResizePolicy( ResizePolicy::FILL_TO_PARENT , Dimension::ALL_DIMENSIONS ); - mIcc1.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + mIcc1.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mIcc1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mIcc1.SetVisibility( true ); @@ -218,7 +218,7 @@ void StylingApplication::Create( Application& application ) mIcc2 = ImageChannelControl::New( BIG_IMAGE_2 ); mIcc2.SetProperty( Dali::Actor::Property::NAME,"ICC2"); mIcc2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT , Dimension::ALL_DIMENSIONS ); - mIcc2.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + mIcc2.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mIcc2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mIcc2.SetVisibility( false ); @@ -227,7 +227,7 @@ void StylingApplication::Create( Application& application ) mIcc3 = ImageChannelControl::New( BIG_IMAGE_3 ); mIcc3.SetProperty( Dali::Actor::Property::NAME,"ICC3"); mIcc3.SetResizePolicy( ResizePolicy::FILL_TO_PARENT , Dimension::ALL_DIMENSIONS ); - mIcc3.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); + mIcc3.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mIcc3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mIcc3.SetVisibility( false ); @@ -362,7 +362,7 @@ Actor StylingApplication::CreateContentPane() contentPane.SetProperty( Dali::Actor::Property::NAME,"ContentPane"); contentPane.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); contentPane.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - contentPane.SetPadding( Padding( BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH ) ); + contentPane.SetProperty( Actor::Property::PADDING, Padding( BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH ) ); return contentPane; } @@ -372,7 +372,7 @@ Actor StylingApplication::CreateResizableContentPane() contentPane.SetProperty( Dali::Actor::Property::NAME,"ContentPane"); contentPane.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); contentPane.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - contentPane.SetPadding( Padding( BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH ) ); + contentPane.SetProperty( Actor::Property::PADDING, Padding( BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH ) ); Toolkit::ImageView grabHandle = Toolkit::ImageView::New( RESIZE_HANDLE_IMAGE ); grabHandle.SetProperty( Dali::Actor::Property::NAME,"GrabHandle"); @@ -418,7 +418,7 @@ Popup StylingApplication::CreateResetPopup() text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); text.SetProperty( TextLabel::Property::MULTI_LINE, true ); - text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); + text.SetProperty( Actor::Property::PADDING, Padding( 10.0f, 10.0f, 20.0f, 0.0f ) ); popup.SetContent( text ); ImageView footer = ImageView::New( DEFAULT_CONTROL_AREA_IMAGE_PATH ); @@ -443,7 +443,7 @@ Popup StylingApplication::CreateResetPopup() okayButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); okayButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); okayButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS ); - okayButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0f ) ); + okayButton.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( -20.0f, -20.0f, 0.0f ) ); PushButton cancelButton = PushButton::New(); cancelButton.SetProperty( Dali::Actor::Property::NAME, POPUP_CONTROL_CANCEL_NAME ); @@ -453,7 +453,7 @@ Popup StylingApplication::CreateResetPopup() cancelButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); cancelButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); cancelButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS ); - cancelButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0f ) ); + cancelButton.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( -20.0f, -20.0f, 0.0f ) ); footerLayout.SetCellAlignment( TableView::CellPosition( 0, 0 ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER ); footerLayout.SetCellAlignment( TableView::CellPosition( 0, 1 ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER ); diff --git a/examples/text-editor/text-editor-example.cpp b/examples/text-editor/text-editor-example.cpp index caa89c9..97a14a9 100644 --- a/examples/text-editor/text-editor-example.cpp +++ b/examples/text-editor/text-editor-example.cpp @@ -119,7 +119,7 @@ public: mColorContainer = Control::New(); mColorContainer.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH ); mColorContainer.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::HEIGHT ); - mColorContainer.SetSizeModeFactor( Vector3( 0.0f, BUTTON_PERCENTAGE, 0.0f ) ); + mColorContainer.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.0f, BUTTON_PERCENTAGE, 0.0f ) ); // Place to right of parent. mColorContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT ); @@ -136,7 +136,7 @@ public: // Create a 'select color' button. mColorButtonOption = Toolkit::PushButton::New(); mColorButtonOption.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mColorButtonOption.SetSizeModeFactor( Vector3( 0.9f, 0.9f, 0.0f ) ); // Smaller than container to show border. + mColorButtonOption.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.9f, 0.9f, 0.0f ) ); // Smaller than container to show border. mColorButtonOption.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mColorButtonOption.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); @@ -154,7 +154,7 @@ public: mEditor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); mEditor.SetPosition( 0.f, toolBarHeight * 2.0f, 0.f ); mEditor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mEditor.SetSizeModeFactor( TEXT_EDITOR_RELATIVE_SIZE ); + mEditor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, TEXT_EDITOR_RELATIVE_SIZE ); mEditor.SetBackgroundColor( TEXT_EDITOR_BACKGROUND_COLOR ); @@ -190,7 +190,7 @@ public: { mButtonContainer = Toolkit::TableView::New( NUMBER_OF_COLORS, 1u ); mButtonContainer.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - mButtonContainer.SetSizeModeFactor( Vector3( 1.0f, NUMBER_OF_COLORS, 1.0f ) ); + mButtonContainer.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 1.0f, NUMBER_OF_COLORS, 1.0f ) ); // Place below color selection button. mButtonContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); @@ -203,7 +203,7 @@ public: { Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - button.SetSizeModeFactor( buttonPercentage ); + button.SetProperty( Actor::Property::SIZE_MODE_FACTOR, buttonPercentage ); std::ostringstream s; s << "color" << index; diff --git a/examples/text-fonts/text-fonts-example.cpp b/examples/text-fonts/text-fonts-example.cpp index 779af13..d815ede 100644 --- a/examples/text-fonts/text-fonts-example.cpp +++ b/examples/text-fonts/text-fonts-example.cpp @@ -94,7 +94,7 @@ public: container = Control::New(); container.SetSize( size ); container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - container.SetDrawMode( DrawMode::OVERLAY_2D ); + container.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); } void CreateFolderButton( PushButton& button ) diff --git a/examples/text-memory-profiling/text-memory-profiling-example.cpp b/examples/text-memory-profiling/text-memory-profiling-example.cpp index 53baad6..d06408a 100644 --- a/examples/text-memory-profiling/text-memory-profiling-example.cpp +++ b/examples/text-memory-profiling/text-memory-profiling-example.cpp @@ -282,7 +282,7 @@ public: mLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); mLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); mLayer.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::HEIGHT ); - mLayer.SetSizeModeFactor( Vector3( 0.0f, -DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight, 0.0f ) ); + mLayer.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.0f, -DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight, 0.0f ) ); mNavigationView.Push( mLayer ); diff --git a/examples/text-scrolling/text-scrolling-example.cpp b/examples/text-scrolling/text-scrolling-example.cpp index 3cb1ad4..b6651d8 100644 --- a/examples/text-scrolling/text-scrolling-example.cpp +++ b/examples/text-scrolling/text-scrolling-example.cpp @@ -96,7 +96,7 @@ public: label = TextLabel::New( text ); label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); label.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); - label.SetPadding( Padding( 1.0f, 1.0f, 1.0f, 1.0f ) ); + label.SetProperty( Actor::Property::PADDING, Padding( 1.0f, 1.0f, 1.0f, 1.0f ) ); label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); parent.Add( label ); @@ -160,7 +160,7 @@ public: // Create TextField TextField field = TextField::New(); field.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - field.SetPadding( Padding( 1.0f, 1.0f, 1.0f, 1.0f ) ); + field.SetProperty( Actor::Property::PADDING, Padding( 1.0f, 1.0f, 1.0f, 1.0f ) ); field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); 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 ) ); diff --git a/examples/tilt/tilt-example.cpp b/examples/tilt/tilt-example.cpp index 2ac324e..713af77 100644 --- a/examples/tilt/tilt-example.cpp +++ b/examples/tilt/tilt-example.cpp @@ -86,7 +86,7 @@ public: Quaternion pitchRot(Radian(Degree(sensor.GetPitch() * 90.0f)), Vector3(1, 0, 0)); Quaternion rollRot(Radian(Degree(sensor.GetRoll() * 90.0f)), Vector3(0, 1, 0)); - mTextLabel.SetOrientation(Quaternion()); + mTextLabel.SetProperty( Actor::Property::ORIENTATION, Quaternion() ); mTextLabel.RotateBy(rollRot); mTextLabel.RotateBy(pitchRot);; } diff --git a/examples/tooltip/tooltip-example.cpp b/examples/tooltip/tooltip-example.cpp index 54c5cc0..2d67b0c 100644 --- a/examples/tooltip/tooltip-example.cpp +++ b/examples/tooltip/tooltip-example.cpp @@ -154,7 +154,7 @@ private: { previousPosition += POSITION_INCREMENTER; control.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - control.SetSizeModeFactor( Vector3( 0.75, 0.1, 1.0 ) ); + 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 ); diff --git a/shared/dali-table-view.cpp b/shared/dali-table-view.cpp index 39cb890..fab87c3 100644 --- a/shared/dali-table-view.cpp +++ b/shared/dali-table-view.cpp @@ -241,7 +241,7 @@ void DaliTableView::Initialize( Application& application ) logo.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.1f, 0.5f ) ); logo.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); // The logo should appear on top of everything. - logo.SetDrawMode( DrawMode::OVERLAY_2D ); + logo.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); mRootActor.Add( logo ); // Show version in a popup when log is tapped @@ -255,10 +255,10 @@ void DaliTableView::Initialize( Application& application ) mScrollView.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 1.0f - 0.05f, 0.5f ) ); mScrollView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); mScrollView.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::HEIGHT ); - mScrollView.SetSizeModeFactor( Vector3( 0.0f, 0.6f, 0.0f ) ); + mScrollView.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.0f, 0.6f, 0.0f ) ); const float buttonsPageMargin = ( 1.0f - TABLE_RELATIVE_SIZE.x ) * 0.5f * stageSize.width; - mScrollView.SetPadding( Padding( buttonsPageMargin, buttonsPageMargin, 0.0f, 0.0f ) ); + mScrollView.SetProperty( Actor::Property::PADDING, Padding( buttonsPageMargin, buttonsPageMargin, 0.0f, 0.0f ) ); mScrollView.SetAxisAutoLock( true ); mScrollView.ScrollCompletedSignal().Connect( this, &DaliTableView::OnScrollComplete ); @@ -334,7 +334,7 @@ void DaliTableView::CreateFocusEffect() mFocusEffect[i].actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mFocusEffect[i].actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mFocusEffect[i].actor.SetProperty( Actor::Property::INHERIT_SCALE, false ); - mFocusEffect[i].actor.SetColorMode( USE_OWN_COLOR ); + mFocusEffect[i].actor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_COLOR ); KeyFrames alphaKeyFrames = KeyFrames::New(); alphaKeyFrames.Add( 0.0f, KEYBOARD_FOCUS_FINAL_ALPHA ); @@ -443,7 +443,7 @@ void DaliTableView::Populate() accessibilityManager.SetAccessibilityAttribute( tile, Dali::Toolkit::AccessibilityManager::ACCESSIBILITY_HINT, "You can run this example" ); - tile.SetPadding( Padding( margin, margin, margin, margin ) ); + tile.SetProperty( Actor::Property::PADDING, Padding( margin, margin, margin, margin ) ); page.AddChild( tile, TableView::CellPosition( row, column ) ); iter++; @@ -508,7 +508,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit focusableTile.SetStyleName( "DemoTile" ); focusableTile.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); focusableTile.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - focusableTile.SetSizeModeFactor( sizeMultiplier ); + focusableTile.SetProperty( Actor::Property::SIZE_MODE_FACTOR, sizeMultiplier ); focusableTile.SetProperty( Actor::Property::NAME, name ); // Set the tile to be keyboard focusable @@ -546,7 +546,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT ); // Pad around the label as its size is the same as the 9-patch border. It will overlap it without padding. - label.SetPadding( Padding( TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING ) ); + label.SetProperty( Actor::Property::PADDING, Padding( TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING ) ); focusableTile.Add( label ); // Connect to the touch events @@ -925,13 +925,13 @@ void DaliTableView::OnLogoTapped( Dali::Actor actor, const Dali::TapGesture& tap contentActor.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true ); contentActor.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, HorizontalAlignment::CENTER ); contentActor.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); - contentActor.SetPadding( Padding( 0.0f, 0.0f, 20.0f, 0.0f ) ); + contentActor.SetProperty( Actor::Property::PADDING, Padding( 0.0f, 0.0f, 20.0f, 0.0f ) ); mVersionPopup.SetTitle( titleActor ); mVersionPopup.SetContent( contentActor ); mVersionPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH ); - mVersionPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) ); + mVersionPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) ); mVersionPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT ); mVersionPopup.OutsideTouchedSignal().Connect( this, &DaliTableView::HideVersionPopup );