From: Adeel Kazmi Date: Mon, 2 Oct 2017 18:07:50 +0000 (+0100) Subject: (ItemView) Make default layout properties public X-Git-Tag: dali_1.2.60~10 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=29dcb5b25b793d2b59ae9f91949e7d1e6e20e340 (ItemView) Make default layout properties public Change-Id: I4c053748f9d522bbf01aeffb24e014c48c0502bf --- diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp index 1ee8077..3ca8d0a 100755 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -24,11 +24,8 @@ #include #include -#include #include -#include - using namespace Dali; using namespace Toolkit; @@ -104,7 +101,7 @@ int UtcDaliItemLayoutCheckPropertiesSetBeforeActivateLayout(void) layoutArray.PushBack(gridLayoutProperty); - view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray); + view.SetProperty( ItemView::Property::LAYOUT, layoutArray ); Dali::Toolkit::Internal::GridLayout* gridLayout = dynamic_cast(view.GetLayout(0).Get()); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp index 77321db..4098d72 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -24,8 +24,6 @@ #include #include -#include - using namespace Dali; using namespace Toolkit; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp index 3b5cefb..deca627 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -25,9 +25,6 @@ #include #include #include -#include -#include - using namespace Dali; using namespace Toolkit; @@ -1002,7 +999,7 @@ int UtcDaliItemViewSetGetProperty(void) DALI_TEST_EQUALS( view.GetProperty(ItemView::Property::REFRESH_INTERVAL).Get(), 11.0f, TEST_LOCATION ); // Test "layout" property - DALI_TEST_CHECK( view.GetPropertyIndex("layout") == DevelItemView::Property::LAYOUT ); + DALI_TEST_CHECK( view.GetPropertyIndex("layout") == ItemView::Property::LAYOUT ); Property::Map gridLayoutProperty; gridLayoutProperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::GRID) ); gridLayoutProperty.Insert( DefaultItemLayoutProperty::ITEM_SIZE, Dali::Property::Value(Vector3(200, 200,50)) ); @@ -1030,10 +1027,10 @@ int UtcDaliItemViewSetGetProperty(void) layoutArray.PushBack(spiralLayoutPrperty); layoutArray.PushBack(listLayoutPrperty); - view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray); + view.SetProperty( ItemView::Property::LAYOUT, layoutArray); Property::Array getLayoutArray; - DALI_TEST_CHECK( view.GetProperty(DevelItemView::Property::LAYOUT ).Get( getLayoutArray ) ); + DALI_TEST_CHECK( view.GetProperty( ItemView::Property::LAYOUT ).Get( getLayoutArray ) ); //Check that the result is the same as DALI_TEST_EQUALS( layoutArray.Count(), getLayoutArray.Count(), TEST_LOCATION ); @@ -1063,7 +1060,7 @@ int UtcDaliItemViewSetGetProperty(void) DALI_TEST_EQUALS(number, 4, TEST_LOCATION ); } } - view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray); + view.SetProperty( ItemView::Property::LAYOUT, layoutArray); // Test "overshootEnabled" property diff --git a/build/tizen/dali-toolkit/Makefile.am b/build/tizen/dali-toolkit/Makefile.am index ae70d5e..3220a6c 100644 --- a/build/tizen/dali-toolkit/Makefile.am +++ b/build/tizen/dali-toolkit/Makefile.am @@ -137,7 +137,6 @@ develapibuttonsdir = $(develapicontrolsdir)/buttons develapieffectsviewdir = $(develapicontrolsdir)/effects-view develapigaussianblurviewdir = $(develapicontrolsdir)/gaussian-blur-view develapimagnifierdir = $(develapicontrolsdir)/magnifier -develapiitemviewdir = $(develapicontrolsdir)/scrollable/item-view develapiscrollviewdir = $(develapicontrolsdir)/scrollable/scroll-view develapiscrollbardir = $(develapicontrolsdir)/scroll-bar develapinavigationviewdir = $(develapicontrolsdir)/navigation-view @@ -168,7 +167,6 @@ develapieffectsview_HEADERS = $(devel_api_effects_view_header_files) develapifocusmanager_HEADERS = $(devel_api_focus_manager_header_files) develapigaussianblurview_HEADERS = $(devel_api_gaussian_blur_view_header_files) develapiimageloader_HEADERS = $(devel_api_image_loader_header_files) -develapiitemview_HEADERS = $(devel_api_item_view_header_files) develapiscrollview_HEADERS = $(devel_api_scroll_view_header_files) develapiscrollbar_HEADERS = $(devel_api_scroll_bar_header_files) develapimagnifier_HEADERS = $(devel_api_magnifier_header_files) diff --git a/dali-toolkit/dali-toolkit.h b/dali-toolkit/dali-toolkit.h index fe666f7..35d9d9c 100644 --- a/dali-toolkit/dali-toolkit.h +++ b/dali-toolkit/dali-toolkit.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h b/dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h deleted file mode 100644 index 50168ea..0000000 --- a/dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef DALI_TOOLKIT_ITEM_VIEW_DEVEL_H -#define DALI_TOOLKIT_ITEM_VIEW_DEVEL_H - -/* - * Copyright (c) 2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// INTERNAL INCLUDES -#include - -namespace Dali -{ - -namespace Toolkit -{ - -namespace DevelItemView -{ - -namespace Property -{ - -enum -{ - // Event side properties - MINIMUM_SWIPE_SPEED = Dali::Toolkit::ItemView::Property::MINIMUM_SWIPE_SPEED, - MINIMUM_SWIPE_DISTANCE = Dali::Toolkit::ItemView::Property::MINIMUM_SWIPE_DISTANCE, - WHEEL_SCROLL_DISTANCE_STEP = Dali::Toolkit::ItemView::Property::WHEEL_SCROLL_DISTANCE_STEP, - SNAP_TO_ITEM_ENABLED = Dali::Toolkit::ItemView::Property::SNAP_TO_ITEM_ENABLED, - REFRESH_INTERVAL = Dali::Toolkit::ItemView::Property::REFRESH_INTERVAL, - - /** - * @brief The layout used. - * @details Name "layout", type Property::ARRAY - * @see SetLayout() - */ - LAYOUT = REFRESH_INTERVAL + 1, - - // Animatable properties - LAYOUT_POSITION = Dali::Toolkit::ItemView::Property::LAYOUT_POSITION, - SCROLL_SPEED = Dali::Toolkit::ItemView::Property::SCROLL_SPEED, - OVERSHOOT = Dali::Toolkit::ItemView::Property::OVERSHOOT, - SCROLL_DIRECTION = Dali::Toolkit::ItemView::Property::SCROLL_DIRECTION, - LAYOUT_ORIENTATION = Dali::Toolkit::ItemView::Property::LAYOUT_ORIENTATION, - SCROLL_CONTENT_SIZE = Dali::Toolkit::ItemView::Property::SCROLL_CONTENT_SIZE -}; - -} // namespace Property - -} // namespace DevelItemView - -} // namespace Toolkit - -} // namespace Dali - -#endif // DALI_TOOLKIT_ITEM_VIEW_DEVEL_H diff --git a/dali-toolkit/devel-api/file.list b/dali-toolkit/devel-api/file.list index 58711f9..cb34265 100644 --- a/dali-toolkit/devel-api/file.list +++ b/dali-toolkit/devel-api/file.list @@ -70,10 +70,6 @@ devel_api_builder_header_files = \ devel_api_effects_view_header_files = \ $(devel_api_src_dir)/controls/effects-view/effects-view.h -devel_api_item_view_header_files = \ - $(devel_api_src_dir)/controls/scrollable/item-view/default-item-layout-property.h \ - $(devel_api_src_dir)/controls/scrollable/item-view/item-view-devel.h - devel_api_scroll_bar_header_files = \ $(devel_api_src_dir)/controls/scroll-bar/scroll-bar-devel.h diff --git a/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp b/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp index 4cb2043..58731c8 100755 --- a/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -25,7 +25,7 @@ // INTERNAL INCLUDES #include -#include +#include using namespace Dali; using namespace Dali::Toolkit; diff --git a/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp b/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp index d362f05..3e28d80 100755 --- a/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -25,7 +25,7 @@ // INTERNAL INCLUDES #include -#include +#include using namespace Dali; using namespace Dali::Toolkit; diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 9e4f57e..b5fbc4d 100755 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -36,8 +36,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -259,7 +258,7 @@ DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "minimumSwipeDistance", FLO DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "wheelScrollDistanceStep", FLOAT, WHEEL_SCROLL_DISTANCE_STEP ) DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "snapToItemEnabled", BOOLEAN, SNAP_TO_ITEM_ENABLED ) DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "refreshInterval", FLOAT, REFRESH_INTERVAL ) -DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, ItemView, "layout", ARRAY, LAYOUT ) +DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "layout", ARRAY, LAYOUT ) DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ItemView, "layoutPosition", FLOAT, LAYOUT_POSITION) @@ -1755,27 +1754,32 @@ void ItemView::SetProperty( BaseObject* object, Property::Index index, const Pro itemViewImpl.SetMinimumSwipeSpeed( value.Get() ); break; } + case Toolkit::ItemView::Property::MINIMUM_SWIPE_DISTANCE: { itemViewImpl.SetMinimumSwipeDistance( value.Get() ); break; } + case Toolkit::ItemView::Property::WHEEL_SCROLL_DISTANCE_STEP: { itemViewImpl.SetWheelScrollDistanceStep( value.Get() ); break; } + case Toolkit::ItemView::Property::SNAP_TO_ITEM_ENABLED: { itemViewImpl.SetAnchoring( value.Get() ); break; } + case Toolkit::ItemView::Property::REFRESH_INTERVAL: { itemViewImpl.SetRefreshInterval( value.Get() ); break; } - case Toolkit::DevelItemView::Property::LAYOUT: + + case Toolkit::ItemView::Property::LAYOUT: { // Get a Property::Array from the property if possible. Property::Array layoutArray; @@ -1883,33 +1887,37 @@ Property::Value ItemView::GetProperty( BaseObject* object, Property::Index index value = itemViewImpl.GetMinimumSwipeSpeed(); break; } + case Toolkit::ItemView::Property::MINIMUM_SWIPE_DISTANCE: { value = itemViewImpl.GetMinimumSwipeDistance(); break; } + case Toolkit::ItemView::Property::WHEEL_SCROLL_DISTANCE_STEP: { value = itemViewImpl.GetWheelScrollDistanceStep(); break; } + case Toolkit::ItemView::Property::SNAP_TO_ITEM_ENABLED: { value = itemViewImpl.GetAnchoring(); break; } + case Toolkit::ItemView::Property::REFRESH_INTERVAL: { value = itemViewImpl.GetRefreshInterval(); break; } - case Toolkit::DevelItemView::Property::LAYOUT: + + case Toolkit::ItemView::Property::LAYOUT: { Property::Array layouts= itemViewImpl.GetLayoutArray(); value = layouts; break; } - } } diff --git a/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp b/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp index e320fe1..94bf0d6 100755 --- a/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -25,7 +25,7 @@ // INTERNAL INCLUDES #include -#include +#include using namespace Dali; using namespace Dali::Toolkit; diff --git a/dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h b/dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h similarity index 74% rename from dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h rename to dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h index 65d94dd..a416b4d 100755 --- a/dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -26,25 +26,29 @@ namespace Toolkit /** * @brief Default item layout property. + * @SINCE_1_2.60 */ namespace DefaultItemLayoutProperty { /** * @brief The properties of each type of item layout. + * @SINCE_1_2.60 */ enum Property { /** * @brief The type of the Layout. - * @details Name "type", type(Dali::Toolkit::DefaultItemLayout::Type),Property::INTEGER + * @details Name "type", type Dali::Toolkit::DefaultItemLayout::Type (Property::INTEGER). + * @SINCE_1_2.60 * @note Mandatory. */ TYPE = 0, /** * @brief The size of each item in the Layout. - * @details Name "itemSize",Property::VECTOR3 + * @details Name "itemSize", type Property::VECTOR3 + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, see ItemLayout::GetDefaultItemSize(). */ @@ -52,7 +56,8 @@ enum Property /** * @brief The internal orientation of the Layout. - * @details Name "orientation",type(@ref Dali::Toolkit::ControlOrientation::Type),Property::INTEGER + * @details Name "orientation", type Dali::Toolkit::ControlOrientation::Type (Property::INTEGER). + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is ControlOrientation::Up, The contents of control are in a vertical layout, from top to bottom. */ @@ -60,7 +65,8 @@ enum Property /** * @brief The number of columns in the GridLayout. - * @details Name "gridColumnNumber",Property::INTEGER. + * @details Name "gridColumnNumber", type Property::INTEGER. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 4. */ @@ -68,7 +74,8 @@ enum Property /** * @brief The spacing between rows in the GridLayout. - * @details Name "gridRowSpacing",Property::FLOAT + * @details Name "gridRowSpacing", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 20.0f. */ @@ -76,7 +83,8 @@ enum Property /** * @brief The spacing between columns in the GridLayout. - * @details Name "gridColumnSpacing",Property::FLOAT + * @details Name "gridColumnSpacing", type Property::FLOAT + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 20.0f. */ @@ -84,7 +92,8 @@ enum Property /** * @brief The margin in the top of the GridLayout. - * @details Name "gridTopMargin",Property::FLOAT + * @details Name "gridTopMargin", type Property::FLOAT + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 95.0f. */ @@ -92,7 +101,8 @@ enum Property /** * @brief The margin in the bottom of the GridLayout. - * @details Name "gridBottomMargin",Property::FLOAT + * @details Name "gridBottomMargin", type Property::FLOAT + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 20.0f. */ @@ -100,7 +110,8 @@ enum Property /** * @brief The margin in the left and right of the GridLayout. - * @details Name "gridSideMargin",Property::FLOAT + * @details Name "gridSideMargin", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 20.0f. */ @@ -108,7 +119,8 @@ enum Property /** * @brief The factor used to customise the scroll speed while dragging and swiping the GridLayout. - * @details Name "gridScrollSpeedFactor",Property::FLOAT + * @details Name "gridScrollSpeedFactor", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 0.03f. */ @@ -116,7 +128,8 @@ enum Property /** * @brief The maximum swipe speed in pixels per second of GridLayout. - * @details Name "gridMaximumSwipSpeed",Property::FLOAT + * @details Name "gridMaximumSwipSpeed", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 100.0f. */ @@ -124,7 +137,8 @@ enum Property /** * @brief The duration of the flick animation in seconds of GridLayout. - * @details Name "gridItemFlickAnimationDuration",Property::FLOAT + * @details Name "gridItemFlickAnimationDuration", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture. * @note Must be greater than zero;If not supplied, the default is 0.015f. @@ -133,7 +147,8 @@ enum Property /** * @brief The number of columns in the DepthLayout. - * @details Name "depthColumnNumber",Property::INTEGER + * @details Name "depthColumnNumber", type Property::INTEGER. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 3. */ @@ -141,7 +156,8 @@ enum Property /** * @brief The number of rows in the DepthLayout. - * @details Name "depthRowNumber",Property::INTEGER + * @details Name "depthRowNumber", type Property::INTEGER. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 26. */ @@ -149,7 +165,8 @@ enum Property /** * @brief The spacing between rows in the DepthLayout. - * @details Name "depthRowSpacing",Property::FLOAT + * @details Name "depthRowSpacing", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 55.0f. */ @@ -157,7 +174,8 @@ enum Property /** * @brief The factor used to customise the scroll speed while dragging and swiping the DepthLayout. - * @details Name "depthScrollSpeedFactor",Property::FLOAT + * @details Name "depthScrollSpeedFactor", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 0.02f. */ @@ -165,7 +183,8 @@ enum Property /** * @brief The maximumSwipSpeed of the DepthLayout. - * @details Name "depthMaximumSwipSpeed",Property::FLOAT + * @details Name "depthMaximumSwipSpeed", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 50.0f. */ @@ -173,7 +192,8 @@ enum Property /** * @brief The duration of the flick animation in seconds of DepthLayout. - * @details Name "depthItemFlickAnimationDuration",Property::FLOAT + * @details Name "depthItemFlickAnimationDuration", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture. * @note Must be greater than zero; If not supplied, the default is 0.03f. @@ -183,6 +203,7 @@ enum Property /** * @brief The tilt angle of DepthLayout. * @details Name "depthTiltAngle",Property::FLOAT + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is (Math::PI)*0.15f. * @note This is clamped between -45 & 45 degrees. @@ -191,7 +212,8 @@ enum Property /** * @brief The tilt angle of the individual items in the DepthLayout. - * @details Name "depthItemTiltAngle",Property::FLOAT + * @details Name "depthItemTiltAngle", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is -(Math::PI)*0.025f. */ @@ -199,7 +221,8 @@ enum Property /** * @brief The spacing angle between items in the SpiralLayout. - * @details Name "spiralItemSpacing",Property::FLOAT + * @details Name "spiralItemSpacing", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 9.5f. */ @@ -207,7 +230,8 @@ enum Property /** * @brief The factor used to customise the scroll speed while dragging and swiping the SpiralLayout. - * @details Name "spiralScrollSpeedFactor",Property::FLOAT + * @details Name "spiralScrollSpeedFactor", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 0.01f. */ @@ -215,7 +239,8 @@ enum Property /** * @brief The maximum swipe speed in pixels per second of the SpiralLayout. - * @details Name "spiralMaximumSwipSpeed",Property::FLOAT + * @details Name "spiralMaximumSwipSpeed", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 30.0f. */ @@ -223,7 +248,8 @@ enum Property /** * @brief The duration of the flick animation in seconds of the SpiralLayout. - * @details Name "spiralItemFlickAnimationDuration",Property::FLOAT + * @details Name "spiralItemFlickAnimationDuration", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture. * @note Must be greater than zero; If not supplied, the default is 0.1f. @@ -232,7 +258,8 @@ enum Property /** * @brief The vertical distance for one revolution of the SpiralLayout. - * @details Name "spiralRevolutionDistance",Property::FLOAT + * @details Name "spiralRevolutionDistance", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note If not supplied, the default is 190.0f. */ @@ -240,7 +267,8 @@ enum Property /** * @brief The alignment of the top-item, when at the beginning of the SpiralLayout. - * @details Name "spiralTopItemAlignment",Property::FLOAT + * @details Name "spiralTopItemAlignment", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. * @note When at the beginning of the spiral (with a first-item layout-position of zero).A value of 0 indicates that the top-item is centered in the middle of the layout. * A value of -0.5 or 0.5 indicates that the top-item is centred at the top or bottom of the layout respectively. diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp b/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp index 017ac53..04297dd 100755 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -25,7 +25,7 @@ // INTERNAL INCLUDES #include -#include +#include namespace Dali { 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 9cdf1e7..191ef46 100755 --- 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) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -93,20 +93,103 @@ 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, }; }; diff --git a/dali-toolkit/public-api/file.list b/dali-toolkit/public-api/file.list index a922cfc..9909328 100755 --- a/dali-toolkit/public-api/file.list +++ b/dali-toolkit/public-api/file.list @@ -66,6 +66,7 @@ public_api_image_view_header_files = \ public_api_item_view_header_files = \ $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.h \ + $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout-property.h \ $(public_api_src_dir)/controls/scrollable/item-view/item-factory.h \ $(public_api_src_dir)/controls/scrollable/item-view/item-layout.h \ $(public_api_src_dir)/controls/scrollable/item-view/item-view-declarations.h \