-#ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__
-#define __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__
+#ifndef DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H
+#define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
#include <dali/public-api/adaptor-framework/timer.h>
#include <dali/public-api/animation/animation.h>
#include <dali/public-api/object/property-notification.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
Vector2 GetCurrentScrollPosition() const;
/**
- * @copydoc Toolkit::Scrollable::GetDomainSize
- */
- Vector2 GetDomainSize() const;
-
- /**
* @copydoc ScrollTo(const Vector2&)
*/
void TransformTo(const Vector2& position,
- DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone);
+ DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE);
/**
* @copydoc ScrollTo(const Vector2&, float, AlhpaFunction, DirectionBias, DirectionBias)
*/
void TransformTo(const Vector2& position, float duration, AlphaFunction alpha,
- DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone);
+ DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE);
/**
* @copydoc Toolkit::ScrollView::ScrollTo(const Vector2 &position)
/**
* @copydoc Toolkit::ScrollView::ScrollTo(unsigned int page, float duration, DirectionBias bias)
*/
- void ScrollTo(unsigned int page, float duration, DirectionBias bias = DirectionBiasNone);
+ void ScrollTo(unsigned int page, float duration, DirectionBias bias = DIRECTION_BIAS_NONE);
/**
* @copydoc Toolkit::ScrollView::ScrollTo(Actor& actor)
*/
bool AnimateTo(const Vector2& position, const Vector2& positionDuration,
AlphaFunction alpha, bool findShortcuts = true,
- DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone,
- SnapType snapType = Snap);
+ DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE,
+ SnapType snapType = SNAP);
/**
* @copydoc Toolkit::Scrollable::AddOverlay()
void RemoveOverlay(Actor actor);
/**
+ * @copydoc Toolkit::Internal::Scrollable::SetOvershootSize
+ */
+ void SetOvershootSize( const Vector2& size );
+
+ /**
* @copydoc Toolkit::Internal::Scrollable::SetOvershootEffectColor
*/
void SetOvershootEffectColor( const Vector4& color );
virtual void OnChildRemove(Actor& child);
/**
- * From CustomActorImpl; called after a wheelEvent is received by the owning actor.
+ * Called after a wheelEvent is received by the owning actor.
+ * @param[in] actor Actor associated with the event.
* @param[in] event The wheel event.
* @return True if the event should be consumed.
*/
- virtual bool OnWheelEvent(const WheelEvent& event);
+ bool OnWheelEvent(Actor actor, const WheelEvent& event);
/**
* @copydoc Toolkit::Control::OnInitialize()
virtual void OnInitialize();
/**
- * @copydoc CustomActorImpl::OnStageConnection()
+ * @copydoc CustomActorImpl::OnSceneConnection()
*/
- virtual void OnStageConnection( int depth );
+ virtual void OnSceneConnection( int depth );
/**
- * @copydoc CustomActorImpl::OnStageDisconnection()
+ * @copydoc CustomActorImpl::OnSceneDisconnection()
*/
- virtual void OnStageDisconnection();
+ virtual void OnSceneDisconnection();
/**
* @copydoc Toolkit::Control::OnAccessibilityPan()
* @param[in] touch The touch information.
* @return True if the event should be consumed.
*/
- bool OnTouch( Actor actor, const TouchData& touch );
+ bool OnTouch( Actor actor, const TouchEvent& touch );
/**
* Start a timer which calls OnTouchDownTimeout()
*
* @param[in] gesture The gesture event.
*/
- void OnGestureEx(Gesture::State state);
+ void OnGestureEx(GestureState state);
/**
* Performs snapping while taking into account Velocity of gesture
*/
void OnScrollUpdateNotification(Dali::PropertyNotification& source);
+ /**
+ * Set up default rulers using a property map
+ * @param[in] scrollModeMap A map defining the characteristics of X and Y scrolling
+ * using either FixedRuler or DefaultRuler.
+ */
+ void SetScrollMode( const Property::Map& scrollModeMap );
+
private:
// Undefined
Constraint mScrollMainInternalPrePositionMaxConstraint;
ScrollOvershootIndicatorPtr mOvershootIndicator;
+ WeakHandle<Toolkit::ScrollBar> mScrollBar;
Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal;
bool mDefaultMaxOvershoot:1; ///< Whether to use default max overshoot or application defined one
bool mCanScrollHorizontal:1; ///< Local value of our property to check against
bool mCanScrollVertical:1; ///< Local value of our property to check against
+ bool mTransientScrollBar:1; ///< True if scroll-bar should be automatically show/hidden during/after panning
};
} // namespace Internal
} // namespace Dali
-#endif // __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__
+#endif // DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H