Revert "[3.0] Clipping API feature in Actor"
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / layer-impl.h
index 1ac9482..0e97f3a 100644 (file)
@@ -45,11 +45,19 @@ public:
 
   /**
    * @copydoc Dali::Layer::ZValue(const Vector3&, float)
-   */
-  static float ZValue(const Vector3& position, float sortModifier)
+   *
+   * This is the default sorting function.
+   * It is useful for 2D user interfaces, and it's used to sort translucent renderers.
+   *
+   * Only the Z signed distance from the camera is considererd, lower values will be drawn on top.
+   *
+   * @param[in] position     position of actor in view space
+   * @return depth
+   */
+  static float ZValue(const Vector3& position)
   {
     // inlined so we avoid a function call when sorting renderers
-    return position.z + sortModifier;
+    return position.z;
   }
 
   /**
@@ -60,13 +68,12 @@ public:
 
   /**
    * Create a new root layer; this is typically owned by the stage.
-   * @param[in] stage The owning stage.
    * @param[in] layerList The layer will be added to this ordered list.
    * @param[in] manager The update manager to install a root node with.
    * @param[in] systemLevel True if using the SystemOverlay API; see Integration::GetSystemOverlay() for more details.
    * @return A smart-pointer to the newly allocated Actor.
    */
-  static LayerPtr NewRoot( Stage& stage, LayerList& layerList, SceneGraph::UpdateManager& manager, bool systemLevel );
+  static LayerPtr NewRoot( LayerList& layerList, SceneGraph::UpdateManager& manager, bool systemLevel );
 
   /**
    * @copydoc Dali::Internal::Actor::OnInitialize
@@ -145,6 +152,19 @@ public:
   }
 
   /**
+   * @copydoc Dali::Layer::SetBehavior()
+   */
+  void SetBehavior( Dali::Layer::Behavior behavior );
+
+  /**
+   * @copydoc Dali::Layer::GetBehavior()
+   */
+  Dali::Layer::Behavior GetBehavior() const
+  {
+    return mBehavior;
+  }
+
+  /**
    * @copydoc Dali::Layer::SetDepthTestDisabled()
    */
   void SetDepthTestDisabled( bool disable );
@@ -189,56 +209,56 @@ public:
   /**
    * @copydoc Dali::Internal::Actor::DoAction()
    */
-  static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes);
+  static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes);
 
-public: // Default property extensions from ProxyObject
+public: // Default property extensions from Object
   /**
-   * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount()
+   * @copydoc Dali::Internal::Object::GetDefaultPropertyCount()
    */
   virtual unsigned int GetDefaultPropertyCount() const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices()
+   * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices()
    */
   virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName()
+   * @copydoc Dali::Internal::Object::GetDefaultPropertyName()
    */
   virtual const char* GetDefaultPropertyName(Property::Index index) const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex()
+   * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex()
    */
   virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable()
+   * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable()
    */
   virtual bool IsDefaultPropertyWritable(Property::Index index) const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable()
+   * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable()
    */
   virtual bool IsDefaultPropertyAnimatable(Property::Index index) const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput()
+   * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput()
    */
   virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType()
+   * @copydoc Dali::Internal::Object::GetDefaultPropertyType()
    */
   virtual Property::Type GetDefaultPropertyType(Property::Index index) const;
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty()
+   * @copydoc Dali::Internal::Object::SetDefaultProperty()
    */
   virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue);
 
   /**
-   * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty()
+   * @copydoc Dali::Internal::Object::GetDefaultProperty()
    */
   virtual Property::Value GetDefaultProperty( Property::Index index ) const;
 
@@ -281,6 +301,8 @@ private:
   ClippingBox mClippingBox;                     ///< The clipping box, in window coordinates
   Dali::Layer::SortFunctionType mSortFunction;  ///< Used to sort semi-transparent geometry
 
+  Dali::Layer::Behavior mBehavior;              ///< Behavior of the layer
+
   bool mIsClipping:1;                           ///< True when clipping is enabled
   bool mDepthTestDisabled:1;                    ///< Whether depth test is disabled.
   bool mTouchConsumed:1;                        ///< Whether we should consume touch (including gesture).