struct Vector3;
struct Vector4;
-typedef Rect<float> Padding; ///< Padding definition
+typedef Rect<float> Padding; ///< Padding definition @since_tizen 2.4
/**
* @brief Actor is the primary object with which Dali applications interact.
* touch signals are also emitted from the touch-down actor with an "Interrupted" state.
* - If the consumed actor on hover-start is not the same as the consumed actor on hover-finished, then
* hover signals are also emitted from the hover-started actor with an "Interrupted" state.
+ *
* <h3>Key Events:</h3>
*
* Key events are received by an actor once set to grab key events, only one actor can be set as focused.
*
* @nosubgrouping
*
- * Signals
- * | %Signal Name | Method |
- * |-------------------|------------------------------|
- * | touched | @ref TouchedSignal() |
- * | hovered | @ref HoveredSignal() |
- * | wheel-event | @ref WheelEventSignal() |
- * | on-stage | @ref OnStageSignal() |
- * | off-stage | @ref OffStageSignal() |
*
- * Actions
- * | %Action Name | %Actor method called |
- * |-------------------|------------------------------|
- * | show | %SetVisible( true ) |
- * | hide | %SetVisible( false ) |
* @since_tizen 2.4
*/
{
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
- 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
- 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
- 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)
- 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 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 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_FACTOR, ///< name "size-mode-factor", type Vector3
- WIDTH_RESIZE_POLICY, ///< name "width-resize-policy", type String
- HEIGHT_RESIZE_POLICY, ///< name "height-resize-policy", type String
- SIZE_SCALE_POLICY, ///< name "size-scale-policy", type String
- WIDTH_FOR_HEIGHT, ///< name "width-for-height", type Boolean
- HEIGHT_FOR_WIDTH, ///< name "height-for-width", type Boolean
- PADDING, ///< name "padding", type Vector4
- MINIMUM_SIZE, ///< name "minimum-size", type Vector2
- MAXIMUM_SIZE, ///< name "maximum-size", type Vector2
+ PARENT_ORIGIN = DEFAULT_ACTOR_PROPERTY_START_INDEX, ///< type Vector3 @since_tizen 2.4
+ PARENT_ORIGIN_X, ///< type float @since_tizen 2.4
+ PARENT_ORIGIN_Y, ///< type float @since_tizen 2.4
+ PARENT_ORIGIN_Z, ///< type float @since_tizen 2.4
+ ANCHOR_POINT, ///< type Vector3 @since_tizen 2.4
+ ANCHOR_POINT_X, ///< type float @since_tizen 2.4
+ ANCHOR_POINT_Y, ///< type float @since_tizen 2.4
+ ANCHOR_POINT_Z, ///< type float @since_tizen 2.4
+ SIZE, ///< type Vector3 @since_tizen 2.4
+ SIZE_WIDTH, ///< type float @since_tizen 2.4
+ SIZE_HEIGHT, ///< type float @since_tizen 2.4
+ SIZE_DEPTH, ///< type float @since_tizen 2.4
+ POSITION, ///< type Vector3 @since_tizen 2.4
+ POSITION_X, ///< type float @since_tizen 2.4
+ POSITION_Y, ///< type float @since_tizen 2.4
+ POSITION_Z, ///< type float @since_tizen 2.4
+ WORLD_POSITION, ///< type Vector3 (read-only) @since_tizen 2.4
+ WORLD_POSITION_X, ///< type float (read-only) @since_tizen 2.4
+ WORLD_POSITION_Y, ///< type float (read-only) @since_tizen 2.4
+ WORLD_POSITION_Z, ///< type float (read-only) @since_tizen 2.4
+ ORIENTATION, ///< type Quaternion @since_tizen 2.4
+ WORLD_ORIENTATION, ///< type Quaternion (read-only) @since_tizen 2.4
+ SCALE, ///< type Vector3 @since_tizen 2.4
+ SCALE_X, ///< type float @since_tizen 2.4
+ SCALE_Y, ///< type float @since_tizen 2.4
+ SCALE_Z, ///< type float @since_tizen 2.4
+ WORLD_SCALE, ///< type Vector3 (read-only) @since_tizen 2.4
+ VISIBLE, ///< type bool @since_tizen 2.4
+ COLOR, ///< type Vector4 @since_tizen 2.4
+ COLOR_RED, ///< type float @since_tizen 2.4
+ COLOR_GREEN, ///< type float @since_tizen 2.4
+ COLOR_BLUE, ///< type float @since_tizen 2.4
+ COLOR_ALPHA, ///< type float @since_tizen 2.4
+ WORLD_COLOR, ///< type Vector4 (read-only) @since_tizen 2.4
+ WORLD_MATRIX, ///< type Matrix (read-only) @since_tizen 2.4
+ NAME, ///< type std::string @since_tizen 2.4
+ SENSITIVE, ///< type bool @since_tizen 2.4
+ LEAVE_REQUIRED, ///< type bool @since_tizen 2.4
+ INHERIT_ORIENTATION, ///< type bool @since_tizen 2.4
+ INHERIT_SCALE, ///< type bool @since_tizen 2.4
+ COLOR_MODE, ///< type std::string @since_tizen 2.4
+ POSITION_INHERITANCE, ///< type std::string @since_tizen 2.4
+ DRAW_MODE, ///< type std::string @since_tizen 2.4
+ SIZE_MODE_FACTOR, ///< type Vector3 @since_tizen 2.4
+ WIDTH_RESIZE_POLICY, ///< type String @since_tizen 2.4
+ HEIGHT_RESIZE_POLICY, ///< type String @since_tizen 2.4
+ SIZE_SCALE_POLICY, ///< type String @since_tizen 2.4
+ WIDTH_FOR_HEIGHT, ///< type Boolean @since_tizen 2.4
+ HEIGHT_FOR_WIDTH, ///< type Boolean @since_tizen 2.4
+ PADDING, ///< type Vector4 @since_tizen 2.4
+ MINIMUM_SIZE, ///< type Vector2 @since_tizen 2.4
+ MAXIMUM_SIZE, ///< type Vector2 @since_tizen 2.4
};
};
// Typedefs
- typedef Signal< bool (Actor, const TouchEvent&)> TouchSignalType; ///< Touch signal type
- typedef Signal< bool (Actor, const HoverEvent&)> HoverSignalType; ///< Hover signal type
- typedef Signal< bool (Actor, const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type
- typedef Signal< void (Actor) > OnStageSignalType; ///< Stage connection signal type
- typedef Signal< void (Actor) > OffStageSignalType; ///< Stage disconnection signal type
- typedef Signal< void (Actor) > OnRelayoutSignalType; ///< Called when the actor is relaid out
+ typedef Signal< bool (Actor, const TouchEvent&)> TouchSignalType; ///< Touch signal type @since_tizen 2.4
+ typedef Signal< bool (Actor, const HoverEvent&)> HoverSignalType; ///< Hover signal type @since_tizen 2.4
+ typedef Signal< bool (Actor, const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type @since_tizen 2.4
+ typedef Signal< void (Actor) > OnStageSignalType; ///< Stage connection signal type @since_tizen 2.4
+ typedef Signal< void (Actor) > OffStageSignalType; ///< Stage disconnection signal type @since_tizen 2.4
+ typedef Signal< void (Actor) > OnRelayoutSignalType; ///< Called when the actor is relaid out @since_tizen 2.4
// Creation
/**
* @brief Create an uninitialized Actor; this can be initialized with Actor::New().
*
- * Calling member functions with an uninitialized Dali::Object is not allowed.
+ * Calling member functions with an uninitialized Actor handle is not allowed.
* @since_tizen 2.4
*/
Actor();
static Actor New();
/**
- * @brief Downcast an Object handle to Actor handle.
+ * @brief Downcast a handle to Actor handle.
*
* If handle points to a Actor object the downcast produces valid
* handle. If not the returned handle is left uninitialized.
*
* @since_tizen 2.4
* @param [in] rhs The actor to copy.
+ * @return A reference to this
*/
Actor& operator=(const Actor& rhs);
/**
* @brief Adds a child Actor to this Actor.
*
- * NOTE! if the child already has a parent, it will be removed from old parent
- * and reparented to this actor. This may change childs position, color,
- * scale etc as it now inherits them from this actor
* @since_tizen 2.4
* @param [in] child The child.
* @pre This Actor (the parent) has been initialized.
* @pre The actor is not the Root actor
* @post The child will be referenced by its parent. This means that the child will be kept alive,
* even if the handle passed into this method is reset or destroyed.
+ * @note if the child already has a parent, it will be removed from old parent
+ * and reparented to this actor. This may change childs position, color,
+ * scale etc as it now inherits them from this actor
*/
void Add(Actor child);
*
* If the actor has no parent, this method does nothing.
* @since_tizen 2.4
- * @pre The (child) actor has been initialized.
+ * @pre The (child) Actor has been initialized.
*/
void Unparent();
*
* @since_tizen 2.4
* @return A handle to the actor's parent. If the actor has no parent, this handle will be invalid.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
*/
Actor GetParent() const;
* @since_tizen 2.4
* @param [in] width The new width.
* @param [in] height The new height.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
* @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentSize().
*/
void SetSize(float width, float height);
* @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.
+ * @pre The Actor has been initialized.
* @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentSize().
*/
void SetSize(float width, float height, float depth);
* The actors default depth is the minimum of width & height.
* @since_tizen 2.4
* @param [in] size The new size.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
* @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentSize().
*/
void SetSize(const Vector2& size);
* This does not interfere with the actors scale factor.
* @since_tizen 2.4
* @param [in] size The new size.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
* @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentSize().
*/
void SetSize(const Vector3& size);
*
* @since_tizen 2.4
* @return The actor's current size.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
* @note This return is the value that was set using SetSize or the target size of an animation
*/
Vector3 GetTargetSize() const;
*
* @since_tizen 2.4
* @return The actor's current size.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
* @note This property can be animated; the return value may not match the value written with SetSize().
*/
Vector3 GetCurrentSize() const;
*
* @since_tizen 2.4
* @param[in] distance The actor will move by this distance.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
*/
void TranslateBy(const Vector3& distance);
* @brief Returns the actors position inheritance mode.
*
* @since_tizen 2.4
- * @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
+ * @return True if the actor inherit's it's parent orientation, false if it uses world orientation.
* @pre The Actor has been initialized.
*/
PositionInheritanceMode GetPositionInheritanceMode() const;
* @since_tizen 2.4
* @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.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
*/
void RotateBy( const Degree& angle, const Vector3& axis )
{
* @since_tizen 2.4
* @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.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
*/
void RotateBy(const Radian& angle, const Vector3& axis);
*
* @since_tizen 2.4
* @param[in] relativeRotation The rotation to combine with the existing orientation.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
*/
void RotateBy(const Quaternion& relativeRotation);
* @brief Returns whether the actor inherit's it's parent's orientation.
*
* @since_tizen 2.4
- * @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
+ * @return True if the actor inherit's it's parent orientation, false if it uses world orientation.
* @pre The Actor has been initialized.
*/
bool IsOrientationInherited() const;
*
* @since_tizen 2.4
* @param[in] relativeScale The scale to combine with the actors existing scale.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
*/
void ScaleBy(const Vector3& relativeScale);
* @brief Returns whether the actor inherit's it's parent's scale.
*
* @since_tizen 2.4
- * @return true if the actor inherit's it's parent scale, false if it uses world scale.
+ * @return True if the actor inherit's it's parent scale, false if it uses world scale.
* @pre The Actor has been initialized.
*/
bool IsScaleInherited() const;
*
* @since_tizen 2.4
* @param [in] visible The new visibility flag.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
* @note This is an asynchronous method; the value written may not match a value subsequently read with IsVisible().
* @note If an actor's visibility flag is set to false, then the actor and its children will not be rendered.
* This is regardless of the individual visibility values of the children i.e. an actor will only be
*
* @since_tizen 2.4
* @return The visibility flag.
- * @pre The actor has been initialized.
+ * @pre The Actor has been initialized.
* @note This property can be animated; the return value may not match the value written with SetVisible().
* @note If an actor is not visible, then the actor and its children will not be rendered.
* This is regardless of the individual visibility values of the children i.e. an actor will only be
*
* If DrawMode::OVERLAY_2D is used, the actor and its children will be drawn as a 2D overlay.
* Overlay actors are drawn in a separate pass, after all non-overlay actors within the Layer.
- * For overlay actors, the drawing order is with respect to depth-index property of Renderers,
+ * For overlay actors, the drawing order is with respect to depth-index property of Actors,
* and depth-testing will not be used.
*
* If DrawMode::STENCIL is used, the actor and its children will be used to stencil-test other actors
* @note If an actor's sensitivity is set to false, then it's children will not be hittable either.
* This is regardless of the individual sensitivity values of the children i.e. an actor will only be
* hittable if all of its parents have sensitivity set to true.
- * @see @see SignalTouch() and SignalHover().
+ * @see @see TouchedSignal() and HoveredSignal().
*/
void SetSensitive(bool sensitive);
* @brief Query whether an actor emits touch or hover event signals.
*
* @since_tizen 2.4
- * @return true, if emission of touch or hover event signals is enabled, false otherwise.
+ * @return True, if emission of touch or hover event signals is enabled, false otherwise.
* @pre The Actor has been initialized.
* @note If an actor is not sensitive, then it's children will not be hittable either.
* This is regardless of the individual sensitivity values of the children i.e. an actor will only be
* @param[in] required Should be set to true if a Leave event is required
* @pre The Actor has been initialized.
* @note By default, this is set to false as most actors do not require this.
- * @note Need to connect to the SignalTouch or SignalHover to actually receive this event.
+ * @note Need to connect to the TouchedSignal() or HoveredSignal() to actually receive this event.
*
*/
void SetLeaveRequired(bool required);
* the boundary of the actor.
*
* @since_tizen 2.4
- * @return true if a Leave event is required, false otherwise.
+ * @return True if a Leave event is required, false otherwise.
* @pre The Actor has been initialized.
*/
bool GetLeaveRequired() const;
* @brief Returns whether the actor is focusable by keyboard navigation.
*
* @since_tizen 2.4
- * @return true if the actor is focusable by keyboard navigation, false if not.
+ * @return True if the actor is focusable by keyboard navigation, false if not.
* @pre The Actor has been initialized.
*/
bool IsKeyboardFocusable() const;
* This factor is only used when ResizePolicy is set to either:
* ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
* This actor's size is set to the actor's size multipled by or added to this factor,
- * depending on ResizePolicy (See SetResizePolicy).
+ * depending on ResizePolicy ( See SetResizePolicy() ).
*
* @since_tizen 2.4
* @param [in] factor A Vector3 representing the relative factor to be applied to each axis.
*
* @note When the parent of a set of actors is connected to the stage, then all of the children
* will received this callback.
- *
* For the following actor tree, the callback order will be A, B, D, E, C, and finally F.
*
+ * @code
+ *
* A (parent)
* / \
* B C
* / \ \
* D E F
*
+ * @endcode
*/
OnStageSignalType& OnStageSignal();
* @return The signal
* @note When the parent of a set of actors is disconnected to the stage, 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.
*
+ * @code
+ *
* A (parent)
* / \
* B C
* / \ \
* D E F
*
+ * @endcode
+ *
*/
OffStageSignalType& OffStageSignal();
* @brief Add a renderer to this actor.
*
* @since_tizen 2.4
+ * @remarks Not implemented yet. This will be supported in future version.
* @param[in] renderer Renderer to add to the actor
* @return The index of the Renderer that was added
* @pre The renderer must be initialized.
* @brief Get the number of renderers on this actor.
*
* @since_tizen 2.4
- * @return the number of renderers on this actor
+ * @remarks Not implemented yet. This will be supported in future version
+ * @return The number of renderers on this actor
*/
unsigned int GetRendererCount() const;
* @brief Get a Renderer by index.
*
* @since_tizen 2.4
+ * @remarks Not implemented yet. This will be supported in future version.
* @param[in] index The index of the renderer to fetch
* @return The renderer at the specified index
* @pre The index must be between 0 and GetRendererCount()-1
* @brief Remove an renderer from the actor.
*
* @since_tizen 2.4
+ * @remarks Not implemented yet. This will be supported in future version.
* @param[in] renderer Handle to the renderer that is to be removed
*/
void RemoveRenderer( Renderer& renderer );
* @brief Remove an renderer from the actor by index.
*
* @since_tizen 2.4
+ * @remarks Not implemented yet. This will be supported in future version.
* @param[in] index Index of the renderer that is to be removed
* @pre The index must be between 0 and GetRendererCount()-1
*
*/
void RemoveRenderer( unsigned int index );
+
/**
* @brief This signal is emitted after the size has been set on the actor during relayout
*
public: // Not intended for application developers
/**
- * @brief This constructor is used by Dali New() methods.
+ * @brief This constructor is used by Actor::New() methods.
*
* @since_tizen 2.4
* @param [in] actor A pointer to a newly allocated Dali resource
* @brief Helper for discarding an actor handle.
*
* If the handle is empty, this method does nothing. Otherwise
- * actor.Unparent() will be called, followed by actor.Reset().
+ * Actor::Unparent() will be called, followed by Actor::Reset().
* @since_tizen 2.4
* @param[in,out] actor A handle to an actor, or an empty handle.
*/