1 #ifndef __DALI_TOOLKIT_SCROLL_VIEW_PAGE_SPIRAL_EFFECT_H__
2 #define __DALI_TOOLKIT_SCROLL_VIEW_PAGE_SPIRAL_EFFECT_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 * @addtogroup CAPI_DALI_TOOLKIT_SCROLL_VIEW_MODULE
27 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
29 namespace Dali DALI_IMPORT_API
37 namespace Internal DALI_INTERNAL
39 class ScrollViewPageSpiralEffect;
43 * @brief This effect cause each page in a scroll-view to move along a spiral.
45 * It should be used on the following Actor hierarchy:
51 * You should ensure ScrollView's default constraints have been removed,
52 * by calling ScrollView::RemoveConstraintsFromChildren() before applying
53 * this effect to ScrollView.
56 * ApplyToPage(...) method should be called on every page.
58 * Automatic operation:
61 class ScrollViewPageSpiralEffect : public ScrollViewEffect
67 * @brief Create an initialized ScrollViewPageSpiralEffect.
69 * @return A handle to a newly allocated Dali resource.
71 static ScrollViewPageSpiralEffect New();
74 * @brief Create an uninitialized ScrollViewPageSpiralEffect; this can be initialized with ScrollViewPageSpiralEffect::New().
76 * Calling member functions with an uninitialized Toolkit::ScrollViewPageSpiralEffect is not allowed.
78 ScrollViewPageSpiralEffect();
81 * @brief Downcast an Object handle to ScrollViewPageSpiralEffect.
83 * If handle points to a ScrollViewPageSpiralEffect the
84 * downcast produces valid handle. If not the returned handle is left uninitialized.
85 * @param[in] handle Handle to an object
86 * @return handle to a ScrollViewPageSpiralEffect or an uninitialized handle
88 static ScrollViewPageSpiralEffect DownCast( BaseHandle handle );
91 * @brief Manually apply effect to a page in the scroll-view.
93 * @param[in] page The page to be affected by this effect.
94 * @param[in] spiralAngle The spirald angle (in radians).
96 * @note If the wrap mode of the scroll view is changed, then this needs to be called for every
97 * page again after removing the previous constraints.
99 void ApplyToPage( Actor page, const Vector2& spiralAngle );
104 * @brief This constructor is used by Dali New() methods.
106 * @param [in] impl A pointer to a newly allocated Dali resource
108 ScrollViewPageSpiralEffect( Internal::ScrollViewPageSpiralEffect *impl );
112 } // namespace Toolkit
119 #endif // __DALI_TOOLKIT_SCROLL_VIEW_PAGE_SPIRAL_EFFECT_H__