X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscroll-component%2Fscroll-bar-internal-impl.cpp;h=e17f1743f122ed11d46473856d26ee87219df9d1;hb=c32e712ddb572650fe0766d7f10a9707db5b5c6b;hp=eb8d82aed433f84ef3b88a177b460e9fd722d0f7;hpb=c8ffcb9f46ded14981915479af62d85970798db5;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 eb8d82a..e17f174 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 @@ -23,6 +23,7 @@ #include #include #include +#include #include // INTERNAL INCLUDES @@ -361,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() } @@ -390,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::Property::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::Property::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::Property::Size ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalSizeConstraint( vertical ) ); mSlider.ApplyConstraint( constraint ); mSliderWrap.ApplyConstraint( constraint ); - constraint = Constraint::New( Actor::Property::Rotation, + constraint = Constraint::New( Actor::Property::ROTATION, Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ), ScrollBarInternalRotationConstraint( vertical ) ); mSlider.ApplyConstraint( constraint ); mSliderWrap.ApplyConstraint( constraint ); - constraint = Constraint::New( Actor::Property::Position, - Source( mSlider, Actor::Property::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::Property::Size ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalPositionConstraint(vertical) ); mSlider.ApplyConstraint( constraint ); - constraint = Constraint::New( Actor::Property::Position, - Source( mSlider, Actor::Property::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::Property::Size ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalPositionConstraint(vertical, true) ); mSliderWrap.ApplyConstraint( constraint ); @@ -444,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::Property::Size, + constraint = Constraint::New( Actor::Property::SIZE, Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ), - Source( target, Actor::Property::Size ), + Source( target, Actor::Property::SIZE ), ScrollBarInternalHitSizeConstraint(vertical, BAR_TAB_SIZE.width) ); mHitArea.ApplyConstraint( constraint );