#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h>
#include <dali/integration-api/debug.h>
+#define ENABLED_SCROLL_STATE_LOGGING
+
+#ifdef ENABLED_SCROLL_STATE_LOGGING
+#define DALI_LOG_SCROLL_STATE(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s:%d " format, __PRETTY_FUNCTION__, __LINE__, ## args)
+#else
+#define DALI_LOG_SCROLL_STATE(format, args...)
+#endif
+
// TODO: Change to two class system:
// 1. DraggableActor (is an actor which can be dragged anywhere/scaled/rotated, can be set to range using the ruler)
// 2. ScrollView (contains a draggable actor that can a) be dragged in the negative X, and Y domain, b) has a hitArea for touches)
void ScrollView::OnControlStageConnection()
{
+ DALI_LOG_SCROLL_STATE("[0x%X]", this);
+
if ( mSensitive )
{
SetScrollSensitive( false );
void ScrollView::OnControlStageDisconnection()
{
+ DALI_LOG_SCROLL_STATE("[0x%X]", this);
+
StopAnimation();
}
ScrollView::~ScrollView()
{
+ DALI_LOG_SCROLL_STATE("[0x%X]", this);
}
AlphaFunction ScrollView::GetScrollSnapAlphaFunction() const
Actor self = Self();
PanGestureDetector panGesture( GetPanGestureDetector() );
+ DALI_LOG_SCROLL_STATE("[0x%X] sensitive[%d]", this, int(sensitive));
+
if((!mSensitive) && (sensitive))
{
mSensitive = sensitive;
{
// set mScrolling to false, in case user has code that interrogates mScrolling Getter() in complete.
mScrolling = false;
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 1 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
mScrollCompletedSignalV2.Emit( currentScrollPosition );
}
// if not animating, then this pan has completed right now.
Self().SetProperty(mPropertyScrolling, false);
mScrolling = false;
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 2 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
mScrollCompletedSignalV2.Emit( currentScrollPosition );
}
}
self.SetProperty(mPropertyPrePosition, mScrollPrePosition);
Vector3 currentScrollPosition = GetCurrentScrollPosition();
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 3 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
mScrollCompletedSignalV2.Emit( currentScrollPosition );
mDomainOffset += deltaPosition - mScrollPostPosition;
}
else if( index == mPropertyPrePosition )
{
+ DALI_LOG_SCROLL_STATE("[0x%X]", this);
propertyValue.Get(mScrollPrePosition);
}
}
UpdateLocalScrollProperties();
Vector3 currentScrollPosition = GetCurrentScrollPosition();
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 4 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
mScrollCompletedSignalV2.Emit( currentScrollPosition );
}
}
mScrolling = false;
// send negative scroll position since scroll internal scroll position works as an offset for actors,
// give applications the position within the domain from the scroll view's anchor position
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 5 [%.2f, %.2f]", this, -mScrollPostPosition.x, -mScrollPostPosition.y);
mScrollCompletedSignalV2.Emit( -mScrollPostPosition );
}
}
mScrolling = false;
Self().SetProperty(mPropertyScrolling, false);
Vector3 currentScrollPosition = GetCurrentScrollPosition();
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 6 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
mScrollCompletedSignalV2.Emit( currentScrollPosition );
}
}