Merge "[3.0] Removed 3D layer dependency of Model3dView and Mesh Visual." into tizen
[platform/core/uifw/dali-demo.git] / examples / radial-menu / radial-sweep-view.h
1 #ifndef DALI_DEMO_RADIAL_SWEEP_VIEW_H
2 #define DALI_DEMO_RADIAL_SWEEP_VIEW_H
3
4 /*
5  * Copyright (c) 2015 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 #include <dali-toolkit/dali-toolkit.h>
22
23 class RadialSweepViewImpl;
24
25
26 /********************************************************************************
27  * Handle to RadialSweepView implementation
28  */
29 class RadialSweepView : public Dali::Toolkit::Control
30 {
31 public:
32   /**
33    * Create a new RadialSweepView with default parameters (2 second animation,
34    * no rotation, sweeping out a full circle).
35    */
36   static RadialSweepView New( );
37
38   /**
39    * Create a new RadialSweepView.
40    * @param[in] duration The duration of the sweep animation
41    * @param[in] diameter The diameter of the stencil mask
42    * @param[in] initialAngle The initial angle of the anticlockwise line of the sweep sector
43    * @param[in] finalAngle The final angle of the anticlockwise line of the sweep sector
44    * @param[in] initialSector The angle of the starting sector
45    * @param[in] finalSector The angle of the sector at the end of the animation.
46    * Note, to cover the entire circle, use a value of 359.9999 degrees, not zero or 360 degrees.
47    *
48    *            initial sector
49    *             \   |  .
50    *              \  |    .
51    * initialAngle  \ |     .   final sector
52    *                \|      _|
53    *                 .________
54    */
55   static RadialSweepView New( float duration,
56                               float diameter,
57                               Dali::Radian initialAngle,
58                               Dali::Radian finalAngle,
59                               Dali::Radian initialSector,
60                               Dali::Radian finalSector );
61
62   void SetDuration(float duration);
63
64   void SetEasingFunction( Dali::AlphaFunction easingFunction );
65
66   void SetDiameter(float diameter);
67
68   void SetInitialAngle( Dali::Radian initialAngle);
69
70   void SetFinalAngle( Dali::Radian finalAngle);
71
72   void SetInitialSector( Dali::Radian initialSector);
73
74   void SetFinalSector( Dali::Radian finalSector);
75
76   void SetInitialActorAngle( Dali::Radian initialAngle );
77
78   void SetFinalActorAngle( Dali::Radian finalAngle );
79
80   float GetDuration( );
81
82   float GetDiameter( );
83
84   Dali::Radian GetInitialAngle( );
85
86   Dali::Radian GetFinalAngle( );
87
88   Dali::Radian GetInitialSector( );
89
90   Dali::Radian GetFinalSector( );
91
92   Dali::Radian GetInitialActorAngle( );
93
94   Dali::Radian GetFinalActorAngle( );
95
96   /**
97    * @param[in] rotate True if the actors should rotate with the stencil
98    */
99   void RotateActorsWithStencil(bool rotate);
100
101   /**
102    * Add actors to the view
103    */
104   void Add(Actor actor);
105
106   /**
107    * Activate the sweep animation
108    */
109   void Activate( );
110
111   void Activate( Dali::Animation anim, float offsetTime, float duration );
112
113   /**
114    * Deactivate the sweep animation
115    */
116   void Deactivate();
117
118   /**
119    * Default constructor. Create an uninitialized handle.
120    */
121   RadialSweepView();
122
123   /**
124    * Copy constructor
125    */
126   RadialSweepView(const RadialSweepView& handle);
127
128   /**
129    * Assignment operator
130    */
131   RadialSweepView& operator=(const RadialSweepView& rhs);
132
133   /**
134    * Destructor
135    */
136   ~RadialSweepView();
137
138   /**
139    * Downcast method
140    */
141   static RadialSweepView DownCast( BaseHandle handle );
142
143 public: // Not for use by application developers
144
145   RadialSweepView( RadialSweepViewImpl& impl );
146
147   RadialSweepView( Dali::Internal::CustomActor* impl );
148 };
149
150 #endif