#define __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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.
void SetRulerY(RulerPtr ruler);
/**
+ * Retrieve the touch sensitivity.
+ *
+ * @return whether the touch sensitivity is true or false.
+ */
+ bool GetScrollSensitive();
+
+ /**
* @copydoc Toolkit::ScrollView::SetScrollSensitive
*/
void SetScrollSensitive(bool sensitive);
void SetSnapOvershootAlphaFunction(AlphaFunction alpha);
/**
+ * Retrieve the duartion of Snap Overshoot animation
+ *
+ * @return the duration.
+ */
+ float GetSnapOvershootDuration();
+
+ /**
* @copydoc Toolkit::ScrollView::SetSnapOvershootDuration
*/
void SetSnapOvershootDuration(float duration);
/**
+ * Retrieve whether Actor Auto-Snap mode is enabled or not.
+ *
+ * @return Actor Auto-Snap mode Enabled flag.
+ */
+ bool GetActorAutoSnap();
+
+ /**
* @copydoc Toolkit::ScrollView::SetActorAutoSnap
*/
void SetActorAutoSnap(bool enable);
void SetMaxFlickSpeed(float speed);
/**
- * @copydoc Toolkit::ScrollView::GetMouseWheelScrollDistanceStep
+ * @copydoc Toolkit::ScrollView::GetWheelScrollDistanceStep
*/
- Vector2 GetMouseWheelScrollDistanceStep() const;
+ Vector2 GetWheelScrollDistanceStep() const;
/**
- * @copydoc Toolkit::ScrollView::SetMouseWheelScrollDistanceStep
+ * @copydoc Toolkit::ScrollView::SetWheelScrollDistanceStep
*/
- void SetMouseWheelScrollDistanceStep(Vector2 step);
+ void SetWheelScrollDistanceStep(Vector2 step);
/**
* @copydoc Toolkit::ScrollView::GetCurrentPage
Vector2 GetCurrentScrollPosition() const;
/**
- * @copydoc Toolkit::ScrollView::SetScrollPosition
- */
- void SetScrollPosition(const Vector2& position);
-
- /**
* @copydoc Toolkit::Scrollable::GetDomainSize
*/
Vector2 GetDomainSize() const;
*/
void SetOvershootEffectColor( const Vector4& color );
+ //properties
+
+ /**
+ * Called when a property of an object of this type is set.
+ * @param[in] object The object whose property is set.
+ * @param[in] index The property index.
+ * @param[in] value The new property value.
+ */
+ static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
+
+ /**
+ * Called to retrieve a property of an object of this type.
+ * @param[in] object The object whose property is to be retrieved.
+ * @param[in] index The property index.
+ * @return The current value of the property.
+ */
+ static Property::Value GetProperty( BaseObject* object, Property::Index index );
+
public: //Signals
/**
virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
/**
- * @copydoc Dali::Control::OnControlSizeSet(const Vector3&)
+ * @copydoc CustomActorImpl::OnSizeSet(const Vector3&)
*/
- virtual void OnControlSizeSet( const Vector3& size );
+ virtual void OnSizeSet( const Vector3& size );
/**
* From CustomActorImpl; called after a child has been added to the owning actor.
virtual void OnChildRemove(Actor& child);
/**
- * From CustomActorImpl; called after a touch-signal is received by the owning actor.
+ * From CustomActorImpl; called after a touchSignal is received by the owning actor.
*
* We don't listen to these events as content within the contain may consume events.
*
virtual bool OnTouchEvent(const TouchEvent& event);
/**
- * From CustomActorImpl; called after a mouse-wheel-event is received by the owning actor.
- * @param[in] event The mouse wheel event.
+ * From CustomActorImpl; called after a wheelEvent is received by the owning actor.
+ * @param[in] event The wheel event.
* @return True if the event should be consumed.
*/
- virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+ virtual bool OnWheelEvent(const WheelEvent& event);
/**
* @copydoc Toolkit::Control::OnInitialize()
virtual void OnInitialize();
/**
- * @copydoc Toolkit::Control::OnControlStageConnection()
+ * @copydoc CustomActorImpl::OnStageConnection()
*/
- virtual void OnControlStageConnection();
+ virtual void OnStageConnection( int depth );
/**
- * @copydoc Toolkit::Control::OnControlStageConnection()
+ * @copydoc CustomActorImpl::OnStageDisconnection()
*/
- virtual void OnControlStageDisconnection();
+ virtual void OnStageDisconnection();
/**
* @copydoc Toolkit::Control::OnAccessibilityPan()
/**
* This is called internally whenever the Scroll Rulers are
- * modified. This will update the properties: 'scroll-position-min'
- * and 'scroll-position-max' to reflect the changes.
- *
- * @param[in] size size of the visible scroll area (ScrollView control size)
+ * modified. This will update the properties: 'scrollPositionMin'
+ * and 'scrollPositionMax' to reflect the changes.
*/
- void UpdatePropertyDomain(const Vector3& size);
+ void UpdatePropertyDomain();
/**
* Called when the gesture starts.
float mFlickSpeedCoefficient; ///< Flick velocity coefficient. Input touch velocity is multiplied by this.
float mMaxFlickSpeed; ///< Maximum flick speed. Maximum speed of flick in stage.lengths/sec.
- Vector2 mMouseWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates in X and Y axes for each mouse wheel event received.
+ Vector2 mWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates in X and Y axes for each wheel event received.
//ScrollInternalConstraintsPtr mScrollInternalConstraints;
Constraint mScrollMainInternalPrePositionConstraint;
Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal;
- bool mInAccessibilityPan : 1; ///< With AccessibilityPan its easier to move between snap positions
- bool mInitialized:1;
+ bool mInAccessibilityPan:1; ///< With AccessibilityPan its easier to move between snap positions
bool mScrolling:1; ///< Flag indicating whether the scroll view is being scrolled (by user or animation)
bool mScrollInterrupted:1; ///< Flag set for when a down event interrupts a scroll
bool mPanning:1; ///< Whether scroll view is currently panning or not