Merge "Updated @since tags for APIs added since 1.2.0 that are required for Tizen...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / transition-effects / cube-transition-fold-effect-impl.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H__
2 #define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
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>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 class CubeTransitionFoldEffect;
34
35 namespace Internal
36 {
37
38 class CubeTransitionEffect;
39
40 class CubeTransitionFoldEffect : public CubeTransitionEffect
41 {
42
43 public:
44
45   /**
46    * @copydoc Toolkit::CubeTransitionFoldEffect::New
47    */
48   static Toolkit::CubeTransitionFoldEffect New( unsigned int numRows, unsigned int numColumns );
49
50 protected:
51
52    /**
53     * @copydoc Toolkit::CubeTransitionEffect::OnInitialize
54     */
55    virtual void OnInitialize();
56
57    /**
58     * @copydoc Toolkit::CubeTransitionEffect::OnStartTransition
59     */
60    virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement );
61
62 private:
63
64    /**
65     * Construct a new CubeTransitionFoldEffect object
66     * @param[in] numRows How many rows of cubes
67     * @param[in] numColumns How many columns of cubes
68     */
69    CubeTransitionFoldEffect( unsigned int numRows, unsigned int numColumns );
70
71    /**
72     * Set up animation to an Actor
73     * @param[in] actorIndex The index of the cube in the cube array
74     * @param[in] angle The angle of the rotation animation
75     */
76    void SetupAnimation( unsigned int actorIndex, unsigned int x, float angle );
77
78 }; //class CubeTransitionFoldEffect
79
80 } // namespace Internal
81
82 // Helpers for public-api forwarding methods
83
84 inline Internal::CubeTransitionFoldEffect& GetImpl( Dali::Toolkit::CubeTransitionFoldEffect& obj )
85 {
86   DALI_ASSERT_ALWAYS( obj );
87
88   Dali::RefObject& handle = obj.GetImplementation();
89
90   return static_cast< Internal::CubeTransitionFoldEffect& >( handle );
91 }
92
93 inline const Internal::CubeTransitionFoldEffect& GetImpl( const Dali::Toolkit::CubeTransitionFoldEffect& obj )
94 {
95   DALI_ASSERT_ALWAYS( obj );
96
97   const Dali::RefObject& handle = obj.GetImplementation();
98
99   return static_cast< const Internal::CubeTransitionFoldEffect& >( handle );
100 }
101
102 } // namespace Toolkit
103
104 } // namespace Dali
105
106 #endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H_ */