#include <dali/public-api/math/vector3.h>
#include <dali/public-api/images/frame-buffer-image.h>
-namespace Dali DALI_IMPORT_API
+namespace Dali
{
namespace Internal DALI_INTERNAL
* actors in lower layers cannot obscure actors in higher layers.
*
* If depth test is disabled, there is no performance overhead from clearing the depth buffer.
+ *
+ * Actions
+ * | %Action Name | %Layer method called |
+ * |-----------------|----------------------|
+ * | raise | @ref Raise() |
+ * | lower | @ref Lower() |
+ * | raise-to-top | @ref RaiseToTop() |
+ * | lower-to-bottom | @ref LowerToBottom() |
*/
class DALI_IMPORT_API Layer : public Actor
{
public:
- // Default Properties additional to Actor
- static const Property::Index CLIPPING_ENABLE; ///< name "clipping-enable", type BOOLEAN
- static const Property::Index CLIPPING_BOX; ///< name "clipping-box", type RECTANGLE
-
- // Action Names
- static const char* const ACTION_RAISE; ///< name "raise"
- static const char* const ACTION_LOWER; ///< name "lower"
- static const char* const ACTION_RAISE_TO_TOP; ///< name "raise-to-top"
- static const char* const ACTION_LOWER_TO_BOTTOM; ///< name "lower-to-bottom"
+ /**
+ * @brief An enumeration of properties belonging to the Layer class.
+ * Properties additional to Actor.
+ */
+ struct Property
+ {
+ enum
+ {
+ CLIPPING_ENABLE = DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX, ///< name "clipping-enable", type bool
+ CLIPPING_BOX, ///< name "clipping-box", type Rect<int>
+ };
+ };
/**
* @brief The sort function type.
~Layer();
/**
- * @copydoc Dali::BaseHandle::operator=
+ * @brief Copy constructor
+ *
+ * @param [in] copy The actor to copy.
*/
- using BaseHandle::operator=;
+ Layer(const Layer& copy);
+
+ /**
+ * @brief Assignment operator
+ *
+ * @param [in] rhs The actor to copy.
+ */
+ Layer& operator=(const Layer& rhs);
/**
* @brief Query the depth of the layer
*
* Clipping is initially disabled; see also SetClippingBox().
* @param [in] enabled True if clipping is enabled.
+ *
+ * @note When clipping is enabled, the default clipping box is empty (0,0,0,0) which means everything is clipped.
*/
void SetClipping(bool enabled);
* @brief Sets the clipping box of a layer, in window coordinates.
*
* The contents of the layer will not be visible outside this box, when clipping is
- * enabled. The default clipping box is empty (0,0,0,0).
- * This has the limitation that it only applies to rectangles on a window.
+ * enabled. The default clipping box is empty (0,0,0,0) which means everything is clipped.
+ * You can only do rectangular clipping using this API in window coordinates.
* For other kinds of clipping, @see Dali::Actor::SetDrawMode().
- * @param [in] x The X-coordinate of the lower-left corner.
- * @param [in] y The Y-coordinate of the lower-left corner.
+ * @param [in] x The X-coordinate of the top-left corner of the box.
+ * @param [in] y The Y-coordinate of the top-left corner of the box.
* @param [in] width The width of the box.
* @param [in] height The height of the box.
*/
*/
bool IsTouchConsumed() const;
+ /**
+ * @brief This allows the user to specify whether this layer should consume hover.
+ *
+ * If set, any layers behind this layer will not be hit-test.
+ *
+ * @param[in] consume Whether the layer should consume hover.
+ */
+ void SetHoverConsumed( bool consume );
+
+ /**
+ * @brief Retrieves whether the layer consumes hover.
+ *
+ * @return true if consuming hover, false otherwise.
+ */
+ bool IsHoverConsumed() const;
+
public: // Not intended for application developers
/**