Changes following deprecation of position inheritance modes 05/59805/8
authorFerran Sole <ferran.sole@samsung.com>
Thu, 18 Feb 2016 17:24:23 +0000 (17:24 +0000)
committerFerran Sole <ferran.sole@samsung.com>
Wed, 2 Mar 2016 10:48:40 +0000 (10:48 +0000)
Change-Id: I2f47ceaa3766a56e4af7cb0627815642b0754a51

13 files changed:
automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp
dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp
dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp
dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/text/clipping/text-clipper.cpp
dali-toolkit/internal/text/decorator/text-decorator.cpp

index 24cccdc..cb6eefa 100644 (file)
@@ -464,7 +464,7 @@ int UtcDaliPageTurnPortraitViewSignals(void)
   TestPageFactory factory(application);
   Vector2 size = Stage::GetCurrent().GetSize();
   PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
   TestPageFactory factory(application);
   Vector2 size = Stage::GetCurrent().GetSize();
   PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
-  portraitView.SetPositionInheritanceMode( USE_PARENT_POSITION );
+  portraitView.SetParentOrigin( ParentOrigin::CENTER );
   Stage::GetCurrent().Add( portraitView );
 
   // Render and notify
   Stage::GetCurrent().Add( portraitView );
 
   // Render and notify
@@ -584,7 +584,6 @@ int UtcDaliPageTurnLanscapeViewSignals(void)
   tet_infoline(" UtcDaliPageTurnLanscapeViewSignals ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
   tet_infoline(" UtcDaliPageTurnLanscapeViewSignals ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-
   /***
    * -----------------
    * |               |
   /***
    * -----------------
    * |               |
@@ -602,7 +601,7 @@ int UtcDaliPageTurnLanscapeViewSignals(void)
   TestPageFactory factory(application);
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   PageTurnView landscapeView = PageTurnLandscapeView::New( factory, Vector2(stageSize.x*0.5f, stageSize.x*0.8f) );
   TestPageFactory factory(application);
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   PageTurnView landscapeView = PageTurnLandscapeView::New( factory, Vector2(stageSize.x*0.5f, stageSize.x*0.8f) );
-  landscapeView.SetPositionInheritanceMode( USE_PARENT_POSITION );;
+  landscapeView.SetParentOrigin( ParentOrigin::CENTER );
   Stage::GetCurrent().Add( landscapeView );
 
   // Render and notify
   Stage::GetCurrent().Add( landscapeView );
 
   // Render and notify
index 15ed920..7a5ad48 100644 (file)
@@ -666,7 +666,7 @@ void AccessibilityManager::CreateDefaultFocusIndicatorActor()
   Image borderImage = ResourceImage::New(FOCUS_BORDER_IMAGE_PATH);
 
   ImageActor focusIndicator = ImageActor::New(borderImage);
   Image borderImage = ResourceImage::New(FOCUS_BORDER_IMAGE_PATH);
 
   ImageActor focusIndicator = ImageActor::New(borderImage);
-  focusIndicator.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+  focusIndicator.SetParentOrigin( ParentOrigin::CENTER );
   focusIndicator.SetStyle( ImageActor::STYLE_NINE_PATCH );
   focusIndicator.SetNinePatchBorder(FOCUS_BORDER_IMAGE_BORDER);
   focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
   focusIndicator.SetStyle( ImageActor::STYLE_NINE_PATCH );
   focusIndicator.SetNinePatchBorder(FOCUS_BORDER_IMAGE_BORDER);
   focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
index aa6b964..750d6fe 100644 (file)
@@ -239,14 +239,14 @@ void BloomView::Remove(Actor child)
 void BloomView::OnInitialize()
 {
   // root actor to parent all user added actors, needed to allow us to set that subtree as exclusive for our child render task
 void BloomView::OnInitialize()
 {
   // root actor to parent all user added actors, needed to allow us to set that subtree as exclusive for our child render task
-  mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
 
   //////////////////////////////////////////////////////
   // Create actors
 
   // Create an ImageActor for rendering from the scene texture to the bloom texture
   mBloomExtractImageActor = Toolkit::ImageView::New();
 
   //////////////////////////////////////////////////////
   // Create actors
 
   // Create an ImageActor for rendering from the scene texture to the bloom texture
   mBloomExtractImageActor = Toolkit::ImageView::New();
-  mBloomExtractImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  mBloomExtractImageActor.SetParentOrigin( ParentOrigin::CENTER );
 
   // Create shader used for extracting the bright parts of an image
   Property::Map customShader;
 
   // Create shader used for extracting the bright parts of an image
   Property::Map customShader;
@@ -258,7 +258,7 @@ void BloomView::OnInitialize()
 
   // Create an ImageActor for compositing the result (scene and bloom textures) to output
   mCompositeImageActor = Toolkit::ImageView::New();
 
   // Create an ImageActor for compositing the result (scene and bloom textures) to output
   mCompositeImageActor = Toolkit::ImageView::New();
-  mCompositeImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  mCompositeImageActor.SetParentOrigin( ParentOrigin::CENTER );
 
   // Create shader used to composite bloom and original image to output render target
   customShader[ "fragmentShader" ] = COMPOSITE_FRAGMENT_SOURCE;
 
   // Create shader used to composite bloom and original image to output render target
   customShader[ "fragmentShader" ] = COMPOSITE_FRAGMENT_SOURCE;
@@ -267,15 +267,14 @@ void BloomView::OnInitialize()
 
   // Create an ImageActor for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
   mTargetImageActor = Toolkit::ImageView::New();
 
   // Create an ImageActor for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
   mTargetImageActor = Toolkit::ImageView::New();
-  mTargetImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
-
+  mTargetImageActor.SetParentOrigin( ParentOrigin::CENTER );
 
   // Create the Gaussian Blur object + render tasks
   // Note that we use mBloomExtractTarget as the source image and also re-use this as the gaussian blur final render target. This saves the gaussian blur code from creating it
   // render targets etc internally, so we make better use of resources
   // Note, this also internally creates the render tasks used by the Gaussian blur, this must occur after the bloom extraction and before the compositing
   mGaussianBlurView = Dali::Toolkit::GaussianBlurView::New(mBlurNumSamples, mBlurBellCurveWidth, mPixelFormat, mDownsampleWidthScale, mDownsampleHeightScale, true);
 
   // Create the Gaussian Blur object + render tasks
   // Note that we use mBloomExtractTarget as the source image and also re-use this as the gaussian blur final render target. This saves the gaussian blur code from creating it
   // render targets etc internally, so we make better use of resources
   // Note, this also internally creates the render tasks used by the Gaussian blur, this must occur after the bloom extraction and before the compositing
   mGaussianBlurView = Dali::Toolkit::GaussianBlurView::New(mBlurNumSamples, mBlurBellCurveWidth, mPixelFormat, mDownsampleWidthScale, mDownsampleHeightScale, true);
-  mGaussianBlurView.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  mGaussianBlurView.SetParentOrigin( ParentOrigin::CENTER );
 
 
   //////////////////////////////////////////////////////
 
 
   //////////////////////////////////////////////////////
index 0999db5..8d1a3b3 100644 (file)
@@ -299,7 +299,7 @@ void EffectsView::OnInitialize()
   mCameraForChildren.SetParentOrigin(ParentOrigin::CENTER);
 
   mActorForChildren = ImageActor::New();
   mCameraForChildren.SetParentOrigin(ParentOrigin::CENTER);
 
   mActorForChildren = ImageActor::New();
-  mActorForChildren.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  mActorForChildren.SetParentOrigin( ParentOrigin::CENTER );
   mActorForChildren.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
 
   mActorPostFilter = ImageActor::New();
   mActorForChildren.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
 
   mActorPostFilter = ImageActor::New();
index e758f1f..796e7bb 100644 (file)
@@ -255,7 +255,7 @@ void Magnifier::SetFrameVisibility(bool visible)
     Actor self(Self());
 
     mFrame = Actor::New( );
     Actor self(Self());
 
     mFrame = Actor::New( );
-    mFrame.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
+    mFrame.SetInheritPosition(false);
     mFrame.SetInheritScale(true);
     mFrame.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
     Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
     mFrame.SetInheritScale(true);
     mFrame.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
     Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
index ed47428..df0db93 100644 (file)
@@ -79,7 +79,7 @@ void PageTurnLandscapeView::OnAddPage( ImageActor newPage, bool isLeftSide )
   if( 0 < newPage.GetChildCount() )
   {
      ImageActor backImage = ImageActor::DownCast( newPage.GetChildAt( 0 ) );
   if( 0 < newPage.GetChildCount() )
   {
      ImageActor backImage = ImageActor::DownCast( newPage.GetChildAt( 0 ) );
-     backImage.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+     backImage.SetParentOrigin( ParentOrigin::CENTER );
      backImage.SetSize( mPageSize );
      SetCullFace( backImage, CullFront );
      backImage.SetZ( 0.25f * STATIC_PAGE_INTERVAL_DISTANCE );
      backImage.SetSize( mPageSize );
      SetCullFace( backImage, CullFront );
      backImage.SetZ( 0.25f * STATIC_PAGE_INTERVAL_DISTANCE );
index f40290c..6db3956 100644 (file)
@@ -341,7 +341,7 @@ void PageTurnView::SetupShadowView()
   mShadowView.SetShadowColor(DEFAULT_SHADOW_COLOR);
 
   mShadowPlaneBackground = Actor::New();
   mShadowView.SetShadowColor(DEFAULT_SHADOW_COLOR);
 
   mShadowPlaneBackground = Actor::New();
-  mShadowPlaneBackground.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+  mShadowPlaneBackground.SetParentOrigin( ParentOrigin::CENTER );
   mShadowPlaneBackground.SetSize( mControlSize );
   Self().Add( mShadowPlaneBackground );
   mShadowView.SetShadowPlaneBackground( mShadowPlaneBackground );
   mShadowPlaneBackground.SetSize( mControlSize );
   Self().Add( mShadowPlaneBackground );
   mShadowView.SetShadowPlaneBackground( mShadowPlaneBackground );
index 4862b1d..bbdb9a1 100755 (executable)
@@ -891,7 +891,7 @@ Toolkit::Control Popup::CreateBacking()
   backing.SetName( "popupBacking" );
 
   // Must always be positioned top-left of stage, regardless of parent.
   backing.SetName( "popupBacking" );
 
   // Must always be positioned top-left of stage, regardless of parent.
-  backing.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
+  backing.SetInheritPosition(false);
   backing.SetAnchorPoint( AnchorPoint::TOP_LEFT );
 
   // Always the full size of the stage.
   backing.SetAnchorPoint( AnchorPoint::TOP_LEFT );
 
   // Always the full size of the stage.
index c1d614f..950c819 100644 (file)
@@ -241,7 +241,7 @@ void ShadowView::Deactivate()
 void ShadowView::OnInitialize()
 {
   // root actor to parent all user added actors. Used as source actor for shadow render task.
 void ShadowView::OnInitialize()
 {
   // root actor to parent all user added actors. Used as source actor for shadow render task.
-  mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
   mChildrenRoot.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   mChildrenRoot.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
   Vector2 stageSize = Stage::GetCurrent().GetSize();
@@ -288,7 +288,7 @@ void ShadowView::OnInitialize()
   mBlurRootActor.SetName( "BLUR_ROOT_ACTOR" );
 
   // Turn off inheritance to ensure filter renders properly
   mBlurRootActor.SetName( "BLUR_ROOT_ACTOR" );
 
   // Turn off inheritance to ensure filter renders properly
-  mBlurRootActor.SetPositionInheritanceMode(USE_PARENT_POSITION);
+  mBlurRootActor.SetParentOrigin( ParentOrigin::CENTER );
   mBlurRootActor.SetInheritOrientation(false);
   mBlurRootActor.SetInheritScale(false);
   mBlurRootActor.SetColorMode(USE_OWN_COLOR);
   mBlurRootActor.SetInheritOrientation(false);
   mBlurRootActor.SetInheritScale(false);
   mBlurRootActor.SetColorMode(USE_OWN_COLOR);
index 1dc683b..5ce8db6 100644 (file)
@@ -303,7 +303,7 @@ void ToolBar::OnInitialize()
   mLayout = Toolkit::TableView::New( 1, 1 );
   mLayout.SetName( "TOOLBAR_LAYOUT" );
   mLayout.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
   mLayout = Toolkit::TableView::New( 1, 1 );
   mLayout.SetName( "TOOLBAR_LAYOUT" );
   mLayout.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-  mLayout.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  mLayout.SetParentOrigin( ParentOrigin::CENTER );
 
   Self().Add( mLayout );
 
 
   Self().Add( mLayout );
 
index 96d9554..7466ed2 100644 (file)
@@ -459,7 +459,7 @@ void KeyboardFocusManager::CreateDefaultFocusIndicatorActor()
 {
   // Create a focus indicator actor shared by all the keyboard focusable actors
   Toolkit::ImageView focusIndicator = Toolkit::ImageView::New(FOCUS_BORDER_IMAGE_PATH);
 {
   // Create a focus indicator actor shared by all the keyboard focusable actors
   Toolkit::ImageView focusIndicator = Toolkit::ImageView::New(FOCUS_BORDER_IMAGE_PATH);
-  focusIndicator.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+  focusIndicator.SetParentOrigin( ParentOrigin::CENTER );
 
   // Apply size constraint to the focus indicator
   focusIndicator.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
   // Apply size constraint to the focus indicator
   focusIndicator.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
index 031956a..826ee4f 100644 (file)
@@ -98,7 +98,7 @@ void Clipper::Initialize( const Vector2& size )
   // Create a root actor and an image actor for offscreen rendering.
   mOffscreenRootActor = Layer::New();
   mOffscreenRootActor.SetColorMode( USE_OWN_COLOR );
   // Create a root actor and an image actor for offscreen rendering.
   mOffscreenRootActor = Layer::New();
   mOffscreenRootActor.SetColorMode( USE_OWN_COLOR );
-  mOffscreenRootActor.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
+  mOffscreenRootActor.SetInheritPosition( false );
   mOffscreenRootActor.SetInheritScale( false );
   mOffscreenRootActor.SetDepthTestDisabled( true );
   mOffscreenRootActor.SetSize( offscreenSize );
   mOffscreenRootActor.SetInheritScale( false );
   mOffscreenRootActor.SetDepthTestDisabled( true );
   mOffscreenRootActor.SetSize( offscreenSize );
index e06ea8b..7f032d7 100644 (file)
@@ -637,7 +637,6 @@ struct Decorator::Impl : public ConnectionTracker
 
       mActiveLayer.SetParentOrigin( ParentOrigin::CENTER );
       mActiveLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
       mActiveLayer.SetParentOrigin( ParentOrigin::CENTER );
       mActiveLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mActiveLayer.SetPositionInheritanceMode( USE_PARENT_POSITION );
 
       // Add the active layer telling the controller it doesn't need clipping.
       mController.AddDecoration( mActiveLayer, false );
 
       // Add the active layer telling the controller it doesn't need clipping.
       mController.AddDecoration( mActiveLayer, false );