Tizen 2.4.0 rev3 SDK Public Release
[framework/graphics/dali.git] / dali / public-api / actors / custom-actor-impl.h
index ef281fc..3297e91 100644 (file)
@@ -58,7 +58,7 @@ typedef IntrusivePtr<CustomActorImpl> CustomActorImplPtr;
  * @brief CustomActorImpl is an abstract base class for custom control implementations.
  *
  * This provides a series of pure virtual methods, which are called when actor-specific events occur.
- * An CustomActorImpl is typically owned by a single CustomActor instance; see also CustomActor::New(CustomActorImplPtr).
+ * An CustomActorImpl is typically owned by a single CustomActor instance; see also CustomActor::CustomActor( CustomActorImpl &implementation ).
  * @since_tizen 2.4
  */
 class DALI_IMPORT_API CustomActorImpl : public Dali::RefObject
@@ -86,39 +86,44 @@ public:
    *
    * When an actor is connected, it will be directly or indirectly parented to the root Actor.
    * @since_tizen 2.4
-   * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
+   * @param[in] depth The depth in the hierarchy for the actor
    *
-   * @note When the parent of a set of actors is connected to the stage, then all of the children
+   * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
+   * 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
    *
-   *   @param[in] depth The depth in the hierarchy for the actor
+   * @endcode
    */
   virtual void OnStageConnection( int depth ) = 0;
 
   /**
-   * @brief Called after the actor has been disconnected from the stage.
+   * @brief Called after the actor has been disconnected from Stage.
    *
    * If an actor is disconnected it either has no parent, or is parented to a disconnected actor.
    *
    * @since_tizen 2.4
    * @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
    */
   virtual void OnStageDisconnection() = 0;
 
@@ -151,7 +156,7 @@ public:
    * @brief Called when the owning actor's size is set e.g. using Actor::SetSize().
    *
    * @since_tizen 2.4
-   * @param[in] targetSize The target size. Note that this target size may not match the size returned via Actor::GetSize().
+   * @param[in] targetSize The target size. Note that this target size may not match the size returned via @ref Actor::GetSize.
    */
   virtual void OnSizeSet(const Vector3& targetSize) = 0;
 
@@ -160,7 +165,7 @@ public:
    *
    * @since_tizen 2.4
    * @param[in] animation The object which is animating the owning actor.
-   * @param[in] targetSize The target size. Note that this target size may not match the size returned via Actor::GetSize().
+   * @param[in] targetSize The target size. Note that this target size may not match the size returned via @ref Actor::GetSize.
    */
   virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize) = 0;
 
@@ -170,7 +175,7 @@ public:
    * @since_tizen 2.4
    * @param[in] event The touch event.
    * @return True if the event should be consumed.
-   * @note This must be enabled during construction; see CustomActorImpl::CustomActorImpl(bool)
+   * @note This must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
    */
   virtual bool OnTouchEvent(const TouchEvent& event) = 0;
 
@@ -180,7 +185,7 @@ public:
    * @since_tizen 2.4
    * @param[in] event The hover event.
    * @return True if the event should be consumed.
-   * @note This must be enabled during construction; see CustomActorImpl::SetRequiresHoverEvents(bool)
+   * @note This must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
    */
   virtual bool OnHoverEvent(const HoverEvent& event) = 0;
 
@@ -199,7 +204,7 @@ public:
    * @since_tizen 2.4
    * @param[in] event The wheel event.
    * @return True if the event should be consumed.
-   * @note This must be enabled during construction; see CustomActorImpl::SetRequiresWheelEvents(bool)
+   * @note This must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
    */
   virtual bool OnWheelEvent(const WheelEvent& event) = 0;
 
@@ -212,9 +217,6 @@ public:
    * actors differently after certain operations like add or remove
    * actors, resize or after changing specific properties.
    *
-   * Note! As this function is called from inside the size negotiation algorithm, you cannot
-   * call RequestRelayout (the call would just be ignored)
-   *
    * @since_tizen 2.4
    * @param[in]      size       The allocated size.
    * @param[in,out]  container  The control should add actors to this container that it is not able
@@ -255,8 +257,8 @@ public:
    * Derived classes should override this if they wish to customize the height returned.
    *
    * @since_tizen 2.4
-   * @param width to use.
-   * @return the height based on the width.
+   * @param width Width to use.
+   * @return The height based on the width.
    */
   virtual float GetHeightForWidth( float width ) = 0;
 
@@ -266,8 +268,8 @@ public:
    * Derived classes should override this if they wish to customize the width returned.
    *
    * @since_tizen 2.4
-   * @param height to use.
-   * @return the width based on the width.
+   * @param height Height to use.
+   * @return The width based on the width.
    */
   virtual float GetWidthForHeight( float height ) = 0;
 
@@ -316,12 +318,12 @@ protected: // For derived classes
   enum ActorFlags
   {
     ACTOR_BEHAVIOUR_NONE          = 0,
-    DISABLE_SIZE_NEGOTIATION      = 1 << 0,     ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm
-    REQUIRES_TOUCH_EVENTS         = 1 << 1,     ///< True if the OnTouchEvent() callback is required.
-    REQUIRES_HOVER_EVENTS         = 1 << 2,     ///< True if the OnHoverEvent() callback is required.
-    REQUIRES_WHEEL_EVENTS   = 1 << 3,     ///< True if the OnWheelEvent() callback is required.
+    DISABLE_SIZE_NEGOTIATION      = 1 << 0,     ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm @since_tizen 2.4
+    REQUIRES_TOUCH_EVENTS         = 1 << 1,     ///< True if the OnTouchEvent() callback is required. @since_tizen 2.4
+    REQUIRES_HOVER_EVENTS         = 1 << 2,     ///< True if the OnHoverEvent() callback is required. @since_tizen 2.4
+    REQUIRES_WHEEL_EVENTS   = 1 << 3,     ///< True if the OnWheelEvent() callback is required. @since_tizen 2.4
 
-    LAST_ACTOR_FLAG                             ///< Special marker for last actor flag
+    LAST_ACTOR_FLAG                             ///< Special marker for last actor flag @since_tizen 2.4
   };
 
   static const int ACTOR_FLAG_COUNT = Log< LAST_ACTOR_FLAG - 1 >::value + 1;      ///< Value for deriving classes to continue on the flag enum
@@ -351,16 +353,16 @@ protected: // For derived classes
   /**
    * @brief provides the Actor implementation of GetHeightForWidth
    * @since_tizen 2.4
-   * @param width to use.
-   * @return the height based on the width.
+   * @param width Width to use.
+   * @return The height based on the width.
    */
   float GetHeightForWidthBase( float width );
 
   /**
-   * @brief provides the Actor implementation of GetWidthForHeight
+   * @brief Provides the Actor implementation of GetWidthForHeight
    * @since_tizen 2.4
-   * @param height to use.
-   * @return the width based on the height.
+   * @param height Height to use.
+   * @return The width based on the height.
    */
   float GetWidthForHeightBase( float height );
 
@@ -400,7 +402,7 @@ public: // Not intended for application developers
    * Owner is the Dali::Internal::CustomActor that owns the implementation of the custom actor
    * inside core. Creation of a handle to Dali public API Actor requires this pointer.
    * @since_tizen 2.4
-   * @return a pointer to the Actor implementation that owns this custom actor implementation
+   * @return A pointer to the Actor implementation that owns this custom actor implementation
    */
   Internal::CustomActor* GetOwner() const;