X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fscrollable%2Fitem-view%2Fitem-view.h;h=5431d2571f26560b1fb56fa5cfe170e54407f85b;hb=62f4bf2995acd0c3a386975f4c38f95cbdd507e3;hp=aefa4f166f367be71d6237a1c9c5bdab18c0f4c2;hpb=cc82bd9b187cda8fe2c8336b73fd1fa9376cfebd;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h b/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h index aefa4f1..5431d25 100644 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_ITEM_VIEW_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,8 +34,11 @@ namespace Internal DALI_INTERNAL { class ItemView; } +/** + * @addtogroup dali_toolkit_controls_item_view + * @{ + */ -class ScrollConnector; class ItemFactory; class ItemLayout; struct ItemRange; @@ -47,11 +50,56 @@ typedef IntrusivePtr ItemLayoutPtr; * * Multiple ItemLayouts may be provided, to determine the logical position of each item a layout. * Actors are provided from an external ItemFactory, to display the currently visible items. + * + * Signals + * | %Signal Name | Method | + * |---------------------------------|--------------------------------------------| + * | layoutActivated | @ref LayoutActivatedSignal() | */ + class DALI_IMPORT_API ItemView : public Scrollable { public: + enum PropertyRange + { + PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1, ///< @since DALi 1.1.18 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices, @since DALi 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 + }; + + /** + * @brief An enumeration of properties belonging to the ScrollView class. + */ + struct Property + { + enum + { + // Event side properties + MINIMUM_SWIPE_SPEED = PROPERTY_START_INDEX, ///< Property, name "minimumSwipeSpeed", @see SetMinimumSwipeSpeed(), type float, @since DALi 1.1.18 + MINIMUM_SWIPE_DISTANCE, ///< Property, name "minimumSwipeDistance", @see SetMinimumSwipeDistance(), type float, @since DALi 1.1.18 + WHELL_SCROLL_DISTANCE_SPEED, ///< Property, name "wheelScrollDistanceStep", @see SetWheelScrollDistanceStep(), type float, @since DALi 1.1.18 + SNAP_TO_ITEM_ENABLED, ///< Property, name "snapToItemEnabled", @see SetAnchoring(), type bool, @since DALi 1.1.18 + REFRESH_INTERVAL, ///< Property, name "refreshInterval", @see SetRefreshInterval(), type float, @since DALi 1.1.18 + + // Animatable properties + LAYOUT_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "layoutPosition", type float + SCROLL_SPEED, ///< Property, name "scrollSpeed", type float + OVERSHOOT, ///< Property, name "overshoot", type float + SCROLL_DIRECTION, ///< Property, name "scrollDirection", type Vector2 + LAYOUT_ORIENTATION, ///< Property, name "layoutOrientation", type integer + SCROLL_CONTENT_SIZE ///< Property, name "scrollContentSize", type float + }; + }; + + // Signals + + typedef Signal< void () > LayoutActivatedSignalType; + +public: + /** * @brief Create an uninitialized ItemView; this can be initialized with ItemView::New(). * @@ -96,13 +144,6 @@ public: static ItemView DownCast( BaseHandle handle ); /** - * @brief Retrieve a scroll-connector; this can be used to connect scroll components e.g. scroll bars. - * - * @return The connector. - */ - ScrollConnector GetScrollConnector() const; - - /** * @brief Query the number of layouts. * * @return The number of layouts. @@ -201,18 +242,18 @@ public: float GetMinimumSwipeDistance() const; /** - * @brief Set the step of scroll distance in actor coordinates for each mouse wheel event received. + * @brief Set the step of scroll distance in actor coordinates for each wheel event received. * * @param[in] step The step of scroll distance(pixel). */ - void SetMouseWheelScrollDistanceStep(float step); + void SetWheelScrollDistanceStep(float step); /** - * @brief Get the step of scroll distance in actor coordinates for each mouse wheel event received. + * @brief Get the step of scroll distance in actor coordinates for each wheel event received. * * @return The step of scroll distance(pixel) */ - float GetMouseWheelScrollDistanceStep() const; + float GetWheelScrollDistanceStep() const; /** * @brief Set whether to enable the animation for the layout to @@ -405,6 +446,20 @@ public: */ void GetItemsRange(ItemRange& range); +public: // Signals + + /** + * @brief Signal emitted when layout activation is finished. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName(); + * @endcode + * @pre The Object has been initialized. + * @return The signal to connect to. + */ + ItemView::LayoutActivatedSignalType& LayoutActivatedSignal(); + public: // Not intended for application developers /** @@ -422,6 +477,9 @@ public: // Not intended for application developers explicit DALI_INTERNAL ItemView( Dali::Internal::CustomActor* internal ); }; +/** + * @} + */ } // namespace Toolkit } // namespace Dali