X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fnavigation-frame%2Fnavigation-control-impl.cpp;h=3a11d46a48125c67d25a347045ee796703450ee7;hp=ac5244a49108126587ee9fb7a376b3004e8bc13f;hb=153aabfe7332ee884fddf1ab9cb310af77c747d0;hpb=b458e407eba11c73f38da68bce8e967a30ea03e2 diff --git a/dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp b/dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp index ac5244a..3a11d46 100644 --- a/dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp +++ b/dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp @@ -19,16 +19,18 @@ #include "navigation-control-impl.h" // EXTERNAL INCLUDES +#include // for strcmp #include #include #include #include +#include // INTERNAL INCLUDES #include #include #include -#include +#include namespace Dali { @@ -50,15 +52,15 @@ BaseHandle Create() // Setup properties, signals and actions using the type-registry. DALI_TYPE_REGISTRATION_BEGIN( Toolkit::NavigationControl, Toolkit::Control, Create ) -DALI_ACTION_REGISTRATION( NavigationControl, "push", ACTION_PUSH ) -DALI_ACTION_REGISTRATION( NavigationControl, "pop", ACTION_POP ) +DALI_ACTION_REGISTRATION( Toolkit, NavigationControl, "push", ACTION_PUSH ) +DALI_ACTION_REGISTRATION( Toolkit, NavigationControl, "pop", ACTION_POP ) DALI_TYPE_REGISTRATION_END() } NavigationControl::NavigationControl() -: Control( REQUIRES_TOUCH_EVENTS ), +: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS ) ), mToolBar(NULL), mTitleBar(NULL), mOrientationAngle( 0 ), @@ -263,11 +265,12 @@ void NavigationControl::OrientationChanged( int angle ) } } + Actor self = Self(); Animation animation = Animation::New( mOrientationAnimationDuration ); - animation.RotateTo( Self(), Degree( -angle ), Vector3::ZAXIS, mOrientationAnimationAlphaFunc ); + animation.AnimateTo( Property( self, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -angle ) ), Vector3::ZAXIS ), mOrientationAnimationAlphaFunc ); animation.Play(); - Self().SetSize( targetSize ); + self.SetSize( targetSize ); RelayoutRequest(); } @@ -284,7 +287,7 @@ Layer NavigationControl::GetBarLayer() const return mBarLayer; } -void NavigationControl::OnRelayout( const Vector2& size, ActorSizeContainer& container ) +void NavigationControl::OnRelayout( const Vector2& size, RelayoutContainer& container ) { const Vector2 setSize( size ); @@ -307,11 +310,11 @@ void NavigationControl::OnRelayout( const Vector2& size, ActorSizeContainer& con mCurrentItem.SetPosition( mItemPositionCoefficient * positionOffset); Vector2 itemSize( setSize.x, setSize.y-sizeShrink ); - Relayout(mCurrentItem, itemSize, container); + container.Add( mCurrentItem, itemSize ); } - container.push_back(ActorSizePair( mBarLayer, setSize )); - container.push_back(ActorSizePair( mPopupLayer, setSize )); + container.Add( mBarLayer, setSize ); + container.Add( mPopupLayer, setSize ); } void NavigationControl::OnControlSizeSet( const Vector3& size )