1 #ifndef DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H
2 #define DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
24 #include <dali-toolkit/devel-api/transition-effects/cube-transition-fold-effect.h>
25 #include <dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h>
31 class CubeTransitionFoldEffect;
35 class CubeTransitionEffect;
37 class CubeTransitionFoldEffect : public CubeTransitionEffect
41 * @copydoc Toolkit::CubeTransitionFoldEffect::New
43 static Toolkit::CubeTransitionFoldEffect New(unsigned int numRows, unsigned int numColumns);
47 * @copydoc Toolkit::CubeTransitionEffect::OnInitialize
49 void OnInitialize() override;
52 * @copydoc Toolkit::CubeTransitionEffect::OnStartTransition
54 void OnStartTransition(Vector2 panPosition, Vector2 panDisplacement) override;
58 * Construct a new CubeTransitionFoldEffect object
59 * @param[in] numRows How many rows of cubes
60 * @param[in] numColumns How many columns of cubes
62 CubeTransitionFoldEffect(unsigned int numRows, unsigned int numColumns);
65 * Set up animation to an Actor
66 * @param[in] actorIndex The index of the cube in the cube array
67 * @param[in] angle The angle of the rotation animation
69 void SetupAnimation(unsigned int actorIndex, unsigned int x, float angle);
71 }; //class CubeTransitionFoldEffect
73 } // namespace Internal
75 // Helpers for public-api forwarding methods
77 inline Internal::CubeTransitionFoldEffect& GetImpl(Dali::Toolkit::CubeTransitionFoldEffect& obj)
79 DALI_ASSERT_ALWAYS(obj);
81 Dali::RefObject& handle = obj.GetImplementation();
83 return static_cast<Internal::CubeTransitionFoldEffect&>(handle);
86 inline const Internal::CubeTransitionFoldEffect& GetImpl(const Dali::Toolkit::CubeTransitionFoldEffect& obj)
88 DALI_ASSERT_ALWAYS(obj);
90 const Dali::RefObject& handle = obj.GetImplementation();
92 return static_cast<const Internal::CubeTransitionFoldEffect&>(handle);
95 } // namespace Toolkit
99 #endif // DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H