Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / shadow-view / shadow-view.h
index 63bb089..9667fa9 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_SHADOW_VIEW_H__
-#define __DALI_TOOLKIT_SHADOW_VIEW_H__
+#ifndef DALI_TOOLKIT_SHADOW_VIEW_H
+#define DALI_TOOLKIT_SHADOW_VIEW_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
-// EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
-
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal DALI_INTERNAL
 {
-
 /**
  * ShadowView implementation class
  */
 class ShadowView;
 
-} // namespace Internal
+} // namespace DALI_INTERNAL
 
 /**
  *
@@ -69,20 +63,20 @@ class ShadowView;
  *
  *  // create and add some visible actors to the ShadowView, all these child actors will therefore cast a shadow.
  *  Image image = Image::New(...);
- *  ImageActor imageActor = ImageActor::New(image);
- *  imageActor.SetParentOrigin( ParentOrigin::CENTER );
- *  imageActor.SetAnchorPoint( AnchorPoint::CENTER );
- *  shadowView.Add(imageActor);\n Add the renderable actor to the shadow view
- *
- *  ImageActor shadowPlane = ImageActor::New(); //This will be the shadow plane
- *  shadowPlane.SetParentOrigin( ParentOrigin::CENTER );
- *  shadowPlane.SetAnchorPoint( AnchorPoint::CENTER );
- *  shadowPlane.SetSize(700.0f, 700.0f);
- *  shadowPlane.SetPosition( Vector3(0.0f, 0.0f, -30.0f) ); //Just behind the image actor.
- *  shadowPlane.SetShadowPlane(ShadowPlane);
+ *  ImageView imageView = ImageView::New(image);
+ *  imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ *  imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ *  shadowView.Add(imageView);\n Add the renderable actor to the shadow view
+ *
+ *  ImageView shadowPlaneBg = ImageView::New(); //This will be the shadow plane
+ *  shadowPlaneBg.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ *  shadowPlaneBg.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ *  shadowPlaneBg.SetProperty( Actor::Property::SIZE, Vector2(700.0f, 700.0f) );
+ *  shadowPlaneBg.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, -30.0f) ); //Just behind the image view.
+ *  shadowView.SetShadowPlaneBackground(ShadowPlane);
  *
  *  Actor pointLight = Actor::New(); // This will be the light source
- *  pointLight.SetPosition(300.0f, 250.0f, 600.0f);
+ *  pointLight.SetProperty( Actor::Property::POSITION, Vector3(300.0f, 250.0f, 600.0f) );
  *  Stage::GetCurrent().Add(pointLight);
  *  shadowView.SetPointLight(pointLight);
  *
@@ -102,10 +96,9 @@ class ShadowView;
  *  shadowView.Deactivate();
  *  @endcode
  */
-class DALI_IMPORT_API ShadowView : public Control
+class DALI_TOOLKIT_API ShadowView : public Control
 {
 public:
-
   /**
    * Create an uninitialized ShadowView; this can be initialized with ShadowView::New()
    * Calling member functions with an uninitialized Dali::Object is not allowed.
@@ -135,7 +128,7 @@ public:
    * @param[in] handle Handle to an object
    * @return handle to a ShadowView or an uninitialized handle
    */
-  static ShadowView DownCast( BaseHandle handle );
+  static ShadowView DownCast(BaseHandle handle);
 
   /**
   * Create an initialized ShadowView. Add children and call SetShadowPlane to make shadows visible\n
@@ -154,39 +147,15 @@ public:
   static ShadowView New(float downsampleWidthScale, float downsampleHeightScale);
 
   /**
-   * Adds a child Actor to this Actor.
-   * NOTE! if the child already has a parent, it will be removed from old parent
-   * and reparented to this actor. This may change childs position, color, shader effect,
-   * scale etc as it now inherits them from this actor
-   * @pre This Actor (the parent) has been initialized.
-   * @pre The child actor has been initialized.
-   * @pre The child actor is not the same as the parent actor.
-   * @pre The actor is not the Root actor
-   * @param [in] child The child.
-   * @post The child will be referenced by its parent. This means that the child will be kept alive,
-   * even if the handle passed into this method is reset or destroyed.
-   */
-  void Add(Actor child);
-
-  /**
-   * Removes a child Actor from this Actor.
-   * If the actor was not a child of this actor, this is a no-op.
-   * @pre This Actor (the parent) has been initialized.
-   * @pre The child actor is not the same as the parent actor.
-   * @param [in] child The child.
-   */
-  void Remove(Actor child);
-
-  /**
-   * Set the Shadow Plane for the shadow effect.
+   * Set the Shadow Plane Background for the shadow effect.
    *
-   * @param[in] shadowPlane An actor representing the shadow
+   * @param[in] shadowPlaneBackground An actor representing the shadow
    * plane. The position of the actor represents the origin of the
    * plane, and the orientation of the actor represents the direction
    * of the plane normal. Make the plane sufficiently large if the shadows are
    * clipped.
    */
-  void SetShadowPlane(ImageActor shadowPlane);
+  void SetShadowPlaneBackground(Actor shadowPlaneBackground);
 
   /**
    * Set the Point Light for the shadow effect. This is usually NOT a renderable actor.
@@ -237,24 +206,22 @@ public:
    */
   Dali::Property::Index GetShadowColorPropertyIndex() const;
 
-
 public:
-
   /**
    * Creates a handle using the Toolkit::Internal implementation.
    * @param[in]  implementation  The UI Control implementation.
    */
-  DALI_INTERNAL ShadowView( Internal::ShadowView& implementation );
+  DALI_INTERNAL ShadowView(Internal::ShadowView& implementation);
 
   /**
    * Allows the creation of this UI Control from an Internal::CustomActor pointer.
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
-  explicit DALI_INTERNAL ShadowView( Dali::Internal::CustomActor* internal );
+  explicit DALI_INTERNAL ShadowView(Dali::Internal::CustomActor* internal);
 };
 
 } // namespace Toolkit
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_SHADOW_VIEW_H__
+#endif // DALI_TOOLKIT_SHADOW_VIEW_H