X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftransition-effects%2Fcube-transition-fold-effect-impl.h;h=336557f097b739a6c5940f69fe2c120436d06b67;hp=3b003dc843263f71299084150e237143b61bbc4b;hb=a827febe27e8131e681c24c255472bbbf097905f;hpb=e2eda444afbe82e9591fe198eef339227f90a616 diff --git a/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.h b/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.h index 3b003dc..336557f 100644 --- a/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.h +++ b/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.h @@ -1,26 +1,27 @@ #ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H__ #define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // EXTERNAL INCLUDES // INTERNAL INCLUDES -#include +#include #include namespace Dali @@ -44,7 +45,7 @@ public: /** * @copydoc Toolkit::CubeTransitionFoldEffect::New */ - static Toolkit::CubeTransitionFoldEffect New(unsigned int numRows, unsigned int numColumns, Size viewAreaSize); + static Toolkit::CubeTransitionFoldEffect New( unsigned int numRows, unsigned int numColumns ); protected: @@ -58,32 +59,21 @@ protected: */ virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement ); - /** - * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStopTransition - */ - virtual void OnStopTransition(); private: /** * Construct a new CubeTransitionFoldEffect object * @param[in] numRows How many rows of cubes * @param[in] numColumns How many columns of cubes - * @param[in] viewAreaSize The size of view area for this transition effect */ - CubeTransitionFoldEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize ); + CubeTransitionFoldEffect( unsigned int numRows, unsigned int numColumns ); /** * Set up animation to an Actor * @param[in] actorIndex The index of the cube in the cube array * @param[in] angle The angle of the rotation animation - * @param[in] resetTranslation The translation used to reset the actor position before animation */ - - void SetupAnimation( unsigned int actorIndex, float angle, Vector3 resetTranslation ); - -private: - - static const float mDisplacementRatio; + void SetupAnimation( unsigned int actorIndex, unsigned int x, float angle ); }; //class CubeTransitionFoldEffect @@ -91,22 +81,22 @@ private: // Helpers for public-api forwarding methods -inline Internal::CubeTransitionFoldEffect& GetImpl(Dali::Toolkit::CubeTransitionFoldEffect& obj) +inline Internal::CubeTransitionFoldEffect& GetImpl( Dali::Toolkit::CubeTransitionFoldEffect& obj ) { - DALI_ASSERT_ALWAYS(obj); + DALI_ASSERT_ALWAYS( obj ); - Dali::BaseObject& handle = obj.GetBaseObject(); + Dali::RefObject& handle = obj.GetImplementation(); - return static_cast(handle); + return static_cast< Internal::CubeTransitionFoldEffect& >( handle ); } -inline const Internal::CubeTransitionFoldEffect& GetImpl(const Dali::Toolkit::CubeTransitionFoldEffect& obj) +inline const Internal::CubeTransitionFoldEffect& GetImpl( const Dali::Toolkit::CubeTransitionFoldEffect& obj ) { - DALI_ASSERT_ALWAYS(obj); + DALI_ASSERT_ALWAYS( obj ); - const Dali::BaseObject& handle = obj.GetBaseObject(); + const Dali::RefObject& handle = obj.GetImplementation(); - return static_cast(handle); + return static_cast< const Internal::CubeTransitionFoldEffect& >( handle ); } } // namespace Toolkit