struct Degree;
class Quaternion;
class Layer;
-struct KeyEvent;
-class TouchData;
-struct TouchEvent;
-struct HoverEvent;
+class TouchEvent;
+class HoverEvent;
struct WheelEvent;
struct Vector2;
struct Vector3;
*
* <h3>Multi-Touch Events:</h3>
*
- * Touch or hover events are received via signals; see Actor::TouchedSignal() and Actor::HoveredSignal() for more details.
+ * Touch or hover events are received via signals; see Actor::TouchSignal() and Actor::HoveredSignal() for more details.
*
* <i>Hit Testing Rules Summary:</i>
*
* // Only hit-test the actor and its children if it is sensitive and visible
* IF ( ACTOR-IS-SENSITIVE &&
* ACTOR-IS-VISIBLE &&
- * ACTOR-IS-ON-STAGE )
+ * ACTOR-IS-ON-SCENE )
* {
* // Depth-first traversal within current layer, visiting parent first
*
* Signals
* | %Signal Name | Method |
* |-------------------|------------------------------|
- * | touched | @ref TouchedSignal() |
+ * | touch | @ref TouchSignal() |
* | hovered | @ref HoveredSignal() |
* | wheelEvent | @ref WheelEventSignal() |
- * | onStage | @ref OnStageSignal() |
- * | offStage | @ref OffStageSignal() |
+ * | onScene | @ref OnSceneSignal() |
+ * | offScene | @ref OffSceneSignal() |
* | onRelayout | @ref OnRelayoutSignal() |
*
* Actions
/**
* @brief The size of an actor.
- * @details Name "size", type Property::VECTOR3, animatable / constraint-input
+ * @details Name "size", type Property::VECTOR3 or Property::VECTOR2, animatable / constraint-input
+ * @note Only Property::VECTOR3 can be animated or used as constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE,
* @brief The width of an actor.
* @details Name "sizeWidth", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE_WIDTH,
* @brief The height of an actor.
* @details Name "sizeHeight", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE_HEIGHT,
* @brief The depth of an actor.
* @details Name "sizeDepth", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE_DEPTH,
/**
* @brief The position of an actor.
- * @details Name "position", type Property::VECTOR3, animatable / constraint-input
+ * @details Name "position", type Property::VECTOR3 or Property::VECTOR2, animatable / constraint-input
+ * @note Only Property::VECTOR3 can be animated or used as constraint-input
* @SINCE_1_0.0
- * @see Actor::SetPosition()
*/
POSITION,
* @brief The x position of an actor.
* @details Name "positionX", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetX()
*/
POSITION_X,
* @brief The y position of an actor.
* @details Name "positionY", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetY()
*/
POSITION_Y,
* @brief The z position of an actor.
* @details Name "positionZ", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetZ()
*/
POSITION_Z,
/**
* @brief The scale factor applied to an actor.
- * @details Name "scale", type Property::VECTOR3, animatable / constraint-input
+ * @details Name "scale", type Property::VECTOR3 or Property::FLOAT, animatable / constraint-input
+ * @note Only Property::VECTOR3 can be animated or used as constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE,
* @brief The x scale factor applied to an actor.
* @details Name "scaleX", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE_X,
* @brief The y scale factor applied to an actor.
* @details Name "scaleY", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE_Y,
* @brief The x scale factor applied to an actor.
* @details Name "scaleZ", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE_Z,
COLOR_MODE,
/**
- * @brief This property is removed because it's deprecated.
- */
- RESERVED_PROPERTY_01,
-
- /**
* @brief The draw mode of an actor.
* @details Name "drawMode", type DrawMode::Type (Property::INTEGER) or Property::STRING.
* @SINCE_1_0.0
* @SINCE_1_2.60
*/
INHERIT_LAYOUT_DIRECTION,
+
+ /**
+ * @brief The opacity of the actor.
+ * @details Name "opacity", type Property::FLOAT.
+ * @SINCE_1_9.17
+ */
+ OPACITY,
+
+ /**
+ * @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.
+ * @note The last known frame is used for the calculation. May not match a position value just set.
+ * @SINCE_1_9.17
+ */
+ SCREEN_POSITION,
+
+ /**
+ * @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.
+ * @SINCE_1_9.17
+ */
+ POSITION_USES_ANCHOR_POINT,
+
+ /**
+ * @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.
+ * @SINCE_1_9.17
+ */
+ CULLED,
+
+ /**
+ * @brief The unique ID of the actor.
+ * @details Name "id", type Property::INTEGER. Read-only
+ * @SINCE_1_9.17
+ */
+ ID,
+
+ /**
+ * @brief The current depth in the hierarchy of the actor.
+ * @details Name "hierarchyDepth", type Property::INTEGER. Read-only
+ * @note The value is -1 if actor is not in the hierarchy.
+ * @SINCE_1_9.17
+ */
+ HIERARCHY_DEPTH,
+
+ /**
+ * @brief The flag whether an actor is the root actor, which is owned by the Scene.
+ * @details Name "isRoot", type Property::BOOLEAN. Read-only
+ * @SINCE_1_9.17
+ */
+ IS_ROOT,
+
+ /**
+ * @brief The flag whether the actor is of class Dali::Layer.
+ * @details Name "isLayer", type Property::BOOLEAN. Read-only
+ * @SINCE_1_9.17
+ */
+ IS_LAYER,
+
+ /**
+ * @brief The flag whether the actor is connected to the Scene.
+ * When an actor is connected, it will be directly or indirectly parented to the root Actor.
+ * @details Name "connectedToScene", type Property::BOOLEAN. Read-only
+ * @note The root Actor is provided automatically by the Scene, and is always considered to be connected.
+ * @SINCE_1_9.17
+ */
+ CONNECTED_TO_SCENE,
+
+ /**
+ * @brief The flag whether the actor should be focusable by keyboard navigation.
+ * @details Name "keyboardFocusable", type Property::BOOLEAN.
+ * @SINCE_1_9.17
+ */
+ KEYBOARD_FOCUSABLE,
};
};
// Typedefs
- typedef Signal< bool (Actor, const TouchEvent&) > TouchSignalType; ///< @DEPRECATED_1_1.37 @brief Touch signal type @SINCE_1_0.0
- typedef Signal< bool (Actor, const TouchData&) > TouchDataSignalType; ///< Touch signal type @SINCE_1_1.37
+ typedef Signal< bool (Actor, const TouchEvent&) > TouchEventSignalType; ///< Touch signal type @SINCE_1_1.37
typedef Signal< bool (Actor, const HoverEvent&) > HoverSignalType; ///< Hover signal type @SINCE_1_0.0
typedef Signal< bool (Actor, const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type @SINCE_1_0.0
- typedef Signal< void (Actor) > OnStageSignalType; ///< Stage connection signal type @SINCE_1_0.0
- typedef Signal< void (Actor) > OffStageSignalType; ///< Stage disconnection signal type @SINCE_1_0.0
+ typedef Signal< void (Actor) > OnSceneSignalType; ///< Scene connection signal type @SINCE_1_9.24
+ typedef Signal< void (Actor) > OffSceneSignalType; ///< Scene disconnection signal type @SINCE_1_9.24
typedef Signal< void (Actor) > OnRelayoutSignalType; ///< Called when the actor is relaid out @SINCE_1_0.0
typedef Signal< void ( Actor, LayoutDirection::Type ) > LayoutDirectionChangedSignalType; ///< Layout direction changes signal type. @SINCE_1_2.60
Actor& operator=(const Actor& rhs);
/**
- * @brief Retrieves the unique ID of the actor.
- *
- * @SINCE_1_0.0
- * @return The ID
- * @pre The Actor has been initialized.
- */
- uint32_t GetId() const;
-
- // Containment
-
- /**
- * @brief Queries whether an actor is the root actor, which is owned by the Stage.
+ * @brief Move constructor.
*
- * @SINCE_1_0.0
- * @return True if the actor is the root actor
- * @pre The Actor has been initialized.
+ * @SINCE_1_9.22
+ * @param[in] rhs A reference to the actor to move
*/
- bool IsRoot() const;
+ Actor( Actor&& rhs );
/**
- * @brief Queries whether the actor is connected to the Stage.
+ * @brief Move assignment operator.
*
- * When an actor is connected, it will be directly or indirectly parented to the root Actor.
- * @SINCE_1_0.0
- * @return True if the actor is connected to the Stage
- * @pre The Actor has been initialized.
- * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
+ * @SINCE_1_9.22
+ * @param[in] rhs A reference to the actor to move
+ * @return A reference to this
*/
- bool OnStage() const;
+ Actor& operator=( Actor&& rhs );
- /**
- * @brief Queries whether the actor is of class Dali::Layer.
- *
- * @SINCE_1_0.0
- * @return True if the actor is a layer
- * @pre The Actor has been initialized.
- */
- bool IsLayer() const;
+ // Containment
/**
* @brief Gets the layer in which the actor is present.
// Positioning
/**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * The actors default depth is the minimum of width & height.
- * @SINCE_1_0.0
- * @param [in] width The new width
- * @param [in] height The new height
- * @pre The actor has been initialized.
- */
- void SetSize(float width, float height);
-
- /**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * @SINCE_1_0.0
- * @param[in] width The size of the actor along the x-axis
- * @param[in] height The size of the actor along the y-axis
- * @param[in] depth The size of the actor along the z-axis
- * @pre The actor has been initialized.
- */
- void SetSize(float width, float height, float depth);
-
- /**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * The actors default depth is the minimum of width & height.
- * @SINCE_1_0.0
- * @param[in] size The new size
- * @pre The actor has been initialized.
- */
- void SetSize(const Vector2& size);
-
- /**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * @SINCE_1_0.0
- * @param [in] size The new size
- * @pre The actor has been initialized.
- */
- void SetSize(const Vector3& size);
-
- /**
* @brief Retrieves the actor's size.
*
* @SINCE_1_0.0
Vector3 GetNaturalSize() const;
/**
- * @brief Sets the position of the Actor.
- *
- * By default, sets the position vector between the parent origin and anchor point (default).
- *
- * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
- *
- * @image html actor-position.png
- * The Actor's z position will be set to 0.0f.
- * @SINCE_1_0.0
- * @param[in] x The new x position
- * @param[in] y The new y position
- * @pre The Actor has been initialized.
- */
- void SetPosition(float x, float y);
-
- /**
- * @brief Sets the position of the Actor.
- *
- * By default, sets the position vector between the parent origin and anchor point (default).
- *
- * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
- *
- * @image html actor-position.png
- * @SINCE_1_0.0
- * @param[in] x The new x position
- * @param[in] y The new y position
- * @param[in] z The new z position
- * @pre The Actor has been initialized.
- */
- void SetPosition(float x, float y, float z);
-
- /**
- * @brief Sets the position of the Actor.
- *
- * By default, sets the position vector between the parent origin and anchor point (default).
- *
- * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
- *
- * @image html actor-position.png
- * @SINCE_1_0.0
- * @param[in] position The new position
- * @pre The Actor has been initialized.
- */
- void SetPosition(const Vector3& position);
-
- /**
- * @brief Sets the position of an actor along the X-axis.
- *
- * @SINCE_1_0.0
- * @param[in] x The new x position
- * @pre The Actor has been initialized.
- */
- void SetX(float x);
-
- /**
- * @brief Sets the position of an actor along the Y-axis.
- *
- * @SINCE_1_0.0
- * @param[in] y The new y position
- * @pre The Actor has been initialized.
- */
- void SetY(float y);
-
- /**
- * @brief Sets the position of an actor along the Z-axis.
- *
- * @SINCE_1_0.0
- * @param[in] z The new z position
- * @pre The Actor has been initialized.
- */
- void SetZ(float z);
-
- /**
* @brief Translates an actor relative to its existing position.
*
* @SINCE_1_0.0
void RotateBy(const Quaternion& relativeRotation);
/**
- * @brief Sets the scale factor applied to an actor.
- *
- * @SINCE_1_0.0
- * @param[in] scale The scale factor applied on all axes
- * @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentScale().
- */
- void SetScale(float scale);
-
- /**
- * @brief Sets the scale factor applied to an actor.
- *
- * @SINCE_1_0.0
- * @param[in] scaleX The scale factor applied along the x-axis
- * @param[in] scaleY The scale factor applied along the y-axis
- * @param[in] scaleZ The scale factor applied along the z-axis
- * @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentScale().
- */
- void SetScale(float scaleX, float scaleY, float scaleZ);
-
- /**
- * @brief Sets the scale factor applied to an actor.
- *
- * @SINCE_1_0.0
- * @param[in] scale A vector representing the scale factor for each axis
- * @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentScale().
- */
- void SetScale(const Vector3& scale);
-
- /**
* @brief Applies a relative scale to an actor.
*
* @SINCE_1_0.0
bool ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const;
/**
- * @brief Sets whether the actor should be focusable by keyboard navigation.
- *
- * The default is false.
- * @SINCE_1_0.0
- * @param[in] focusable - true if the actor should be focusable by keyboard navigation,
- * false otherwise
- * @pre The Actor has been initialized.
- */
- void SetKeyboardFocusable( bool focusable );
-
- /**
- * @brief Returns whether the actor is focusable by keyboard navigation.
- *
- * @SINCE_1_0.0
- * @return @c true if the actor is focusable by keyboard navigation, @c false if not
- * @pre The Actor has been initialized.
- */
- bool IsKeyboardFocusable() const;
-
- /**
* @brief Raise actor above the next sibling actor.
*
* @SINCE_1_2.60
*/
float GetRelayoutSize( Dimension::Type dimension ) const;
- /**
- * @brief Gets depth in the hierarchy for the actor.
- *
- * @SINCE_1_0.0
- * @return The current depth in the hierarchy of the actor, or @c -1 if actor is not in the hierarchy
- */
- int32_t GetHierarchyDepth();
-
public: // Renderer
/**
public: // Signals
/**
- * @DEPRECATED_1_1.37 Use TouchSignal() instead.
* @brief This signal is emitted when touch input is received.
*
* A callback of the following type may be connected:
* @code
- * bool YourCallbackName(Actor actor, const TouchEvent& event);
- * @endcode
- * The return value of True, indicates that the touch event should be consumed.
- * Otherwise the signal will be emitted on the next sensitive parent of the actor.
- * @SINCE_1_0.0
- * @return The signal to connect to
- * @pre The Actor has been initialized.
- */
- TouchSignalType& TouchedSignal() DALI_DEPRECATED_API;
-
- /**
- * @brief This signal is emitted when touch input is received.
- *
- * A callback of the following type may be connected:
- * @code
- * bool YourCallbackName( Actor actor, TouchData& touch );
+ * bool YourCallbackName( Actor actor, TouchEvent& touch );
* @endcode
* The return value of True, indicates that the touch event has been consumed.
* Otherwise the signal will be emitted on the next sensitive parent of the actor.
* @return The signal to connect to
* @pre The Actor has been initialized.
*/
- TouchDataSignalType& TouchSignal();
+ TouchEventSignalType& TouchSignal();
/**
* @brief This signal is emitted when hover input is received.
WheelEventSignalType& WheelEventSignal();
/**
- * @brief This signal is emitted after the actor has been connected to the stage.
+ * @brief This signal is emitted after the actor has been connected to the scene.
*
* When an actor is connected, it will be directly or indirectly parented to the root Actor.
- * @SINCE_1_0.0
+ * @SINCE_1_9.24
* @return The signal to connect to
- * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
+ * @note The root Actor is provided automatically by the Scene, and is always considered to be connected.
*
* @note When the parent of a set of actors is connected to the stage, then all of the children
* will received this callback.
*
* @endcode
*/
- OnStageSignalType& OnStageSignal();
+ OnSceneSignalType& OnSceneSignal();
/**
- * @brief This signal is emitted after the actor has been disconnected from the stage.
+ * @brief This signal is emitted after the actor has been disconnected from the scene.
*
* If an actor is disconnected it either has no parent, or is parented to a disconnected actor.
*
- * @SINCE_1_0.0
+ * @SINCE_1_9.24
* @return The signal to connect to
- * @note When the parent of a set of actors is disconnected to the stage, then all of the children
+ * @note When the parent of a set of actors is disconnected to the scene, then all of the children
* will received this callback, starting with the leaf actors.
* For the following actor tree, the callback order will be D, E, B, F, C, and finally A.
*
* @endcode
*
*/
- OffStageSignalType& OffStageSignal();
+ OffSceneSignalType& OffSceneSignal();
/**
* @brief This signal is emitted after the size has been set on the actor during relayout