* @brief True if scroll-bar should be automatically show/hidden during/after panning.
* @details name "transientScrollBar", type bool.
*/
- TRANSIENT_SCROLL_BAR = Toolkit::ScrollView::Property::WHEEL_SCROLL_DISTANCE_STEP + 1
+ TRANSIENT_SCROLL_BAR = Toolkit::ScrollView::Property::WHEEL_SCROLL_DISTANCE_STEP + 1,
+
+ /**
+ * @brief True if ScrollView is panning or scrolling
+ * @details name "panningOrScrolling", type bool.
+ */
+ PANNING_OR_SCROLLING
};
Dali::PropertyRegistration manualProperty1( typeRegistration, "transientScrollBar", TRANSIENT_SCROLL_BAR,
Property::BOOLEAN, Dali::Toolkit::Internal::ScrollView::SetProperty, Dali::Toolkit::Internal::ScrollView::GetProperty );
+Dali::PropertyRegistration manualProperty2( typeRegistration, "panningOrScrolling", PANNING_OR_SCROLLING,
+ Property::BOOLEAN, Dali::Toolkit::Internal::ScrollView::SetProperty, Dali::Toolkit::Internal::ScrollView::GetProperty );
+
DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollPosition", VECTOR2, SCROLL_POSITION)
DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrollPrePosition", VECTOR2, SCROLL_PRE_POSITION)
DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, ScrollView, "scrollPrePositionX", SCROLL_PRE_POSITION_X, SCROLL_PRE_POSITION, 0)
ApplyConstraintToBoundActors(constraint);
}
+bool ScrollView::IsPanningOrScrolling() const
+{
+ bool panningOrScrolling( mPanning );
+
+ if( mInternalXAnimation )
+ {
+ if( Animation::PLAYING == mInternalXAnimation.GetState() )
+ {
+ panningOrScrolling = true;
+ }
+ }
+
+ if( mInternalYAnimation )
+ {
+ if( Animation::PLAYING == mInternalYAnimation.GetState() )
+ {
+ panningOrScrolling = true;
+ }
+ }
+
+ return panningOrScrolling;
+}
+
void ScrollView::SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
{
Toolkit::ScrollView scrollView = Toolkit::ScrollView::DownCast( Dali::BaseHandle( object ) );
scrollViewImpl.SetTransientScrollBar( value.Get<bool>() );
break;
}
+ case PANNING_OR_SCROLLING:
+ {
+ // NOOP
+ break;
+ }
}
}
}
value = scrollViewImpl.mTransientScrollBar;
break;
}
+ case PANNING_OR_SCROLLING:
+ {
+ value = scrollViewImpl.IsPanningOrScrolling();
+ break;
+ }
}
}