- child.ApplyConstraint( constraint );
-
- constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
- LocalSource(Actor::Property::POSITION),
- Source(scrollView, Toolkit::ScrollView::Property::SCROLL_FINAL ),
- Source(scrollView, Toolkit::Scrollable::Property::SCROLL_POSITION_MIN ),
- Source(scrollView, Toolkit::Scrollable::Property::SCROLL_POSITION_MAX ),
- Source(scrollView, Actor::Property::SIZE ),
- Source(scrollView, Toolkit::ScrollView::Property::WRAP ),
- boost::bind( &ScrollPageCarouselEffectInfo::PositionConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
-
+ constraint.Apply();
+
+ constraint = Constraint::New<Vector3>( child, Actor::Property::POSITION, info, &ScrollPageCarouselEffectInfo::PositionConstraint );
+ constraint.AddSource( LocalSource(Actor::Property::POSITION) );
+ constraint.AddSource( Source(scrollView, Toolkit::ScrollView::Property::SCROLL_FINAL ) );
+ constraint.AddSource( Source(scrollView, Toolkit::Scrollable::Property::SCROLL_POSITION_MIN ) );
+ constraint.AddSource( Source(scrollView, Toolkit::Scrollable::Property::SCROLL_POSITION_MAX ) );
+ constraint.AddSource( Source(scrollView, Actor::Property::SIZE ) );
+ constraint.AddSource( Source(scrollView, Toolkit::ScrollView::Property::WRAP ) );