DALI_TYPE_REGISTRATION_END()
-const char* SCROLL_DIRECTION_NAME[] = {"Vertical", "Horizontal"};
-const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"Variable", "Fixed"};
+const char* SCROLL_DIRECTION_NAME[] = {"VERTICAL", "HORIZONTAL"};
+const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"VARIABLE", "FIXED"};
}
mIndicatorHideDuration(DEFAULT_INDICATOR_HIDE_DURATION),
mTransientIndicatorDuration(DEFAULT_INDICATOR_TRANSIENT_DURATION),
mScrollStart(0.0f),
- mGestureDisplacement( Vector3::ZERO ),
+ mGestureDisplacement( Vector2::ZERO ),
mCurrentScrollPosition(0.0f),
- mIndicatorHeightPolicy(Toolkit::ScrollBar::Variable),
+ mIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE),
mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT),
mIndicatorMinimumHeight(DEFAULT_INDICATOR_MINIMUM_HEIGHT),
mIndicatorStartPadding(DEFAULT_INDICATOR_START_PADDING),
}
// Set indicator height according to the indicator's height policy
- if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
+ if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
{
mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
}
{
Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::DownCast(scrollableHandle);
- switch(gesture.state)
+ switch(gesture.GetState())
{
- case Gesture::Started:
+ case Dali::Gesture::Started:
{
if( !mPanProcessTimer )
{
ShowIndicator();
mScrollStart = scrollableHandle.GetCurrentProperty< float >( mPropertyScrollPosition );
- mGestureDisplacement = Vector3::ZERO;
+ mGestureDisplacement = Vector2::ZERO;
mIsPanning = true;
break;
}
- case Gesture::Continuing:
+ case Dali::Gesture::Continuing:
{
- mGestureDisplacement.x += gesture.displacement.x;
- mGestureDisplacement.y += gesture.displacement.y;
+ mGestureDisplacement += gesture.GetDisplacement();
float minScrollPosition = scrollableHandle.GetCurrentProperty<float>( mPropertyMinScrollPosition );
float maxScrollPosition = scrollableHandle.GetCurrentProperty<float>( mPropertyMaxScrollPosition );
void ScrollBar::OnSizeSet( const Vector3& size )
{
- if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
+ if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
{
mIndicator.SetProperty( Actor::Property::SIZE, Vector2( size.width, mIndicatorFixedHeight ) );
}
{
mIndicatorFixedHeight = height;
- if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
+ if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
{
mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
}
void ScrollBar::OnScrollDirectionPropertySet( Property::Value propertyValue )
{
std::string directionName( propertyValue.Get<std::string>() );
- if(directionName == "Vertical")
+ if(directionName == "VERTICAL")
{
- SetScrollDirection(Toolkit::ScrollBar::Vertical);
+ SetScrollDirection(Toolkit::ScrollBar::VERTICAL);
}
- else if(directionName == "Horizontal")
+ else if(directionName == "HORIZONTAL")
{
- SetScrollDirection(Toolkit::ScrollBar::Horizontal);
+ SetScrollDirection(Toolkit::ScrollBar::HORIZONTAL);
}
else
{
void ScrollBar::OnIndicatorHeightPolicyPropertySet( Property::Value propertyValue )
{
std::string policyName( propertyValue.Get<std::string>() );
- if(policyName == "Variable")
+ if(policyName == "VARIABLE")
{
- SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable);
+ SetIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE);
}
- else if(policyName == "Fixed")
+ else if(policyName == "FIXED")
{
- SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
+ SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED);
}
else
{