X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscroll-component%2Fscroll-bar-internal-impl.cpp;h=3b188df07365f81e2b2d543e4b8c17f09558cffb;hp=bc1293181ea45564f4ba19de6336d64332fa9da7;hb=18088175cb55711d4675c6ea25b1b01022886be5;hpb=49499a0b6e23d98f681f7aefe6b18c5dad55f8b3 diff --git a/dali-toolkit/internal/controls/scroll-component/scroll-bar-internal-impl.cpp b/dali-toolkit/internal/controls/scroll-component/scroll-bar-internal-impl.cpp index bc12931..3b188df 100755 --- a/dali-toolkit/internal/controls/scroll-component/scroll-bar-internal-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-component/scroll-bar-internal-impl.cpp @@ -19,7 +19,11 @@ #include // EXTERNAL INCLUDES +#include +#include +#include #include +#include #include // INTERNAL INCLUDES @@ -358,7 +362,8 @@ BaseHandle Create() return BaseHandle(); } -TypeRegistration mType( typeid(Toolkit::ScrollBarInternal), typeid(Toolkit::ScrollComponent), Create ); +DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollBarInternal, Toolkit::ScrollComponent, Create ) +DALI_TYPE_REGISTRATION_END() } @@ -387,45 +392,45 @@ ScrollBarInternal::ScrollBarInternal(Toolkit::Scrollable& container, bool vertic // target the container to observe for scrolling Actor target = mContainer.Self(); - Constraint constraint = Constraint::New( Actor::VISIBLE, + Constraint constraint = Constraint::New( Actor::Property::VISIBLE, Source( target, vertical ? target.GetPropertyIndex(Scrollable::SCROLLABLE_CAN_SCROLL_VERTICAL) : target.GetPropertyIndex(Scrollable::SCROLLABLE_CAN_SCROLL_HORIZONTAL)), ScrollBarInternalVisibilityConstraint ); mSlider.ApplyConstraint( constraint ); mSliderWrap.ApplyConstraint( constraint ); - constraint = Constraint::New( Actor::SIZE, + constraint = Constraint::New( Actor::Property::SIZE, Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ), - Source( target, Actor::SIZE ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalSizeConstraint( vertical ) ); mSlider.ApplyConstraint( constraint ); mSliderWrap.ApplyConstraint( constraint ); - constraint = Constraint::New( Actor::ROTATION, + constraint = Constraint::New( Actor::Property::ORIENTATION, Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ), ScrollBarInternalRotationConstraint( vertical ) ); mSlider.ApplyConstraint( constraint ); mSliderWrap.ApplyConstraint( constraint ); - constraint = Constraint::New( Actor::POSITION, - Source( mSlider, Actor::SIZE), + constraint = Constraint::New( Actor::Property::POSITION, + Source( mSlider, Actor::Property::SIZE), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_RELATIVE_POSITION_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ), - Source( target, Actor::SIZE ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalPositionConstraint(vertical) ); mSlider.ApplyConstraint( constraint ); - constraint = Constraint::New( Actor::POSITION, - Source( mSlider, Actor::SIZE), + constraint = Constraint::New( Actor::Property::POSITION, + Source( mSlider, Actor::Property::SIZE), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_RELATIVE_POSITION_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME ) ), Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ), - Source( target, Actor::SIZE ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalPositionConstraint(vertical, true) ); mSliderWrap.ApplyConstraint( constraint ); @@ -441,9 +446,9 @@ ScrollBarInternal::ScrollBarInternal(Toolkit::Scrollable& container, bool vertic mHitArea.SetPosition(0.0f, 0.0f, 0.2f); mContainer.AddOverlay( mHitArea ); - constraint = Constraint::New( Actor::SIZE, + constraint = Constraint::New( Actor::Property::SIZE, Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ), - Source( target, Actor::SIZE ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalHitSizeConstraint(vertical, BAR_TAB_SIZE.width) ); mHitArea.ApplyConstraint( constraint ); @@ -553,8 +558,8 @@ void ScrollBarInternal::Show() } mAnimation = Animation::New( BAR_SHOW_TIME ); - mAnimation.OpacityTo( mSlider, 1.0f, AlphaFunctions::EaseIn ); - mAnimation.OpacityTo( mSliderWrap, 1.0f, AlphaFunctions::EaseIn ); + mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn ); + mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn ); mAnimation.Play(); DestructTimer(); @@ -570,8 +575,8 @@ void ScrollBarInternal::Hide() } mAnimation = Animation::New( BAR_HIDE_TIME ); - mAnimation.OpacityTo( mSlider, 0.0f, AlphaFunctions::EaseIn ); - mAnimation.OpacityTo( mSliderWrap, 0.0f, AlphaFunctions::EaseIn ); + mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn ); + mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn ); mAnimation.Play(); }