-#ifndef __DALI_TOOLKIT_INTERNAL_SCROLLABLE_H__
-#define __DALI_TOOLKIT_INTERNAL_SCROLLABLE_H__
+#ifndef DALI_TOOLKIT_INTERNAL_SCROLLABLE_H
+#define DALI_TOOLKIT_INTERNAL_SCROLLABLE_H
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
*
*/
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/alpha-function.h>
+
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
namespace Dali
{
void SetOvershootEnabled(bool enable);
/**
- * Gets the size of the domain (minimum/maximum extents for each axis to scroll to)
- * @return the domain size
- */
- virtual Vector2 GetDomainSize() const = 0;
-
- /**
* Adds actor as an Overlay to Scrollable
* This method is called by Add-on UI components
* such as scroll bars, page indicators.
*/
const Vector2& GetOvershootSize() const;
+ /**
+ * Set the size of the overshoot effect.
+ * @parm[in] size The size of the overshoot effect
+ */
+ virtual void SetOvershootSize( const Vector2& size ) = 0;
+
+protected: // From Control
+ struct AccessibleImpl : public Control::Impl::AccessibleImpl
+ {
+ using Control::Impl::AccessibleImpl::AccessibleImpl;
+
+ bool IsScrollable() override;
+ };
+
+ /**
+ * @copydoc Control::OnInitialize
+ */
+ virtual void OnInitialize() override;
+
private:
/**
protected:
/**
- * Construct a new Scrollable.
+ * Removed default constructor.
*/
- Scrollable();
+ Scrollable() = delete;
/**
* @brief Construct a new Scrollable.
float mOvershootAnimationSpeed; ///<The speed of the overshoot animation (pixels per second)
Vector2 mOvershootSize; ///<The size of the overshoot effect
+ Dali::AlphaFunction::BuiltinFunction mScrollToAlphaFunction; ///< The ScrollTo() animations use this
+
Toolkit::Scrollable::ScrollStartedSignalType mScrollStartedSignal;
Toolkit::Scrollable::ScrollUpdatedSignalType mScrollUpdatedSignal;
Toolkit::Scrollable::ScrollCompletedSignalType mScrollCompletedSignal;
} // namespace Dali
-#endif // __DALI_TOOLKIT_INTERNAL_SCROLLABLE_H__
+#endif // DALI_TOOLKIT_INTERNAL_SCROLLABLE_H