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=f7d74b564d367811c9169cea3edf7b9080c0164d;hp=9cdf1e7f7f85757688f63b3b4bb05c40ccb845ef;hb=1d82abb8a1a514ce0af63004706135fb7883f89b;hpb=c1481543c3334342110f9a4635292d0eff1d15b7 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 old mode 100755 new mode 100644 index 9cdf1e7..f7d74b5 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-view.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_ITEM_VIEW_H__ -#define __DALI_TOOLKIT_ITEM_VIEW_H__ +#ifndef DALI_TOOLKIT_ITEM_VIEW_H +#define DALI_TOOLKIT_ITEM_VIEW_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -21,15 +21,13 @@ // EXTERNAL INCLUDES // INTERNAL INCLUDES -#include #include +#include namespace Dali { - namespace Toolkit { - namespace Internal DALI_INTERNAL { class ItemView; @@ -64,21 +62,20 @@ typedef IntrusivePtr ItemLayoutPtr; * @SINCE_1_1.33 */ -class DALI_IMPORT_API ItemView : public Scrollable +class DALI_TOOLKIT_API ItemView : public Scrollable { public: - /** * @brief Enumeration for 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 + 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 @SINCE_1_0.0 + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_0.0 }; /** @@ -93,29 +90,111 @@ public: */ enum { - // 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 + /////////////////////////////////////////////////////////////////////////////// + // Event side (non-animatable) properties + /////////////////////////////////////////////////////////////////////////////// + + /** + * @brief The minimum swipe speed in pixels per second. + * @details Name "minimumSwipeSpeed", type Property::FLOAT. + * @SINCE_1_1.18 + * @see SetMinimumSwipeSpeed() + */ + MINIMUM_SWIPE_SPEED = PROPERTY_START_INDEX, + + /** + * @brief The minimum swipe distance in actor coordinates. + * @details Name "minimumSwipeDistance", type Property::FLOAT. + * @SINCE_1_1.18 + * @see SetMinimumSwipeDistance() + */ + MINIMUM_SWIPE_DISTANCE, + + /** + * @brief The step of scroll distance in actor coordinates for each wheel event received. + * @details Name "wheelScrollDistanceStep", type Property::FLOAT. + * @SINCE_1_1.18 + * @see SetWheelScrollDistanceStep() + */ + WHEEL_SCROLL_DISTANCE_STEP, + + /** + * @brief Whether the animation for the layout to scroll to its anchor position after dragging or swiping is enabled. + * @details Name "snapToItemEnabled", type Property::BOOLEAN. + * @SINCE_1_1.18 + * @see SetAnchoring() + */ + SNAP_TO_ITEM_ENABLED, + + /** + * @brief The interval between refreshes. + * @details Name "refreshInterval", type Property::FLOAT. + * @SINCE_1_1.18 + * @see SetRefreshInterval() + */ + REFRESH_INTERVAL, + + /** + * @brief The layout used. + * @details Name "layout", type Property::ARRAY. + * @SINCE_1_2.60 + * @see Dali::Toolkit::DefaultItemLayoutProperty + */ + LAYOUT, + + /////////////////////////////////////////////////////////////////////////////// + // Animatable Properties + /////////////////////////////////////////////////////////////////////////////// + + /** + * @brief The current logical position within the layout. + * @details Name "layoutPosition", type Property::FLOAT. + * @SINCE_1_0.0 + */ + LAYOUT_POSITION = ANIMATABLE_PROPERTY_START_INDEX, + + /** + * @brief The scrolling speed when playing the flick animation. + * @details Name "scrollSpeed", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_SPEED, + + /** + * @brief The amount that we can scroll beyond the boundary. + * @details Name "overshoot", type Property::FLOAT. + * @SINCE_1_0.0 + */ + OVERSHOOT, + + /** + * @brief The current scrolling direction. + * @details Name "scrollDirection", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_DIRECTION, + + /** + * @brief The current orientation of the layout. + * @details Name "layoutOrientation", type Property::INTEGER. + * @SINCE_1_0.0 + */ + LAYOUT_ORIENTATION, + + /** + * @brief The size of the content. + * @details Name "scrollContentSize", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_CONTENT_SIZE, }; }; // Signals - typedef Signal< void () > LayoutActivatedSignalType; + typedef Signal LayoutActivatedSignalType; public: - /** * @brief Creates an uninitialized ItemView; this can be initialized with ItemView::New(). * @@ -129,7 +208,15 @@ public: * @SINCE_1_0.0 * @param[in] itemView Handle to an object */ - ItemView( const ItemView& itemView ); + ItemView(const ItemView& itemView); + + /** + * @brief Move constructor + * @SINCE_1_9.23 + * + * @param[in] rhs A reference to the moved handle + */ + ItemView(ItemView&& rhs); /** * @brief Assignment operator. @@ -137,7 +224,16 @@ public: * @param[in] itemView Handle to an object * @return A reference to this */ - ItemView& operator=( const ItemView& itemView ); + ItemView& operator=(const ItemView& itemView); + + /** + * @brief Move assignment + * @SINCE_1_9.23 + * + * @param[in] rhs A reference to the moved handle + * @return A reference to this + */ + ItemView& operator=(ItemView&& rhs); /** * @brief Destructor. @@ -166,7 +262,7 @@ public: * @param[in] handle Handle to an object * @return A handle to a ItemView or an uninitialized handle */ - static ItemView DownCast( BaseHandle handle ); + static ItemView DownCast(BaseHandle handle); /** * @brief Queries the number of layouts. @@ -474,7 +570,7 @@ public: * @SINCE_1_0.0 * @param[in] parentOrigin New parent origin position vector */ - void SetItemsParentOrigin( const Vector3& parentOrigin ); + void SetItemsParentOrigin(const Vector3& parentOrigin); /** * @brief Get the parent origin of the items. @@ -491,7 +587,7 @@ public: * @SINCE_1_0.0 * @param[in] anchorPoint New anchor point position vector */ - void SetItemsAnchorPoint( const Vector3& anchorPoint ); + void SetItemsAnchorPoint(const Vector3& anchorPoint); /** * @brief Get the anchor point of the items. @@ -510,7 +606,6 @@ public: void GetItemsRange(ItemRange& range); public: // Signals - /** * @brief Signal emitted when layout activation is finished. * @@ -525,7 +620,6 @@ public: // Signals ItemView::LayoutActivatedSignalType& LayoutActivatedSignal(); public: // Not intended for application developers - /// @cond internal /** * @brief Creates a handle using the Toolkit::Internal implementation. @@ -541,7 +635,7 @@ public: // Not intended for application developers * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor. */ - explicit DALI_INTERNAL ItemView( Dali::Internal::CustomActor* internal ); + explicit DALI_INTERNAL ItemView(Dali::Internal::CustomActor* internal); /// @endcond }; @@ -552,4 +646,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // __DALI_TOOLKIT_ITEM_VIEW_H__ +#endif // DALI_TOOLKIT_ITEM_VIEW_H