1 #ifndef __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CUBE_EFFECT_H__
2 #define __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CUBE_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 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
24 namespace Dali DALI_IMPORT_API
32 namespace Internal DALI_INTERNAL
34 class ScrollViewPageCubeEffect;
38 * ScrollView Inner Cube-Effect.
40 * This effect cause each page in a scroll-view to rotate round an inner 3D cube.
41 * It should be used on the following Actor hierarchy:
47 * You should ensure ScrollView's default constraints have been removed,
48 * by calling ScrollView::RemoveConstraintsFromChildren() before applying
49 * this effect to ScrollView.
52 * ApplyToPage(...) method should be called on every page.
54 * Automatic operation:
57 class ScrollViewPageCubeEffect : public ScrollViewEffect
63 * Create an initialized ScrollViewPageCubeEffect.
64 * @return A handle to a newly allocated Dali resource.
66 static ScrollViewPageCubeEffect New();
69 * Create an uninitialized ScrollViewPageCubeEffect; this can be initialized with ScrollViewPageCubeEffect::New()
70 * Calling member functions with an uninitialized Toolkit::ScrollViewPageCubeEffect is not allowed.
72 ScrollViewPageCubeEffect();
75 * Downcast an Object handle to ScrollViewPageCubeEffect. If handle points to a ScrollViewPageCubeEffect the
76 * downcast produces valid handle. If not the returned handle is left uninitialized.
77 * @param[in] handle Handle to an object
78 * @return handle to a ScrollViewPageCubeEffect or an uninitialized handle
80 static ScrollViewPageCubeEffect DownCast( BaseHandle handle );
83 * Manually apply effect to a page in the scroll-view.
84 * @param[in] page The page to be affected by this effect.
85 * @param[in] angleSwing The maximum amount the child actor should
86 * rotate in radians for each axis (X and Y) as the page is scrolled.
88 void ApplyToPage( Actor page, const Vector2& angleSwing );
93 * This constructor is used by Dali New() methods.
94 * @param [in] impl A pointer to a newly allocated Dali resource
96 ScrollViewPageCubeEffect( Internal::ScrollViewPageCubeEffect *impl );
100 } // namespace Toolkit
104 #endif // __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CUBE_EFFECT_H__