Updates after RenderableActor removal 16/43716/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 13 Jul 2015 11:42:29 +0000 (12:42 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 13 Jul 2015 13:00:46 +0000 (14:00 +0100)
Change-Id: Ic4c5a8369913f829c301ab18b007f358abf98774

automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h
dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp
dali-toolkit/internal/text/rendering/text-renderer.h
docs/content/programming-guide/properties.h
plugins/dali-script-v8/src/actors/actor-wrapper.cpp
plugins/dali-script-v8/src/actors/image-actor-api.cpp
plugins/dali-script-v8/src/actors/image-actor-api.h
plugins/dali-script-v8/src/constants/constants-wrapper.cpp

index 2d9d8cc..a4887ba 100644 (file)
@@ -232,7 +232,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // Default, HorizontalCenter, VerticalCenter - Ensure they do not change!
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -252,7 +252,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalLeft, VerticalCenter
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -272,7 +272,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalRight, VerticalCenter
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -292,7 +292,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalLeft, VerticalTop
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -312,7 +312,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalCenter, VerticalTop
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -332,7 +332,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalRight, VerticalTop
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -352,7 +352,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalLeft, VerticalBottom
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -372,7 +372,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalCenter, VerticalBottom
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -392,7 +392,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalRight, VerticalBottom
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -466,7 +466,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New();
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -479,7 +479,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -492,7 +492,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -505,7 +505,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -518,7 +518,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -531,7 +531,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -544,7 +544,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -557,7 +557,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -570,7 +570,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -588,7 +588,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ScaleToFill
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -621,7 +621,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ScaleToFitKeepAspect
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -654,7 +654,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ScaleToFillKeepAspect
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -687,7 +687,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ShrinkToFit
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -720,7 +720,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ShrinkToFitKeepAspect
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -905,7 +905,7 @@ int UtcDaliAlignmentChildAddAndRemove(void)
   application.Render();
   application.SendNotification();
 
-  Actor actor = RenderableActor::New();
+  Actor actor = Actor::New();
   alignment.Add(actor);
 
   DALI_TEST_EQUALS(alignment.GetChildCount(), 1u, TEST_LOCATION);
index 1180731..a886d9d 100644 (file)
@@ -354,7 +354,7 @@ int UtcDaliControlImplChildAddAndRemove(void)
 
     DALI_TEST_EQUALS( dummyImpl.childAddCalled, false, TEST_LOCATION );
     DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
-    Actor actor = RenderableActor::New();
+    Actor actor = Actor::New();
     dummy.Add(actor);
     DALI_TEST_EQUALS( dummyImpl.childAddCalled, true, TEST_LOCATION );
     DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION );
@@ -382,7 +382,7 @@ int UtcDaliControlImplChildAddAndRemove(void)
     application.SendNotification();
 
     DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
-    Actor actor = RenderableActor::New();
+    Actor actor = Actor::New();
     dummy.Add(actor);
     DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION );
 
index 461e564..5140144 100644 (file)
@@ -142,7 +142,7 @@ public:
   /**
    * @brief Enable different blending mode for rendering.
    *
-   * @param[in] enable If false, the default blending function for RenderableActor is used.
+   * @param[in] enable If false, the default blending function if ImageActor is used.
    */
   void SetBlendMode( bool enable );
 
index 104c334..24d5934 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
+#include <dali/devel-api/rendering/cull-face.h>
 
 namespace Dali
 {
@@ -86,14 +87,14 @@ ImageActor PageTurnLandscapeView::NewPageFromRenderBuffer( int pageIndex )
 void PageTurnLandscapeView::OnAddPage( ImageActor newPage, bool isLeftSide )
 {
   newPage.SetParentOrigin( ParentOrigin::CENTER );
-  newPage.SetCullFace( CullBack );
+  SetCullFace( newPage, CullBack );
 
   if( 0 < newPage.GetChildCount() )
   {
      ImageActor backImage = ImageActor::DownCast( newPage.GetChildAt( 0 ) );
      backImage.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
      backImage.SetSize( mPageSize );
-     backImage.SetCullFace( CullFront );
+     SetCullFace( backImage, CullFront );
      backImage.SetZ( 0.25f * STATIC_PAGE_INTERVAL_DISTANCE );
   }
   if( isLeftSide )
index 9b18917..4d761fe 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
+#include <dali/devel-api/rendering/cull-face.h>
 
 //INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/page-turn-view/page-turn-effect.h>
@@ -159,14 +160,23 @@ void PageTurnPortraitView::OnPossibleOutwardsFlick( const Vector2& panPosition,
                          AlphaFunction::EASE_OUT, TimePeriod(PAGE_TURN_OVER_ANIMATION_DURATION*0.75f) );
     animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunction::EASE_OUT );
     animation.Play();
-    ImageActor::DownCast(actor).SetCullFace( CullBack );
+
+    ImageActor imageActor = ImageActor::DownCast(actor);
+    if( imageActor )
+    {
+      SetCullFace( imageActor, CullBack );
+    }
     animation.FinishedSignal().Connect( this, &PageTurnPortraitView::OnTurnedOver );
   }
 }
 
 void PageTurnPortraitView::OnTurnedOver( Animation& animation )
 {
-  ImageActor::DownCast(mAnimationActorPair[animation]).SetCullFace( CullNone );
+  ImageActor imageActor = ImageActor::DownCast( mAnimationActorPair[ animation ] );
+  if( imageActor )
+  {
+    SetCullFace( imageActor, CullNone );
+  }
   TurnedOver( animation );
 }
 
index 17be8d8..eea4efa 100644 (file)
@@ -42,7 +42,7 @@ typedef IntrusivePtr<Renderer> RendererPtr;
  * @brief Abstract base class for Text renderers.
  *
  * This is reponsible for rendering the glyphs from a ViewInterface in the specified positions.
- * It is implemented by returning a RenderableActor intended as the child of a UI control.
+ * It is implemented by returning aActor intended as the child of a UI control.
  */
 class Renderer : public RefObject
 {
index bde81c2..d984cf1 100644 (file)
@@ -33,7 +33,7 @@ Within the public-api header file; image-actor.h:
 @code
 /**
  * @brief An enumeration of properties belonging to the ImageActor class.
- * Properties additional to RenderableActor.
+ * Properties additional to Actor.
  */
 struct Property
 {
index 149edb9..b242721 100644 (file)
@@ -257,8 +257,6 @@ const ActorFunctions ActorFunctionTable[]=
     // ignore GetNinePatchBorder use imageActor.border
     { "SetSortModifier",    ImageActorApi::SetSortModifier,   IMAGE_ACTOR_API  },
     { "GetSortModifier",    ImageActorApi::GetSortModifier,   IMAGE_ACTOR_API  },
-    { "SetCullFace",        ImageActorApi::SetCullFace,       IMAGE_ACTOR_API  },
-    { "GetCullFace",        ImageActorApi::GetCullFace,       IMAGE_ACTOR_API  },
     { "SetBlendMode",       ImageActorApi::SetBlendMode,      IMAGE_ACTOR_API  },
     { "GetBlendMode",       ImageActorApi::GetBlendMode,      IMAGE_ACTOR_API  },
     { "SetBlendFunc",       ImageActorApi::SetBlendFunc,      IMAGE_ACTOR_API  },
index 7394fa0..252838e 100644 (file)
@@ -192,59 +192,6 @@ void ImageActorApi::GetSortModifier( const v8::FunctionCallbackInfo<v8::Value>&
 }
 
 /**
- * Set the face-culling mode for this actor.
- * @for ImageActor
- * @method setCullFace
- * @param {Number} cullMode
- * @example
- *      // cull mode should be one of the following constants
- *      dali.CULL_FACE_DISABLE        // Face culling disabled
- *      dali.CULL_FRONT_FACE          // Cull front facing polygons
- *      dali.CULL_BACK_FACE           // Cull back facing polygons
- *      dali.CULL_FRONT_AND_BACK_FACE // Cull front and back facing polygons
- *      actor.SetCullFace( dali.CULL_FRONT_FACE );
- */
-void ImageActorApi::SetCullFace( const v8::FunctionCallbackInfo<v8::Value>& args )
-{
-  v8::Isolate* isolate = args.GetIsolate();
-  v8::HandleScope handleScope( isolate );
-  ImageActor imageActor = GetImageActor( isolate, args );
-
-  bool found( false );
-  int cullMode = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 );
-  if( !found )
-  {
-    DALI_SCRIPT_EXCEPTION( isolate, "bad parameter" );
-    return;
-  }
-
-  imageActor.SetCullFace(  static_cast<Dali::CullFaceMode>( cullMode ) );
-
-}
-
-/**
- * Retrieve the face-culling mode for this actor.
- * @for ImageActor
- * @method getCullFace
- * @return {Number} cullMode
- * @example
- *      // cull mode is one of the following
- *      dali.CULL_FACE_DISABLE        // Face culling disabled
- *      dali.CULL_FRONT_FACE          // Cull front facing polygons
- *      dali.CULL_BACK_FACE           // Cull back facing polygons
- *      dali.CULL_FRONT_AND_BACK_FACE // Cull front and back facing polygon
- */
-void ImageActorApi::GetCullFace( const v8::FunctionCallbackInfo<v8::Value>& args )
-{
-  v8::Isolate* isolate = args.GetIsolate();
-  v8::HandleScope handleScope( isolate );
-  ImageActor imageActor = GetImageActor( isolate, args );
-
-  args.GetReturnValue().Set( v8::Integer::New( isolate, imageActor.GetCullFace() ) );
-
-}
-
-/**
  * Sets the blending mode.
  *
  * If blending is disabled (BLENDING_OFF) fade in and fade out animations do not work.
index 2d00599..f5974e0 100644 (file)
@@ -44,8 +44,6 @@ namespace ImageActorApi
   void GetImage( const v8::FunctionCallbackInfo< v8::Value >& args );
   void SetSortModifier( const v8::FunctionCallbackInfo< v8::Value >& args );
   void GetSortModifier( const v8::FunctionCallbackInfo< v8::Value >& args );
-  void SetCullFace( const v8::FunctionCallbackInfo< v8::Value >& args );
-  void GetCullFace( const v8::FunctionCallbackInfo< v8::Value >& args );
   void SetBlendMode( const v8::FunctionCallbackInfo< v8::Value >& args );
   void GetBlendMode( const v8::FunctionCallbackInfo< v8::Value >& args );
   void SetBlendFunc( const v8::FunctionCallbackInfo< v8::Value >& args );
index c3b2043..77f8a7f 100644 (file)
@@ -204,12 +204,6 @@ const IntegerPair EnumTable[] =
     { "BLEND_EQUATION_SUBTRACT",                           BlendingEquation::SUBTRACT         },
     { "BLEND_EQUATION_REVERSE_SUBTRACT",                   BlendingEquation::REVERSE_SUBTRACT },
 
-
-    { "CULL_FACE_DISABLE",                                  CullNone  },
-    { "CULL_FRONT_FACE",                                    CullFront },
-    { "CULL_BACK_FACE",                                     CullBack  },
-    { "CULL_FRONT_AND_BACK_FACE",                           CullFrontAndBack },
-
     { "CAMERA_FREE_LOOK"             ,      Camera::FREE_LOOK                   },
     { "CAMERA_LOOK_AT_TARGET"        ,      Camera::LOOK_AT_TARGET              },
     { "CAMERA_PERSPECTIVE_PROJECTION" ,     Camera::PERSPECTIVE_PROJECTION      },