#define DALI_ACTOR_DEVEL_H
/*
- * Copyright (c) 2018 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.
// INTERNAL INCLUDES
#include <dali/public-api/actors/actor.h>
+#include <dali/public-api/math/rect.h>
namespace Dali
{
CLIPPING_MODE = Dali::Actor::Property::CLIPPING_MODE,
LAYOUT_DIRECTION = Dali::Actor::Property::LAYOUT_DIRECTION,
INHERIT_LAYOUT_DIRECTION = Dali::Actor::Property::INHERIT_LAYOUT_DIRECTION,
+ OPACITY = Dali::Actor::Property::OPACITY,
+ SCREEN_POSITION = Dali::Actor::Property::SCREEN_POSITION,
+ POSITION_USES_ANCHOR_POINT = Dali::Actor::Property::POSITION_USES_ANCHOR_POINT,
+ CULLED = Dali::Actor::Property::CULLED,
+ ID = Dali::Actor::Property::ID,
+ HIERARCHY_DEPTH = Dali::Actor::Property::HIERARCHY_DEPTH,
+ IS_ROOT = Dali::Actor::Property::IS_ROOT,
+ IS_LAYER = Dali::Actor::Property::IS_LAYER,
+ CONNECTED_TO_SCENE = Dali::Actor::Property::CONNECTED_TO_SCENE,
+ KEYBOARD_FOCUSABLE = Dali::Actor::Property::KEYBOARD_FOCUSABLE,
/**
* @brief Sets the sibling order of the actor so depth position can be defined within the same parent.
* @note Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the
* sibling order. The values set by this Property will likely change.
*/
- SIBLING_ORDER = INHERIT_LAYOUT_DIRECTION + 1,
+ SIBLING_ORDER,
/**
- * @brief The opacity of the actor.
- * @details Name "opacity", type Property::FLOAT.
+ * @brief Sets the update size hint of the actor.
+ * @details Name "updateSizeHint", type Property::VECTOR2.
+ * @note Overrides the size used for the actor damaged area calculation. Affected by the actor model view matrix.
*/
- OPACITY = INHERIT_LAYOUT_DIRECTION + 2,
+ UPDATE_SIZE_HINT,
/**
- * @brief Returns the screen position of the Actor
- * @details Name "screenPosition", type Property::VECTOR2. Read-only
- * @note This assumes default camera and default render-task and the Z position is ZERO.
- */
- SCREEN_POSITION = INHERIT_LAYOUT_DIRECTION + 3,
-
- /**
- * @brief Determines whether the anchor point should be used to determine the position of the actor.
- * @details Name "positionUsesAnchorPoint", type Property::BOOLEAN.
- * @note This is true by default.
- * @note If false, then the top-left of the actor is used for the position.
- * @note Setting this to false will allow scaling or rotation around the anchor-point without affecting the actor's position.
- */
- POSITION_USES_ANCHOR_POINT = INHERIT_LAYOUT_DIRECTION + 4,
-
- /**
- * @brief Returns whether the actor is culled or not.
- * @details Name "culled", type Property::BOOLEAN. Read-only
- * @note True means that the actor is out of the view frustum.
- */
- CULLED = INHERIT_LAYOUT_DIRECTION + 5,
+ * @brief If this actor receives a touch-start event, then all following touch events are sent to this actor until a touch-end.
+ * @details Name "captureAllTouchAfterStart", type Property::BOOLEAN
+ * @note Default is false, i.e. actor under touch event will receive the touch even if touch started on this actor
+ */
+ CAPTURE_ALL_TOUCH_AFTER_START
};
} // namespace Property
} // namespace VisibilityChange
-typedef Signal< void ( Actor, bool, VisibilityChange::Type ) > VisibilityChangedSignalType; ///< Signal type of VisibilityChangedSignalType
+using VisibilityChangedSignalType = Signal<void( Actor, bool, VisibilityChange::Type )>; ///< Signal type of VisibilityChangedSignalType
/**
* @brief This signal is emitted when the visible property of this or a parent actor is changed.
*/
DALI_CORE_API VisibilityChangedSignalType& VisibilityChangedSignal( Actor actor );
+/**
+ * Calculates screen position and size.
+ *
+ * @return pair of two values, position of top-left corner on screen and size respectively.
+ */
+DALI_CORE_API Rect<> CalculateScreenExtents( Actor actor );
-typedef Signal< void (Actor) > ChildChangedSignalType; ///< Called when the actor has a child added or removed
+using ChildChangedSignalType = Signal<void( Actor )>; ///< Called when the actor has a child added or removed
/**
* @brief This signal is emitted when a child is added to this actor.
*/
DALI_CORE_API ChildChangedSignalType& ChildRemovedSignal( Actor actor );
-
-typedef Signal< void (Actor) > ChildOrderChangedSignalType; ///< Used when the actor's children have changed order
+using ChildOrderChangedSignalType = Signal<void( Actor )>; ///< Used when the actor's children have changed order
/**
* @brief This signal is emitted when an actor's children change their sibling order