X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fscrollable%2Fitem-view%2Fitem-view.h;h=279019484353b3ab87c2ee08f7926fd291e5794e;hp=1dd4fe33bfb93f993b6731801dc73049b2841273;hb=07bbc876b9b069903dd4ed86c9dd5f2f66fc3b86;hpb=2ddfbb9e23a7c3fc30e604236c41e0ef6d2ed6a2 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 1dd4fe3..2790194 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,45 @@ 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 | + * |----------------------------------|--------------------------------------------| + * | layout-activated | @ref LayoutActivatedSignal() | */ + class DALI_IMPORT_API ItemView : public Scrollable { public: + enum PropertyRange + { + 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 + { + 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 + }; + }; + + // Signals + + typedef Signal< void () > LayoutActivatedSignalType; + +public: + /** * @brief Create an uninitialized ItemView; this can be initialized with ItemView::New(). * @@ -96,13 +133,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 +231,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 @@ -277,6 +307,11 @@ public: float GetRefreshInterval() const; /** + * @brief Do a refresh of the item view. + */ + void Refresh(); + + /** * @brief Given the Item ID, this returns the accompanying actor. * * @param[in] itemId The Item ID of the actor required. @@ -400,6 +435,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 /** @@ -417,6 +466,9 @@ public: // Not intended for application developers explicit DALI_INTERNAL ItemView( Dali::Internal::CustomActor* internal ); }; +/** + * @} + */ } // namespace Toolkit } // namespace Dali