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 2d9d8cca081d9afa0a320c8eb07be375d790ce45..a4887badd7ac7cb6240c0a5d514bd6ada8ea741b 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 11807319185863dad4d1c033186819e20ffd91e3..a886d9ddd360ef85cd01b801476f06446efe7e05 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 461e564b04864ad1a74e294d32ef19fa1b10109f..5140144461a4a4dcdf3fc0e1e1ec817f25786e77 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 104c334b77ed1b157e2321ea8d3b7d7bcc53348e..24d5934ac5dd43e268f0acdacc24a7d4b7d0b4dc 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 9b1891752c19d25bcefadbc0e80ceec0ef31786b..4d761fe71de74beedea5beba41f4d497af6d9235 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 17be8d83d0ef13117a6aa89a979dcd3c6b945db0..eea4efa1df441440e1a1e697972ab1a09caa2376 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 bde81c2f97ea7199635587ab6ccb1738008e5288..d984cf1f7413188dfb2ecd2bb9457db317d1c426 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 149edb91451c372dd4ac997dcded78764162e089..b242721cfd13b5de309957d6a32067b16397ccd0 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 7394fa030782553b5b029bef533149a5dfdff595..252838ea99597c2b3f813b6f7b5112f39d5f07ce 100644 (file)
@@ -191,59 +191,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.
  *
index 2d0059980cb93d21b9371ca1caa62e1abc04c75b..f5974e08b1d99056dcbb4677cec33dd0ecf12765 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 c3b20434323aa173326dec48ba5ab2ac08254242..77f8a7f8f20b0c399bfb09f0a7a69278f0cad69b 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      },