Update doxygen comments
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / item-view / item-view.h
old mode 100644 (file)
new mode 100755 (executable)
index 2790194..60dba05
@@ -35,7 +35,7 @@ namespace Internal DALI_INTERNAL
 class ItemView;
 }
 /**
- * @addtogroup dali-toolkit-controls-item-view
+ * @addtogroup dali_toolkit_controls_item_view
  * @{
  */
 
@@ -52,34 +52,61 @@ typedef IntrusivePtr<ItemLayout> ItemLayoutPtr;
  * Actors are provided from an external ItemFactory, to display the currently visible items.
  *
  * Signals
- * | %Signal Name                     | Method                                     |
- * |----------------------------------|--------------------------------------------|
- * | layout-activated                 | @ref LayoutActivatedSignal()               |
+ * | %Signal Name                    | Method                                     |
+ * |---------------------------------|--------------------------------------------|
+ * | layoutActivated                 | @ref LayoutActivatedSignal()               |
+ * @SINCE_1_0.0
+ *
+ * Actions
+ * | %Action Name  | Attributes              | Description                                     |
+ * |---------------|-------------------------|-------------------------------------------------|
+ * | stopScrolling | Doesn't have attributes | Stops the scroll animation. See @ref DoAction() |
+ * @SINCE_1_1.33
  */
 
 class DALI_IMPORT_API ItemView : public Scrollable
 {
 public:
 
+  /**
+   * @brief The start and end property ranges for this control.
+   * @SINCE_1_1.18
+   */
   enum PropertyRange
   {
+    PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1,                        ///< @SINCE_1_1.18
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000,                                        ///< Reserve property indices, @SINCE_1_1.18
+
     ANIMATABLE_PROPERTY_START_INDEX = Toolkit::Scrollable::ANIMATABLE_PROPERTY_END_INDEX + 1,
-    ANIMATABLE_PROPERTY_END_INDEX   = ANIMATABLE_PROPERTY_START_INDEX + 1000                   ///< Reserve animatable property indices
+    ANIMATABLE_PROPERTY_END_INDEX   = ANIMATABLE_PROPERTY_START_INDEX + 1000                   ///< Reserve animatable property indices @SINCE_1_0.0
   };
 
   /**
-   * @brief An enumeration of properties belonging to the ScrollView class.
+   * @brief Enumeration for the instance of properties belonging to the ScrollView class.
+   * @SINCE_1_0.0
    */
   struct Property
   {
+    /**
+     * @brief Enumeration for the instance of properties belonging to the ScrollView class.
+     * @SINCE_1_0.0
+     */
     enum
     {
-      LAYOUT_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "layout-position",       type float
-      SCROLL_SPEED,                                      ///< Property, name "scroll-speed",          type float
-      OVERSHOOT,                                         ///< Property, name "overshoot",             type float
-      SCROLL_DIRECTION,                                  ///< Property, name "scroll-direction",      type Vector2
-      LAYOUT_ORIENTATION,                                ///< Property, name "layout-orientation",    type integer
-      SCROLL_CONTENT_SIZE                                ///< Property, name "scroll-content-size",   type float
+      // Event side properties
+      MINIMUM_SWIPE_SPEED = PROPERTY_START_INDEX,        ///< Property, name "minimumSwipeSpeed",        @see SetMinimumSwipeSpeed(),       type float,    @SINCE_1_1.18
+      MINIMUM_SWIPE_DISTANCE,                            ///< Property, name "minimumSwipeDistance",     @see SetMinimumSwipeDistance(),    type float,    @SINCE_1_1.18
+      WHEEL_SCROLL_DISTANCE_STEP,                        ///< Property, name "wheelScrollDistanceStep",  @see SetWheelScrollDistanceStep(), type float,    @SINCE_1_1.18
+      SNAP_TO_ITEM_ENABLED,                              ///< Property, name "snapToItemEnabled",        @see SetAnchoring(),               type bool,     @SINCE_1_1.18
+      REFRESH_INTERVAL,                                  ///< Property, name "refreshInterval",          @see SetRefreshInterval(),         type float,    @SINCE_1_1.18
+
+      // Animatable properties
+      LAYOUT_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "layoutPosition",           type float @SINCE_1_0.0
+      SCROLL_SPEED,                                      ///< Property, name "scrollSpeed",              type float @SINCE_1_0.0
+      OVERSHOOT,                                         ///< Property, name "overshoot",                type float @SINCE_1_0.0
+      SCROLL_DIRECTION,                                  ///< Property, name "scrollDirection",          type Vector2 @SINCE_1_0.0
+      LAYOUT_ORIENTATION,                                ///< Property, name "layoutOrientation",        type integer @SINCE_1_0.0
+      SCROLL_CONTENT_SIZE                                ///< Property, name "scrollContentSize",        type float @SINCE_1_0.0
     };
   };
 
@@ -93,16 +120,22 @@ public:
    * @brief Create an uninitialized ItemView; this can be initialized with ItemView::New().
    *
    * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * @SINCE_1_0.0
    */
   ItemView();
 
   /**
    * @brief Copy constructor.
+   * @SINCE_1_0.0
+   * @param[in] itemView Handle to an object
    */
   ItemView( const ItemView& itemView );
 
   /**
    * @brief Assignment operator.
+   * @SINCE_1_0.0
+   * @param[in] itemView Handle to an object
+   * @return A reference to this
    */
   ItemView& operator=( const ItemView& itemView );
 
@@ -110,31 +143,35 @@ public:
    * @brief Destructor
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   * @SINCE_1_0.0
    */
   ~ItemView();
 
   /**
    * @brief Create an initialized ItemView.
    *
+   * @SINCE_1_0.0
    * @param[in] factory The factory which provides ItemView with items.
    * @return A handle to a newly allocated Dali resource.
    */
   static ItemView New(ItemFactory& factory);
 
   /**
-   * @brief Downcast an Object handle to ItemView.
+   * @brief Downcast a handle to ItemView handle.
    *
    * If handle points to a ItemView the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
    *
+   * @SINCE_1_0.0
    * @param[in] handle Handle to an object
-   * @return handle to a ItemView or an uninitialized handle
+   * @return handle to a ItemView or an uninitialized handle
    */
   static ItemView DownCast( BaseHandle handle );
 
   /**
    * @brief Query the number of layouts.
    *
+   * @SINCE_1_0.0
    * @return The number of layouts.
    */
   unsigned int GetLayoutCount() const;
@@ -142,6 +179,7 @@ public:
   /**
    * @brief Add a layout.
    *
+   * @SINCE_1_0.0
    * @param[in] layout The layout.
    */
   void AddLayout(ItemLayout& layout);
@@ -149,23 +187,26 @@ public:
   /**
    * @brief Remove a layout.
    *
-   * @pre layoutIndex is less than GetLayoutCount().
+   * @SINCE_1_0.0
    * @param[in] layoutIndex The index of one of the ItemView layouts.
+   * @pre layoutIndex is less than GetLayoutCount().
    */
   void RemoveLayout(unsigned int layoutIndex);
 
   /**
    * @brief Retrieve a layout.
    *
-   * @pre layoutIndex is less than GetLayoutCount().
+   * @SINCE_1_0.0
    * @param[in] layoutIndex The index of the layout to retrieve.
    * @return The layout
+   * @pre layoutIndex is less than GetLayoutCount().
    */
   ItemLayoutPtr GetLayout(unsigned int layoutIndex) const;
 
   /**
    * @brief Retrieve the currently active layout, if any.
    *
+   * @SINCE_1_0.0
    * @return The layout, or an uninitialized pointer if no layout is active.
    */
   ItemLayoutPtr GetActiveLayout() const;
@@ -173,6 +214,7 @@ public:
   /**
    * @brief Retrieve the current layout-position of an item in the ItemView.
    *
+   * @SINCE_1_0.0
    * @param[in] itemId The item identifier.
    * @return The current layout-position.
    */
@@ -185,11 +227,12 @@ public:
    * This is done by applying constraints from the new layout, and
    * removing constraints from the previous layout.
    *
-   * @pre layoutIndex is less than GetLayoutCount().
-   * @pre durationSeconds is greater or equal to zero.
+   * @SINCE_1_0.0
    * @param[in] layoutIndex The index of one of the ItemView layouts.
    * @param[in] targetSize The target ItemView & layout size.
    * @param[in] durationSeconds The time taken to relayout in seconds (zero for immediate).
+   * @pre layoutIndex is less than GetLayoutCount().
+   * @pre durationSeconds is greater or equal to zero.
    */
   void ActivateLayout(unsigned int layoutIndex, Vector3 targetSize, float durationSeconds);
 
@@ -197,6 +240,7 @@ public:
    * @brief Deactivate the current layout, if any.
    *
    * The constraints applied by the layout will be removed.
+   * @SINCE_1_0.0
    */
   void DeactivateCurrentLayout();
 
@@ -204,6 +248,7 @@ public:
    * @brief Set the minimum swipe speed in pixels per second; A pan
    * gesture must exceed this to trigger a swipe.
    *
+   * @SINCE_1_0.0
    * @param[in] speed The minimum swipe speed
    */
   void SetMinimumSwipeSpeed(float speed);
@@ -211,6 +256,7 @@ public:
   /**
    * @brief Get the minimum swipe speed in pixels per second.
    *
+   * @SINCE_1_0.0
    * @return The minimum swipe speed
    */
   float GetMinimumSwipeSpeed() const;
@@ -219,6 +265,7 @@ public:
    * @brief Set the minimum swipe distance in actor coordinates; A pan
    * gesture must exceed this to trigger a swipe.
    *
+   * @SINCE_1_0.0
    * @param[in] distance The minimum swipe distance.
    */
   void SetMinimumSwipeDistance(float distance);
@@ -226,6 +273,7 @@ public:
   /**
    * @brief Get the minimum swipe distance in actor coordinates.
    *
+   * @SINCE_1_0.0
    * @return The minimum swipe distance
    */
   float GetMinimumSwipeDistance() const;
@@ -233,6 +281,7 @@ public:
   /**
    * @brief Set the step of scroll distance in actor coordinates for each wheel event received.
    *
+   * @SINCE_1_0.0
    * @param[in] step The step of scroll distance(pixel).
    */
   void SetWheelScrollDistanceStep(float step);
@@ -240,6 +289,7 @@ public:
   /**
    * @brief Get the step of scroll distance in actor coordinates for each wheel event received.
    *
+   * @SINCE_1_0.0
    * @return The step of scroll distance(pixel)
    */
   float GetWheelScrollDistanceStep() const;
@@ -251,6 +301,7 @@ public:
    * The anchor position is the position where all the items in the layout
    * are aligned to their closest rounded layout positions in integer.
    *
+   * @SINCE_1_0.0
    * @param[in] enabled Whether the anchor animation is enabled or not.
    */
   void SetAnchoring(bool enabled);
@@ -258,6 +309,7 @@ public:
   /**
    * @brief Get whether the anchor animation is enabled or not.
    *
+   * @SINCE_1_0.0
    * @return Whether the anchor animation is enabled or not.
    */
   bool GetAnchoring() const;
@@ -268,14 +320,16 @@ public:
    * This is the time taken to reach the nearest anchor position after
    * a drag or swipe gesture ends.
    *
-   * @pre durationSeconds must be greater than zero.
+   * @SINCE_1_0.0
    * @param[in] durationSeconds The duration of the anchor animation in seconds.
+   * @pre durationSeconds must be greater than zero.
    */
   void SetAnchoringDuration(float durationSeconds);
 
   /**
    * @brief Get the duration of the anchor animation in seconds.
    *
+   * @SINCE_1_0.0
    * @return The duration of the anchor animation
    */
   float GetAnchoringDuration() const;
@@ -283,18 +337,22 @@ public:
   /**
    * @brief Scroll the current layout to a particular item.
    *
+   * @SINCE_1_0.0
+   * @param[in] itemId The ID of an item in the layout.
+   * @param[in] durationSeconds How long the scrolling takes in seconds.
    * @pre durationSeconds must be zero or greater; zero means the layout should scroll to the particular item instantly.
    * If calling this with zero second of duration immediately after calling ActivateLayout, it might not work unless
    * the duration of relayout animation for ActivateLayout is also set to be zero.
-   * @param[in] itemId The ID of an item in the layout.
-   * @param[in] durationSeconds How long the scrolling takes in seconds.
    */
   void ScrollToItem(ItemId itemId, float durationSeconds);
 
   /**
-   * @brief Set the interval between refreshes. When the layout-position of items is changed by this interval,
+   * @brief Set the interval between refreshes.
+   *
+   * When the layout-position of items is changed by this interval,
    * new items are requested from ItemFactory.
    *
+   * @SINCE_1_0.0
    * @param[in] intervalLayoutPositions The refresh interval in layout position.
    */
   void SetRefreshInterval(float intervalLayoutPositions);
@@ -302,18 +360,21 @@ public:
   /**
    * @brief Get the interval between refreshes in layout position.
    *
+   * @SINCE_1_0.0
    * @return  The refresh interval
    */
   float GetRefreshInterval() const;
 
   /**
    * @brief Do a refresh of the item view.
+   * @SINCE_1_0.0
    */
   void Refresh();
 
   /**
    * @brief Given the Item ID, this returns the accompanying actor.
    *
+   * @SINCE_1_0.0
    * @param[in] itemId The Item ID of the actor required.
    * @return The Actor corresponding to the Item ID.
    */
@@ -322,6 +383,7 @@ public:
   /**
    * @brief Returns the Item ID of the specified actor.
    *
+   * @SINCE_1_0.0
    * @param[in] actor The actor whose Item ID is required.
    * @return The Item ID of the item.
    * @pre The actor should be an item of ItemView.
@@ -338,18 +400,20 @@ public:
    *     ID 2 - ActorB       ID 2 - ActorZ !
    *     ID 3 - ActorC       ID 3 - ActorB
    *                         ID 4 - ActorC
-   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
+   * @SINCE_1_0.0
    * @param[in] newItem The item to insert.
    * @param[in] durationSeconds How long the relayout takes in seconds.
+   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
    */
   void InsertItem(Item newItem, float durationSeconds);
 
   /**
    * @brief Insert a set of items; this is more efficient than calling InsertItem() repeatedly.
    *
-   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
+   * @SINCE_1_0.0
    * @param[in] newItems The items to insert.
    * @param[in] durationSeconds How long the relayout takes in seconds.
+   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
    */
   void InsertItems(const ItemContainer& newItems, float durationSeconds);
 
@@ -358,23 +422,26 @@ public:
    *
    * A relayout will occur for the remaining actors; for example if RemoveItem(Item(2, ActorZ), 0) is called,
    * the items with ID 3 or greater will be moved:
-   *   Initial actors:     After remove:
-   *     ID 1 - ActorA       ID 1 - ActorA
-   *     ID 2 - ActorB       ID 2 - ActorC (previously ID 3)
-   *     ID 3 - ActorC       ID 3 - ActorB (previously ID 4)
-   *     ID 4 - ActorD
-   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
+   *  | Initial actors:    | After remove:  |
+   *  |:------------------ |:-------------- |
+   *  |  ID 1 - ActorA     |  ID 1 - ActorA |
+   *  |  ID 2 - ActorB     |  ID 2 - ActorC (previously ID 3) |
+   *  |  ID 3 - ActorC     |  ID 3 - ActorB (previously ID 4) |
+   *  |  ID 4 - ActorD     |                |
+   * @SINCE_1_0.0
    * @param[in] itemId The Item ID of the item to remove.
    * @param[in] durationSeconds How long the relayout takes in seconds.
+   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
    */
   void RemoveItem(ItemId itemId, float durationSeconds);
 
   /**
    * @brief Remove a set of items; this is more efficient than calling RemoveItem() repeatedly.
    *
-   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
+   * @SINCE_1_0.0
    * @param[in] itemIds The IDs of the items to remove.
    * @param[in] durationSeconds How long the relayout takes in seconds.
+   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
    */
   void RemoveItems(const ItemIdContainer& itemIds, float durationSeconds);
 
@@ -382,9 +449,10 @@ public:
    * @brief Replace an item.
    *
    * A relayout will occur for the replacement item only.
-   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
+   * @SINCE_1_0.0
    * @param[in] replacementItem The replacement for an existing item.
    * @param[in] durationSeconds How long the relayout takes in seconds.
+   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
    */
   void ReplaceItem(Item replacementItem, float durationSeconds);
 
@@ -392,38 +460,43 @@ public:
    * @brief Replace a set of items.
    *
    * A relayout will occur for the replacement items only.
-   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
+   * @SINCE_1_0.0
    * @param[in] replacementItems The replacements for a set of existing items.
    * @param[in] durationSeconds How long the relayout takes in seconds.
+   * @pre durationSeconds must be zero or greater; zero means the relayout occurs instantly.
    */
   void ReplaceItems(const ItemContainer& replacementItems, float durationSeconds);
 
   /**
-   * @brief Set the parent origin of the items
+   * @brief Set the parent origin of the items.
    *
    * A relayout will occur for all the items if the parent origin is different than the current one.
+   * @SINCE_1_0.0
    * @param[in] parentOrigin New parent origin position vector
    */
   void SetItemsParentOrigin( const Vector3& parentOrigin );
 
   /**
-   * @brief Get the parent origin of the items
+   * @brief Get the parent origin of the items.
    *
+   * @SINCE_1_0.0
    * @return The current parent origin of the items
    */
   Vector3 GetItemsParentOrigin() const;
 
   /**
-   * @brief Set the anchor point of the items
+   * @brief Set the anchor point of the items.
    *
    * A relayout will occur for all the items if the anchor point is different than the current one.
+   * @SINCE_1_0.0
    * @param[in] anchorPoint New anchor point position vector
    */
   void SetItemsAnchorPoint( const Vector3& anchorPoint );
 
   /**
-   * @brief Get the anchor point of the items
+   * @brief Get the anchor point of the items.
    *
+   * @SINCE_1_0.0
    * @return The current anchor point of the items
    */
   Vector3 GetItemsAnchorPoint() const;
@@ -431,6 +504,7 @@ public:
   /**
    * @brief Get the range of items that are currently in ItemView.
    *
+   * @SINCE_1_0.0
    * @param[out] range The range of items.
    */
   void GetItemsRange(ItemRange& range);
@@ -444,16 +518,19 @@ public: // Signals
    * @code
    *   void YourCallbackName();
    * @endcode
-   * @pre The Object has been initialized.
+   * @SINCE_1_0.0
    * @return The signal to connect to.
+   * @pre The Object has been initialized.
    */
   ItemView::LayoutActivatedSignalType& LayoutActivatedSignal();
 
 public: // Not intended for application developers
 
+  /// @cond internal
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
+   * @SINCE_1_0.0
    * @param[in]  implementation  The Control implementation.
    */
   DALI_INTERNAL ItemView(Internal::ItemView& implementation);
@@ -461,9 +538,11 @@ public: // Not intended for application developers
   /**
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
+   * @SINCE_1_0.0
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
   explicit DALI_INTERNAL ItemView( Dali::Internal::CustomActor* internal );
+  /// @endcond
 };
 
 /**