1 #ifndef __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CAROUSEL_EFFECT_H__
2 #define __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CAROUSEL_EFFECT_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
21 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
23 namespace Dali DALI_IMPORT_API
31 namespace Internal DALI_INTERNAL
33 class ScrollViewPageCarouselEffect;
37 * ScrollView Page Carousel Effect.
39 * This effect cause each page in a scroll-view to rotate round a 3D carousel.
40 * It should be used on the following Actor hierarchy:
46 * You should ensure ScrollView's default constraints have been removed,
47 * by calling ScrollView::RemoveConstraintsFromChildren() before applying
48 * this effect to ScrollView.
51 * ApplyToPage(...) method should be called on every page.
53 * Automatic operation:
56 class ScrollViewPageCarouselEffect : public ScrollViewEffect
62 * Create an initialized ScrollViewPageCarouselEffect.
63 * @return A handle to a newly allocated Dali resource.
65 static ScrollViewPageCarouselEffect New();
68 * Create an uninitialized ScrollViewPageCarouselEffect; this can be initialized with ScrollViewPageCarouselEffect::New()
69 * Calling member functions with an uninitialized Toolkit::ScrollViewPageCarouselEffect is not allowed.
71 ScrollViewPageCarouselEffect();
74 * Downcast an Object handle to ScrollViewPageCarouselEffect. If handle points to a ScrollViewPageCarouselEffect the
75 * downcast produces valid handle. If not the returned handle is left uninitialized.
76 * @param[in] handle Handle to an object
77 * @return handle to a ScrollViewPageCarouselEffect or an uninitialized handle
79 static ScrollViewPageCarouselEffect DownCast( BaseHandle handle );
82 * Manually apply effect to a page in the scroll-view.
83 * @param[in] page The page to be affected by this effect.
84 * @param[in] positionToPageSizeRatio A ratio of the size of the page which determines the amount the page will move as it fades out.
85 * Default is moving it by the page size.
87 void ApplyToPage( Actor page, const Vector2& positionToPageSizeRatio = Vector2::ONE );
92 * This constructor is used by Dali New() methods.
93 * @param [in] impl A pointer to a newly allocated Dali resource
95 ScrollViewPageCarouselEffect( Internal::ScrollViewPageCarouselEffect *impl );
99 } // namespace Toolkit
103 #endif // __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CAROUSEL_EFFECT_H__