From 27a47ce10614f4b643f55b1d52e062d9ab2f00aa Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Tue, 3 Oct 2017 17:27:15 +0100 Subject: [PATCH] (ScrollView) Move ScrollMode and related properties to Public API Change-Id: I428b7ba1f78420463592ec21e67958e98b48ec37 --- .../src/dali-toolkit/utc-Dali-ScrollView.cpp | 10 +- build/tizen/dali-toolkit/Makefile.am | 2 - dali-toolkit/dali-toolkit.h | 1 + .../controls/scrollable/scroll-view/scroll-mode.h | 84 -------- .../scrollable/scroll-view/scroll-view-devel.h | 72 ------- dali-toolkit/devel-api/file.list | 4 - .../scrollable/scroll-view/scroll-view-impl.cpp | 7 +- .../controls/scrollable/scroll-view/scroll-mode.h | 105 +++++++++ .../controls/scrollable/scroll-view/scroll-view.h | 236 ++++++++++++++++++--- dali-toolkit/public-api/file.list | 1 + 10 files changed, 321 insertions(+), 201 deletions(-) delete mode 100644 dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-mode.h delete mode 100644 dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-view-devel.h create mode 100644 dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-mode.h diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp index 109658b..99613a5 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp @@ -21,8 +21,6 @@ #include #include #include -#include -#include using namespace Dali; using namespace Toolkit; @@ -646,7 +644,7 @@ int UtcDaliToolkitScrollModeP1(void) rulerMap.Add( ScrollMode::X_AXIS_SNAP_TO_INTERVAL, pageSize.width ); rulerMap.Add( ScrollMode::X_AXIS_SCROLL_BOUNDARY, pageSize.width*3 ); rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, false ); - scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap); + scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap); scrollView.SetWrapMode( false ); scrollView.SetScrollSensitive( true ); @@ -702,7 +700,7 @@ int UtcDaliToolkitScrollModeP2(void) rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true ); rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height ); rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 ); - scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap); + scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap); scrollView.SetWrapMode( false ); scrollView.SetScrollSensitive( true ); @@ -758,7 +756,7 @@ int UtcDaliToolkitScrollModeP3(void) rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true ); rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height ); rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 ); - scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap); + scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap); scrollView.SetWrapMode( false ); scrollView.SetScrollSensitive( true ); @@ -812,7 +810,7 @@ int UtcDaliToolkitScrollModeP4(void) Property::Map rulerMap; rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, true ); rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true ); - scrollView.SetProperty( DevelScrollView::Property::SCROLL_MODE, rulerMap); + scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap); scrollView.SetWrapMode( false ); scrollView.SetScrollSensitive( true ); diff --git a/build/tizen/dali-toolkit/Makefile.am b/build/tizen/dali-toolkit/Makefile.am index 3220a6c..587d3b6 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 -develapiscrollviewdir = $(develapicontrolsdir)/scrollable/scroll-view develapiscrollbardir = $(develapicontrolsdir)/scroll-bar develapinavigationviewdir = $(develapicontrolsdir)/navigation-view develapipageturnviewdir = $(develapicontrolsdir)/page-turn-view @@ -167,7 +166,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) -develapiscrollview_HEADERS = $(devel_api_scroll_view_header_files) develapiscrollbar_HEADERS = $(devel_api_scroll_bar_header_files) develapimagnifier_HEADERS = $(devel_api_magnifier_header_files) develapinavigationview_HEADERS = $(devel_api_navigation_view_header_files) diff --git a/dali-toolkit/dali-toolkit.h b/dali-toolkit/dali-toolkit.h index 2ce8e89..bb75489 100644 --- a/dali-toolkit/dali-toolkit.h +++ b/dali-toolkit/dali-toolkit.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-mode.h b/dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-mode.h deleted file mode 100644 index 1f55038..0000000 --- a/dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-mode.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef DALI_TOOLKIT_DEVEL_API_SCROLL_VIEW_SCROLL_MODE_H -#define DALI_TOOLKIT_DEVEL_API_SCROLL_VIEW_SCROLL_MODE_H -/* - * 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. - * 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. - */ -namespace Dali -{ -namespace Toolkit -{ -namespace ScrollMode -{ - -enum Type -{ - /** - * @brief True if the content can be scrolled in X axis or false if - * not. - * - * @details Name "xAxisScrollEnabled", type Property::BOOLEAN - */ - X_AXIS_SCROLL_ENABLED, - - /** - * @brief When set, causes scroll view to snap to multiples of the - * value of the interval in the X axis while flicking. - * - * By default, there is no snapping. - * @details Name "xAxisSnapToInterval", type Property::FLOAT - */ - X_AXIS_SNAP_TO_INTERVAL, - - /** - * @brief When set, causes scroll view unable to scroll beyond the - * value of the boundary in the X axis. - * - * By default, there is no boundary. - * @details Name "xAxisScrollBoundary", type Property::FLOAT - */ - X_AXIS_SCROLL_BOUNDARY, - - /** - * @brief True if the content can be scrolled in Y axis or false if - * not. - * - * @details Name "yAxisScrollEnabled", type Property::BOOLEAN - */ - Y_AXIS_SCROLL_ENABLED, - - /** - * @brief When set, causes scroll view to snap to multiples of the - * value of the interval in the Y axis while flicking. - * - * By default, there is no snapping. - * @details Name "yAxisSnapToInterval", type Property::FLOAT - */ - Y_AXIS_SNAP_TO_INTERVAL, - - /** - * @brief When set, causes scroll view unable to scroll beyond the - * value of the boundary in the Y axis. - * - * By default, there is no boundary. - * @details Name "yAxisScrollBoundary", type Property::FLOAT - */ - Y_AXIS_SCROLL_BOUNDARY -}; - -} // ScrollMode -} // toolkit -} // Dali - -#endif //DALI_TOOLKIT_DEVEL_API_SCROLL_VIEW_SCROLL_MODE_H diff --git a/dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-view-devel.h b/dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-view-devel.h deleted file mode 100644 index ca5b34c..0000000 --- a/dali-toolkit/devel-api/controls/scrollable/scroll-view/scroll-view-devel.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef DALI_TOOLKIT_SCROLL_VIEW_DEVEL_H -#define DALI_TOOLKIT_SCROLL_VIEW_DEVEL_H - -/* - * 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. - * 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 DevelScrollView -{ - -namespace Property -{ - -enum -{ - // Event side properties - - WRAP_ENABLED = Dali::Toolkit::ScrollView::Property::WRAP_ENABLED, - PANNING_ENABLED = Dali::Toolkit::ScrollView::Property::PANNING_ENABLED, - AXIS_AUTO_LOCK_ENABLED = Dali::Toolkit::ScrollView::Property::AXIS_AUTO_LOCK_ENABLED, - WHEEL_SCROLL_DISTANCE_STEP = Dali::Toolkit::ScrollView::Property::WHEEL_SCROLL_DISTANCE_STEP, - - /** - * @brief The scroll mode - * @details Name "scrollMode", type Property::MAP - * The scroll mode map is a frontend for the Ruler helper class, containing the following keys: - * - * | %Property Name | Type | Required | Description | - * |----------------------|----------|----------|---------------------------------------------------------------------------------------------------------------------------------------| - * | xAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in X axis or false if not. | - * | xAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the X axis while flicking. (by default no snapping) | - * | xAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the X axis (by default no boundary) | - * | yAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in Y axis or false if not. | - * | yAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the Y axis while flicking. (by default no snapping) | - * | yAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the Y axis (by default no boundary) | - * - * Alternatively, one can use the keys defined in the Dali::Toolkit::ScrollMode::Type enumeration. - */ - SCROLL_MODE = WHEEL_SCROLL_DISTANCE_STEP + 1, -}; - -} // namespace Property - -} // namespace DevelScrollView - -} // namespace Toolkit - -} // namespace Dali - -#endif // DALI_TOOLKIT_SCROLL_VIEW_DEVEL_H diff --git a/dali-toolkit/devel-api/file.list b/dali-toolkit/devel-api/file.list index 65ef332..caad422 100644 --- a/dali-toolkit/devel-api/file.list +++ b/dali-toolkit/devel-api/file.list @@ -111,10 +111,6 @@ devel_api_scripting_header_files = \ $(devel_api_src_dir)/scripting/script.h \ $(devel_api_src_dir)/scripting/script-plugin.h -devel_api_scroll_view_header_files = \ - $(devel_api_src_dir)/controls/scrollable/scroll-view/scroll-mode.h \ - $(devel_api_src_dir)/controls/scrollable/scroll-view/scroll-view-devel.h - devel_api_shader_effects_header_files = \ $(devel_api_src_dir)/shader-effects/alpha-discard-effect.h \ $(devel_api_src_dir)/shader-effects/dissolve-effect.h \ diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp index d422e6e..163c248 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -34,8 +34,7 @@ #include #include #include -#include -#include +#include #include #include @@ -252,7 +251,7 @@ DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "wrapEnabled", B DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "panningEnabled", BOOLEAN, PANNING_ENABLED ) DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "axisAutoLockEnabled", BOOLEAN, AXIS_AUTO_LOCK_ENABLED ) DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "wheelScrollDistanceStep", VECTOR2, WHEEL_SCROLL_DISTANCE_STEP ) -DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollMode", MAP, SCROLL_MODE ) +DALI_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollMode", MAP, SCROLL_MODE ) DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollPosition", VECTOR2, SCROLL_POSITION) DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollPrePosition", VECTOR2, SCROLL_PRE_POSITION) @@ -2909,7 +2908,7 @@ void ScrollView::SetProperty( BaseObject* object, Property::Index index, const P scrollViewImpl.SetWheelScrollDistanceStep( value.Get() ); break; } - case Toolkit::DevelScrollView::Property::SCROLL_MODE: + case Toolkit::ScrollView::Property::SCROLL_MODE: { Property::Map* map = value.GetMap(); if( map ) diff --git a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-mode.h b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-mode.h new file mode 100644 index 0000000..53b1f83 --- /dev/null +++ b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-mode.h @@ -0,0 +1,105 @@ +#ifndef DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H +#define DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H + +/* + * 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. + * 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. + */ + +namespace Dali +{ + +namespace Toolkit +{ + +/** + * @addtogroup dali_toolkit_controls_scroll_view + * @{ + */ + +/** + * @brief Properties to use in a Property::MAP when setting a ScrollView's scroll mode. + * @SINCE_1_2.60 + */ +namespace ScrollMode +{ + +/** + * @brief Properties to use in a Property::MAP when setting a ScrollView's scroll mode. + * @SINCE_1_2.60 + */ +enum Type +{ + /** + * @brief Whether the content can be scrolled along the X axis or not. + * @details Name "xAxisScrollEnabled", type Property::BOOLEAN. + * @SINCE_1_2.60 + */ + X_AXIS_SCROLL_ENABLED, + + /** + * @brief When set, causes scroll view to snap to multiples of the + * value of the interval while flicking along the X axis. + * @details Name "xAxisSnapToInterval", type Property::FLOAT + * @SINCE_1_2.60 + * @note By default, there is no snapping. + */ + X_AXIS_SNAP_TO_INTERVAL, + + /** + * @brief When set, the scroll view is unable to scroll beyond the + * value of the boundary along the X axis. + * @details Name "xAxisScrollBoundary", type Property::FLOAT. + * @SINCE_1_2.60 + * @note By default, there is no boundary. + */ + X_AXIS_SCROLL_BOUNDARY, + + /** + * @brief Whether the content can be scrolled along the Y axis or not. + * @details Name "yAxisScrollEnabled", type Property::BOOLEAN + * @SINCE_1_2.60 + */ + Y_AXIS_SCROLL_ENABLED, + + /** + * @brief When set, causes scroll view to snap to multiples of the + * value of the interval while flicking along the Y axis. + * @details Name "yAxisSnapToInterval", type Property::FLOAT. + * @SINCE_1_2.60 + * @note By default, there is no snapping. + */ + Y_AXIS_SNAP_TO_INTERVAL, + + /** + * @brief When set, the scroll view is unable to scroll beyond the + * value of the boundary along the Y axis. + * @details Name "yAxisScrollBoundary", type Property::FLOAT. + * @SINCE_1_2.60 + * @note By default, there is no boundary. + */ + Y_AXIS_SCROLL_BOUNDARY +}; + +} // ScrollMode + +/** + * @} + */ + +} // namespace Toolkit + +} // namespace Dali + +#endif // DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H diff --git a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h index 1a0e3fb..646f397 100644 --- a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h +++ b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_SCROLL_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. @@ -503,33 +503,211 @@ public: */ enum { - // Event side properties - WRAP_ENABLED = PROPERTY_START_INDEX, ///< Property, name "wrapEnabled", @see SetWrapMode(), type bool, @SINCE_1_1.18 - PANNING_ENABLED, ///< Property, name "panningEnabled", @see SetScrollSensitive(), type bool, @SINCE_1_1.18 - AXIS_AUTO_LOCK_ENABLED, ///< Property, name "axisAutoLockEnabled", @see SetAxisAutoLock(), type bool, @SINCE_1_1.18 - WHEEL_SCROLL_DISTANCE_STEP, ///< Property, name "wheelScrollDistanceStep", @see SetWheelScrollDistanceStep(), type Vector2, @SINCE_1_1.18 - - SCROLL_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "scrollPosition", type Vector2 @SINCE_1_0.0 - SCROLL_PRE_POSITION, ///< Property, name "scrollPrePosition", type Vector2 @SINCE_1_0.0 - SCROLL_PRE_POSITION_X, ///< Property, name "scrollPrePositionX", type float @SINCE_1_0.0 - SCROLL_PRE_POSITION_Y, ///< Property, name "scrollPrePositionY", type float @SINCE_1_0.0 - SCROLL_PRE_POSITION_MAX, ///< Property, name "scrollPrePositionMax", type Vector2 @SINCE_1_0.0 - SCROLL_PRE_POSITION_MAX_X, ///< Property, name "scrollPrePositionMaxX", type float @SINCE_1_0.0 - SCROLL_PRE_POSITION_MAX_Y, ///< Property, name "scrollPrePositionMaxY", type float @SINCE_1_0.0 - OVERSHOOT_X, ///< Property, name "overshootX", type float @SINCE_1_0.0 - OVERSHOOT_Y, ///< Property, name "overshootY", type float @SINCE_1_0.0 - SCROLL_FINAL, ///< Property, name "scrollFinal", type Vector2 @SINCE_1_0.0 - SCROLL_FINAL_X, ///< Property, name "scrollFinalX", type float @SINCE_1_0.0 - SCROLL_FINAL_Y, ///< Property, name "scrollFinalY", type float @SINCE_1_0.0 - WRAP, ///< Property, name "wrap", type bool @SINCE_1_0.0 - PANNING, ///< Property, name "panning", type bool @SINCE_1_0.0 - SCROLLING, ///< Property, name "scrolling", type bool @SINCE_1_0.0 - SCROLL_DOMAIN_SIZE, ///< Property, name "scrollDomainSize", type Vector2 @SINCE_1_0.0 - SCROLL_DOMAIN_SIZE_X, ///< Property, name "scrollDomainSizeX", type float @SINCE_1_0.0 - SCROLL_DOMAIN_SIZE_Y, ///< Property, name "scrollDomainSizeY", type float @SINCE_1_0.0 - SCROLL_DOMAIN_OFFSET, ///< Property, name "scrollDomainOffset", type Vector2 @SINCE_1_0.0 - SCROLL_POSITION_DELTA, ///< Property, name "scrollPositionDelta", type Vector2 @SINCE_1_0.0 - START_PAGE_POSITION ///< Property, name "startPagePosition", type Vector3 @SINCE_1_0.0 + /////////////////////////////////////////////////////////////////////////////// + // Event side (non-animatable) properties + /////////////////////////////////////////////////////////////////////////////// + + /** + * @brief Whether wrapping is enabled. + * @details Name "wrapEnabled", type Property::BOOLEAN. + * @SINCE_1_1.18 + * @see SetWrapMode() + */ + WRAP_ENABLED = PROPERTY_START_INDEX, + + /** + * @brief Whether panning is enabled. + * @details Name "panningEnabled", type Property::BOOLEAN. + * @SINCE_1_1.18 + * @see SetScrollSensitive() + */ + PANNING_ENABLED, + + /** + * @brief Whether the Axis Auto Lock mode for panning within the ScrollView is enabled. + * @details Name "axisAutoLockEnabled", type Property::BOOLEAN. + * @SINCE_1_1.18 + * @see SetAxisAutoLock() + */ + AXIS_AUTO_LOCK_ENABLED, + + /** + * @brief The step of scroll distance in actor coordinates for each wheel event received in free panning mode. + * @details Name "wheelScrollDistanceStep", type Property::VECTOR2. + * @SINCE_1_1.18 + * @see SetWheelScrollDistanceStep() + */ + WHEEL_SCROLL_DISTANCE_STEP, + + /** + * @brief The scroll mode. + * @details Name "scrollMode", type Property::MAP. + * The scroll mode map is a frontend for the Ruler helper class, containing the following keys: + * + * | %Property Name | Type | Required | Description | + * |----------------------|----------|----------|---------------------------------------------------------------------------------------------------------------------------------------| + * | xAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in X axis or false if not. | + * | xAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the X axis while flicking. (by default no snapping) | + * | xAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the X axis (by default no boundary) | + * | yAxisScrollEnabled | BOOLEAN | No | True if the content can be scrolled in Y axis or false if not. | + * | yAxisSnapToInterval | FLOAT | No | When set, causes scroll view to snap to multiples of the value of the interval in the Y axis while flicking. (by default no snapping) | + * | yAxisScrollBoundary | FLOAT | No | When set, causes scroll view unable to scroll beyond the value of the boundary in the Y axis (by default no boundary) | + * + * Alternatively, one can use the keys defined in the Dali::Toolkit::ScrollMode::Type enumeration. + * @SINCE_1_2.60 + */ + SCROLL_MODE, + + /////////////////////////////////////////////////////////////////////////////// + // Animatable Properties + /////////////////////////////////////////////////////////////////////////////// + + /** + * @brief The current scroll position. + * @details Name "scrollPosition", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_POSITION = ANIMATABLE_PROPERTY_START_INDEX, + + /** + * @brief The position before we set the clamp at scroll boundaries. + * @details Name "scrollPrePosition", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_PRE_POSITION, + + /** + * @brief The X component of SCROLL_PRE_POSITION. + * @details Name "scrollPrePositionX", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_PRE_POSITION_X, + + /** + * @brief The Y component of SCROLL_PRE_POSITION. + * @details Name "scrollPrePositionY", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_PRE_POSITION_Y, + + /** + * @brief The maximum value that SCROLL_PRE_POSITION can be. + * @details Name "scrollPrePositionMax", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_PRE_POSITION_MAX, + + /** + * @brief The X component of SCROLL_PRE_POSITION_MAX. + * @details Name "scrollPrePositionMaxX", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_PRE_POSITION_MAX_X, + + /** + * @brief The Y component of SCROLL_PRE_POSITION_MAX. + * @details Name "scrollPrePositionMaxY", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_PRE_POSITION_MAX_Y, + + /** + * @brief The amount that we can scroll beyond the boundary along the X axis. + * @details Name "overshootX", type Property::FLOAT. + * @SINCE_1_0.0 + */ + OVERSHOOT_X, + + /** + * @brief The amount that we can scroll beyond the boundary along the Y axis. + * @details Name "overshootY", type Property::FLOAT. + * @SINCE_1_0.0 + */ + OVERSHOOT_Y, + + /** + * @brief The position after the overshoot value has been considered in the calculation. + * @details Name "scrollFinal", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_FINAL, + + /** + * @brief The X component of SCROLL_FINAL. + * @details Name "scrollFinalX", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_FINAL_X, + + /** + * @brief The Y component of SCROLL_FINAL. + * @details Name "scrollFinalY", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_FINAL_Y, + + /** + * @brief Whether scrolling wraps. + * @details Name "wrap", type Property::BOOLEAN. + * @SINCE_1_0.0 + */ + WRAP, + + /** + * @brief Whether we are currently panning. + * @details Name "panning", type Property::BOOLEAN. + * @SINCE_1_0.0 + */ + PANNING, + + /** + * @brief Whether we are currently scrolling. + * @details Name "scrolling", type Property::BOOLEAN. + * @SINCE_1_0.0 + */ + SCROLLING, + + /** + * @brief The size of the scrolling domain. + * @details Name "scrollDomainSize", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_DOMAIN_SIZE, + + /** + * @brief The X component of SCROLL_DOMAIN_SIZE. + * @details Name "scrollDomainSizeX", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_DOMAIN_SIZE_X, + + /** + * @brief The Y component of SCROLL_DOMAIN_SIZE. + * @details Name "scrollDomainSizeY", type Property::FLOAT. + * @SINCE_1_0.0 + */ + SCROLL_DOMAIN_SIZE_Y, + + /** + * @brief The offset of the scroll domain. + * @details Name "scrollDomainOffset", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_DOMAIN_OFFSET, + + /** + * @brief The delta in the position when scrolling. + * @details Name "scrollPositionDelta", type Property::VECTOR2. + * @SINCE_1_0.0 + */ + SCROLL_POSITION_DELTA, + + /** + * @brief The starting page position. + * @details Name "startPagePosition", type Property::VECTOR3. + * @SINCE_1_0.0 + */ + START_PAGE_POSITION, }; }; @@ -690,7 +868,7 @@ public: void SetRulerY(RulerPtr ruler); /** - * @brief Sets scroll sensibility of pan gesture. + * @brief Sets scroll sensitivity of pan gesture. * * @SINCE_1_0.0 * @param[in] sensitive @c true to enable scroll, @c false to disable scrolling diff --git a/dali-toolkit/public-api/file.list b/dali-toolkit/public-api/file.list index 2076772..275ed9c 100755 --- a/dali-toolkit/public-api/file.list +++ b/dali-toolkit/public-api/file.list @@ -87,6 +87,7 @@ public_api_scroll_bar_header_files = \ $(public_api_src_dir)/controls/scroll-bar/scroll-bar.h public_api_scroll_view_header_files = \ + $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-mode.h \ $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-constraints.h \ $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-effect.h \ $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-path-effect.h \ -- 2.7.4