Merge "DALi Version 1.0.35" into tizen
[platform/core/uifw/dali-core.git] / dali / public-api / actors / actor.h
index 160dbd5..c5632d5 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <boost/function.hpp>
 #include <string>
 
 // INTERNAL INCLUDES
@@ -255,49 +254,49 @@ public:
     enum
     {
       PARENT_ORIGIN = DEFAULT_ACTOR_PROPERTY_START_INDEX, ///< name "parent-origin",         type Vector3
-      PARENT_ORIGIN_X,                                    ///< name "parent-origin-x",       type Float
-      PARENT_ORIGIN_Y,                                    ///< name "parent-origin-y",       type Float
-      PARENT_ORIGIN_Z,                                    ///< name "parent-origin-z",       type Float
+      PARENT_ORIGIN_X,                                    ///< name "parent-origin-x",       type float
+      PARENT_ORIGIN_Y,                                    ///< name "parent-origin-y",       type float
+      PARENT_ORIGIN_Z,                                    ///< name "parent-origin-z",       type float
       ANCHOR_POINT,                                       ///< name "anchor-point",          type Vector3
-      ANCHOR_POINT_X,                                     ///< name "anchor-point-x",        type Float
-      ANCHOR_POINT_Y,                                     ///< name "anchor-point-y",        type Float
-      ANCHOR_POINT_Z,                                     ///< name "anchor-point-z",        type Float
+      ANCHOR_POINT_X,                                     ///< name "anchor-point-x",        type float
+      ANCHOR_POINT_Y,                                     ///< name "anchor-point-y",        type float
+      ANCHOR_POINT_Z,                                     ///< name "anchor-point-z",        type float
       SIZE,                                               ///< name "size",                  type Vector3
-      SIZE_WIDTH,                                         ///< name "size-width",            type Float
-      SIZE_HEIGHT,                                        ///< name "size-height",           type Float
-      SIZE_DEPTH,                                         ///< name "size-depth",            type Float
+      SIZE_WIDTH,                                         ///< name "size-width",            type float
+      SIZE_HEIGHT,                                        ///< name "size-height",           type float
+      SIZE_DEPTH,                                         ///< name "size-depth",            type float
       POSITION,                                           ///< name "position",              type Vector3
-      POSITION_X,                                         ///< name "position-x",            type Float
-      POSITION_Y,                                         ///< name "position-y",            type Float
-      POSITION_Z,                                         ///< name "position-z",            type Float
-      WORLD_POSITION,                                     ///< name "world-position",        type Vector3  (read-only)
-      WORLD_POSITION_X,                                   ///< name "world-position-x",      type Float    (read-only)
-      WORLD_POSITION_Y,                                   ///< name "world-position-y",      type Float    (read-only)
-      WORLD_POSITION_Z,                                   ///< name "world-position-z",      type Float    (read-only)
-      ROTATION,                                           ///< name "rotation",              type Rotation
-      WORLD_ROTATION,                                     ///< name "world-rotation",        type Rotation (read-only)
+      POSITION_X,                                         ///< name "position-x",            type float
+      POSITION_Y,                                         ///< name "position-y",            type float
+      POSITION_Z,                                         ///< name "position-z",            type float
+      WORLD_POSITION,                                     ///< name "world-position",        type Vector3    (read-only)
+      WORLD_POSITION_X,                                   ///< name "world-position-x",      type float      (read-only)
+      WORLD_POSITION_Y,                                   ///< name "world-position-y",      type float      (read-only)
+      WORLD_POSITION_Z,                                   ///< name "world-position-z",      type float      (read-only)
+      ORIENTATION,                                        ///< name "orientation",           type Quaternion
+      WORLD_ORIENTATION,                                  ///< name "world-orientation",     type Quaternion (read-only)
       SCALE,                                              ///< name "scale",                 type Vector3
-      SCALE_X,                                            ///< name "scale-x",               type Float
-      SCALE_Y,                                            ///< name "scale-y",               type Float
-      SCALE_Z,                                            ///< name "scale-z",               type Float
-      WORLD_SCALE,                                        ///< name "world-scale",           type Vector3  (read-only)
-      VISIBLE,                                            ///< name "visible",               type Boolean
+      SCALE_X,                                            ///< name "scale-x",               type float
+      SCALE_Y,                                            ///< name "scale-y",               type float
+      SCALE_Z,                                            ///< name "scale-z",               type float
+      WORLD_SCALE,                                        ///< name "world-scale",           type Vector3    (read-only)
+      VISIBLE,                                            ///< name "visible",               type bool
       COLOR,                                              ///< name "color",                 type Vector4
-      COLOR_RED,                                          ///< name "color-red",             type Float
-      COLOR_GREEN,                                        ///< name "color-green",           type Float
-      COLOR_BLUE,                                         ///< name "color-blue",            type Float
-      COLOR_ALPHA,                                        ///< name "color-alpha",           type Float
-      WORLD_COLOR,                                        ///< name "world-color",           type Vector4  (read-only)
-      WORLD_MATRIX,                                       ///< name "world-matrix",          type Matrix   (read-only)
-      NAME,                                               ///< name "name",                  type String
-      SENSITIVE,                                          ///< name "sensitive",             type Boolean
-      LEAVE_REQUIRED,                                     ///< name "leave-required",        type Boolean
-      INHERIT_ROTATION,                                   ///< name "inherit-rotation",      type Boolean
-      INHERIT_SCALE,                                      ///< name "inherit-scale",         type Boolean
-      COLOR_MODE,                                         ///< name "color-mode",            type String
-      POSITION_INHERITANCE,                               ///< name "position-inheritance",  type String
-      DRAW_MODE,                                          ///< name "draw-mode",             type String
-      SIZE_MODE,                                          ///< name "size-mode",             type String
+      COLOR_RED,                                          ///< name "color-red",             type float
+      COLOR_GREEN,                                        ///< name "color-green",           type float
+      COLOR_BLUE,                                         ///< name "color-blue",            type float
+      COLOR_ALPHA,                                        ///< name "color-alpha",           type float
+      WORLD_COLOR,                                        ///< name "world-color",           type Vector4    (read-only)
+      WORLD_MATRIX,                                       ///< name "world-matrix",          type Matrix     (read-only)
+      NAME,                                               ///< name "name",                  type std::string
+      SENSITIVE,                                          ///< name "sensitive",             type bool
+      LEAVE_REQUIRED,                                     ///< name "leave-required",        type bool
+      INHERIT_ORIENTATION,                                ///< name "inherit-orientation",   type bool
+      INHERIT_SCALE,                                      ///< name "inherit-scale",         type bool
+      COLOR_MODE,                                         ///< name "color-mode",            type std::string
+      POSITION_INHERITANCE,                               ///< name "position-inheritance",  type std::string
+      DRAW_MODE,                                          ///< name "draw-mode",             type std::string
+      SIZE_MODE,                                          ///< name "size-mode",             type std::string
       SIZE_MODE_FACTOR,                                   ///< name "size-mode-factor",      type Vector3
     };
   };
@@ -502,18 +501,6 @@ public:
   Actor FindChildByName(const std::string& actorName);
 
   /**
-   * @brief Search through this actor's hierarchy for an actor with the given name or alias.
-   *
-   * Actors can customize this function to provide actors with preferred alias'
-   * For example 'previous' could return the last selected child.
-   * If no aliased actor is found then FindChildByName() is called.
-   * @pre The Actor has been initialized.
-   * @param[in] actorAlias the name of the actor to find
-   * @return A handle to the actor if found, or an empty handle if not.
-   */
-  Actor FindChildByAlias(const std::string& actorAlias);
-
-  /**
    * @brief Search through this actor's hierarchy for an actor with the given unique ID.
    *
    * The actor itself is also considered in the search
@@ -564,7 +551,7 @@ public:
    * bottom-right corner.  The default anchor point is
    * Dali::AnchorPoint::CENTER (0.5, 0.5, 0.5).
    * An actor position is the distance between its parent-origin, and this anchor-point.
-   * An actor's rotation is centered around its anchor-point.
+   * An actor's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.
    * @see Dali::AnchorPoint for predefined anchor point values
    * @pre The Actor has been initialized.
    * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentAnchorPoint().
@@ -716,12 +703,12 @@ public:
   void SetZ(float z);
 
   /**
-   * @brief Move an actor relative to its existing position.
+   * @brief Translate an actor relative to its existing position.
    *
    * @pre The actor has been initialized.
    * @param[in] distance The actor will move by this distance.
    */
-  void MoveBy(const Vector3& distance);
+  void TranslateBy(const Vector3& distance);
 
   /**
    * @brief Retrieve the position of the Actor.
@@ -761,42 +748,43 @@ public:
   PositionInheritanceMode GetPositionInheritanceMode() const;
 
   /**
-   * @brief Sets the rotation of the Actor.
+   * @brief Sets the orientation of the Actor.
    *
-   * An actor's rotation is centered around its anchor point.
+   * An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
    * @pre The Actor has been initialized.
-   * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentRotation().
-   * @param [in] angle The new rotation angle in degrees.
-   * @param [in] axis The new axis of rotation.
+   * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOrientation().
+   * @param [in] angle The new orientation angle in degrees.
+   * @param [in] axis The new axis of orientation.
    */
-  void SetRotation(const Degree& angle, const Vector3& axis);
+  void SetOrientation(const Degree& angle, const Vector3& axis);
 
   /**
-   * @brief Sets the rotation of the Actor.
+   * @brief Sets the orientation of the Actor.
    *
-   * An actor's rotation is centered around its anchor point.
+   * An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
    * @pre The Actor has been initialized.
-   * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentRotation().
-   * @param [in] angle The new rotation angle in radians.
-   * @param [in] axis The new axis of rotation.
+   * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOrientation().
+   * @param [in] angle The new orientation angle in radians.
+   * @param [in] axis The new axis of orientation.
    */
-  void SetRotation(const Radian& angle, const Vector3& axis);
+  void SetOrientation(const Radian& angle, const Vector3& axis);
 
   /**
-   * @brief Sets the rotation of the Actor.
+   * @brief Sets the orientation of the Actor.
    *
+   * An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
    * @pre The Actor has been initialized.
-   * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentRotation().
-   * @param [in] rotation The new rotation.
+   * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOrientation().
+   * @param [in] orientation The new orientation.
    */
-  void SetRotation(const Quaternion& rotation);
+  void SetOrientation(const Quaternion& orientation);
 
   /**
    * @brief Apply a relative rotation to an actor.
    *
    * @pre The actor has been initialized.
-   * @param[in] angle The angle to the rotation to combine with the existing rotation.
-   * @param[in] axis The axis of the rotation to combine with the existing rotation.
+   * @param[in] angle The angle to the rotation to combine with the existing orientation.
+   * @param[in] axis The axis of the rotation to combine with the existing orientation.
    */
   void RotateBy(const Degree& angle, const Vector3& axis);
 
@@ -804,8 +792,8 @@ public:
    * @brief Apply a relative rotation to an actor.
    *
    * @pre The actor has been initialized.
-   * @param[in] angle The angle to the rotation to combine with the existing rotation.
-   * @param[in] axis The axis of the rotation to combine with the existing rotation.
+   * @param[in] angle The angle to the rotation to combine with the existing orientation.
+   * @param[in] axis The axis of the rotation to combine with the existing orientation.
    */
   void RotateBy(const Radian& angle, const Vector3& axis);
 
@@ -813,28 +801,28 @@ public:
    * @brief Apply a relative rotation to an actor.
    *
    * @pre The actor has been initialized.
-   * @param[in] relativeRotation The rotation to combine with the existing rotation.
+   * @param[in] relativeRotation The rotation to combine with the existing orientation.
    */
   void RotateBy(const Quaternion& relativeRotation);
 
   /**
-   * @brief Retreive the Actor's rotation.
+   * @brief Retreive the Actor's orientation.
    *
    * @pre The Actor has been initialized.
-   * @note This property can be animated; the return value may not match the value written with SetRotation().
-   * @return The current rotation.
+   * @note This property can be animated; the return value may not match the value written with SetOrientation().
+   * @return The current orientation.
    */
-  Quaternion GetCurrentRotation() const;
+  Quaternion GetCurrentOrientation() const;
 
   /**
    * @brief Set whether a child actor inherits it's parent's orientation.
    *
    * Default is to inherit.
-   * Switching this off means that using SetRotation() sets the actor's world orientation.
+   * Switching this off means that using SetOrientation() sets the actor's world orientation.
    * @pre The Actor has been initialized.
    * @param[in] inherit - true if the actor should inherit orientation, false otherwise.
    */
-  void SetInheritRotation(bool inherit);
+  void SetInheritOrientation(bool inherit);
 
   /**
    * @brief Returns whether the actor inherit's it's parent's orientation.
@@ -842,16 +830,16 @@ public:
    * @pre The Actor has been initialized.
    * @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
    */
-  bool IsRotationInherited() const;
+  bool IsOrientationInherited() const;
 
   /**
-   * @brief Retrieve the world-rotation of the Actor.
+   * @brief Retrieve the world-orientation of the Actor.
    *
-   * @note The actor will not have a world-rotation, unless it has previously been added to the stage.
+   * @note The actor will not have a world-orientation, unless it has previously been added to the stage.
    * @pre The Actor has been initialized.
-   * @return The Actor's current rotation in the world.
+   * @return The Actor's current orientation in the world.
    */
-  Quaternion GetCurrentWorldRotation() const;
+  Quaternion GetCurrentWorldOrientation() const;
 
   /**
    * @brief Set the scale factor applied to an actor.
@@ -1023,14 +1011,6 @@ public:
   void SetOpacity(float opacity);
 
   /**
-   * @brief Apply a relative opacity change to an actor.
-   *
-   * @pre The actor has been initialized.
-   * @param[in] relativeOpacity The opacity to combine with the actors existing opacity.
-   */
-  void OpacityBy(float relativeOpacity);
-
-  /**
    * @brief Retrieve the actor's opacity.
    *
    * @pre The actor has been initialized.
@@ -1050,14 +1030,6 @@ public:
   void SetColor(const Vector4& color);
 
   /**
-   * @brief Apply a relative color change to an actor.
-   *
-   * @pre The actor has been initialized.
-   * @param[in] relativeColor The color to combine with the actors existing color.
-   */
-  void ColorBy(const Vector4& relativeColor);
-
-  /**
    * @brief Retrieve the actor's color.
    *
    * Actor's own color is not clamped.
@@ -1199,7 +1171,7 @@ public:
   /**
    * @brief Sets whether the actor should be focusable by keyboard navigation.
    *
-   * The default is true.
+   * The default is false.
    * @pre The Actor has been initialized.
    * @param[in] focusable - true if the actor should be focusable by keyboard navigation,
    * false otherwise.