-#ifndef __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CUBE_EFFECT_H__
-#define __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CUBE_EFFECT_H__
+#ifndef __DALI_TOOLKIT_SCROLL_VIEW_PAGE_PATH_EFFECT_H__
+#define __DALI_TOOLKIT_SCROLL_VIEW_PAGE_PATH_EFFECT_H__
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd.
{
class Actor;
+class Path;
namespace Toolkit
{
namespace Internal DALI_INTERNAL
{
-class ScrollViewPageCubeEffect;
+class ScrollViewPagePathEffect;
}
/**
- * ScrollView Inner Cube-Effect.
+ * ScrollView Page Path Effect.
+ * This effect causes Actors to follow a given path. The opacity of the actor will be 0.0 at
+ * the beginning of the path and will go to 1.0 as it is approximating to half of the path to return
+ * to 0.0 at the end of the path
*
- * This effect cause each page in a scroll-view to rotate round an inner 3D cube.
- * It should be used on the following Actor hierarchy:
*
* ScrollView
* |
* Automatic operation:
* not implemented.
*/
-class DALI_IMPORT_API ScrollViewPageCubeEffect : public ScrollViewEffect
+class DALI_IMPORT_API ScrollViewPagePathEffect : public ScrollViewEffect
{
public:
/**
- * Create an initialized ScrollViewPageCubeEffect.
+ * Create an initialized ScrollViewPagePathEffect.
+ * @param[in] path The path that will be used by the scroll effect
+ * @param[in] forward Vector in page object space which will be aligned with the tangent of the path
+ * @param[in] inputPropertyIndex Index of a property of the scroll-view which will be used as the input for the path.
+ * @param[in] pageSize Size of a page in the scrollview
+ * @param[in] pageCount Total number of pages in the scrollview
* @return A handle to a newly allocated Dali resource.
*/
- static ScrollViewPageCubeEffect New();
+ static ScrollViewPagePathEffect New(Path path, const Vector3& forward, Dali::Property::Index inputPropertyIndex, const Vector3& pageSize, unsigned int pageCount);
/**
- * Create an uninitialized ScrollViewPageCubeEffect; this can be initialized with ScrollViewPageCubeEffect::New()
- * Calling member functions with an uninitialized Toolkit::ScrollViewPageCubeEffect is not allowed.
+ * Create an uninitialized ScrollViewPagePathEffect; this can be initialized with ScrollViewPagePathEffect::New()
+ * Calling member functions with an uninitialized Toolkit::ScrollViewPagePathEffect is not allowed.
*/
- ScrollViewPageCubeEffect();
+ ScrollViewPagePathEffect();
/**
- * Downcast an Object handle to ScrollViewPageCubeEffect. If handle points to a ScrollViewPageCubeEffect the
+ * Downcast an Object handle to ScrollViewPagePathEffect. If handle points to a ScrollViewPagePathEffect the
* downcast produces valid handle. If not the returned handle is left uninitialized.
* @param[in] handle Handle to an object
- * @return handle to a ScrollViewPageCubeEffect or an uninitialized handle
+ * @return handle to a ScrollViewPagePathEffect or an uninitialized handle
*/
- static ScrollViewPageCubeEffect DownCast( BaseHandle handle );
+ static ScrollViewPagePathEffect DownCast( BaseHandle handle );
/**
* Manually apply effect to a page in the scroll-view.
* @param[in] page The page to be affected by this effect.
- * @param[in] angleSwing The maximum amount the child actor should
- * rotate in radians for each axis (X and Y) as the page is scrolled.
+ * @param[in] pageOrder The order of the page in the scroll-view
*/
- void ApplyToPage( Actor page, const Vector2& angleSwing );
+ void ApplyToPage( Actor page, unsigned int pageOrder );
protected:
* This constructor is used by Dali New() methods.
* @param [in] impl A pointer to a newly allocated Dali resource
*/
- explicit DALI_INTERNAL ScrollViewPageCubeEffect( Internal::ScrollViewPageCubeEffect *impl );
+ explicit DALI_INTERNAL ScrollViewPagePathEffect( Internal::ScrollViewPagePathEffect *impl );
};
} // namespace Dali
-#endif // __DALI_TOOLKIT_SCROLL_VIEW_PAGE_CUBE_EFFECT_H__
+#endif // __DALI_TOOLKIT_SCROLL_VIEW_PAGE_PATH_EFFECT_H__