Added signal for layout direction
[platform/core/uifw/dali-core.git] / dali / devel-api / actors / actor-devel.h
index 4d4ad78..22085a9 100644 (file)
@@ -88,32 +88,77 @@ enum Type
   CLIPPING_MODE        = Dali::Actor::Property::CLIPPING_MODE,
 
   /**
-   * @brief name "siblingOrder", type INTEGER
-   *
-   * @details Sets the sibling order of the actor so depth position can be defined within the same parent.
-   *
+   * @brief Sets the sibling order of the actor so depth position can be defined within the same parent.
+   * @details Name "siblingOrder", type Property::INTEGER.
+   * @note The initial value is 0.
    * @note Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the
-   * sibling order. The values set by this Property will likey change.
+   * sibling order. The values set by this Property will likely change.
    */
-  SIBLING_ORDER        = CLIPPING_MODE + 1,
+  SIBLING_ORDER = CLIPPING_MODE + 1,
 
   /**
    * @brief The opacity of the actor.
    * @details Name "opacity", type Property::FLOAT.
-   * @SINCE_1_2.28
    */
-  OPACITY              = CLIPPING_MODE + 2,
+  OPACITY = CLIPPING_MODE + 2,
 
   /**
    * @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      = CLIPPING_MODE + 3,
+  SCREEN_POSITION = CLIPPING_MODE + 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 = CLIPPING_MODE + 4,
+
+  /**
+   * @brief The direction of layout.
+   * @details Name "layoutDirection", type Property::STRING.
+   */
+  LAYOUT_DIRECTION = CLIPPING_MODE + 5,
+
+  /**
+   * @brief Determines whether child actors inherit the layout direction from a parent.
+   * @details Name "layoutDirectionInheritance", type Property::BOOLEAN.
+   */
+  LAYOUT_DIRECTION_INHERITANCE = CLIPPING_MODE + 6
 };
 
 } // namespace Property
 
+namespace VisibilityChange
+{
+
+enum Type
+{
+  SELF,   ///< The visibility of the actor itself has changed.
+  PARENT  ///< The visibility of a parent has changed.
+};
+
+} // namespace VisibilityChange
+
+namespace LayoutDirection
+{
+
+enum Type
+{
+  LTR,   ///< Left to Right direction (Default).
+  RTL    ///< Right to Left direction.
+};
+
+} // namespace
+
+typedef Signal< void ( Actor, bool, VisibilityChange::Type ) > VisibilityChangedSignalType; ///< Signal type of VisibilityChangedSignalType
+
+typedef Signal< void ( Actor, LayoutDirection::Type ) > LayoutDirectionChangedSignalType; ///< Signal type of LayoutDirectionChangedSignal
+
 /**
  * @brief Raise actor above the next highest level of actor(s).
  *
@@ -183,6 +228,36 @@ DALI_IMPORT_API void RaiseAbove( Actor actor, Dali::Actor target );
  */
 DALI_IMPORT_API void LowerBelow( Actor actor, Dali::Actor target );
 
+/**
+ * @brief This signal is emitted when the visible property of this or a parent actor is changed.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Actor actor, bool visible, VisibilityChange::Type& type );
+ * @endcode
+ * actor: The actor, or child of actor, whose visibility has changed
+ * visible: Whether the actor is now visible or not
+ * type: Whether the actor's visible property has changed or a parent's.
+ * @return The signal to connect to
+ * @pre The Actor has been initialized.
+ * @note This signal is NOT emitted if the actor becomes transparent (or the reverse), it's only linked with Actor::Property::VISIBLE.
+ */
+DALI_IMPORT_API VisibilityChangedSignalType& VisibilityChangedSignal( Actor actor );
+
+/**
+ * @brief This signal is emitted when the layout direction property of this or a parent actor is changed.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName( Actor actor, LayoutDirection::Type type );
+ * @endcode
+ * actor: The actor, or child of actor, whose laytou direction has changed
+ * type: Whether the actor's layout direction property has changed or a parent's.
+ * @return The signal to connect to
+ * @pre The Actor has been initialized.
+ */
+DALI_IMPORT_API LayoutDirectionChangedSignalType& LayoutDirectionChangedSignal( Actor actor );
+
 } // namespace DevelActor
 
 } // namespace Dali