1 #ifndef DALI_DEMO_RADIAL_SWEEP_VIEW_H
2 #define DALI_DEMO_RADIAL_SWEEP_VIEW_H
5 * Copyright (c) 2014 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.
21 #include <dali-toolkit/dali-toolkit.h>
23 class RadialSweepViewImpl;
26 /********************************************************************************
27 * Handle to RadialSweepView implementation
29 class RadialSweepView : public Dali::Toolkit::Control
33 * Create a new RadialSweepView with default parameters (2 second animation,
34 * no rotation, sweeping out a full cicle).
36 static RadialSweepView New( );
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.9999f, not zero or 360.
51 * initialAngle \ | . final sector
55 static RadialSweepView New( float duration,
57 Dali::Degree initialAngle,
58 Dali::Degree finalAngle,
59 Dali::Degree initialSector,
60 Dali::Degree finalSector );
62 void SetDuration(float duration);
64 void SetEasingFunction( Dali::AlphaFunction easingFunction );
66 void SetDiameter(float diameter);
68 void SetInitialAngle( Dali::Degree initialAngle);
70 void SetFinalAngle( Dali::Degree finalAngle);
72 void SetInitialSector( Dali::Degree initialSector);
74 void SetFinalSector( Dali::Degree finalSector);
76 void SetInitialActorAngle( Dali::Degree initialAngle );
78 void SetFinalActorAngle( Dali::Degree finalAngle );
84 Dali::Degree GetInitialAngle( );
86 Dali::Degree GetFinalAngle( );
88 Dali::Degree GetInitialSector( );
90 Dali::Degree GetFinalSector( );
92 Dali::Degree GetInitialActorAngle( );
94 Dali::Degree GetFinalActorAngle( );
97 * @param[in] rotate True if the actors should rotate with the stencil
99 void RotateActorsWithStencil(bool rotate);
102 * Add actors to the view
104 void Add(Actor actor);
107 * Activate the sweep animation
111 void Activate( Dali::Animation anim, float offsetTime, float duration );
114 * Deactivate the sweep animation
119 * Default constructor. Create an uninitialized handle.
126 RadialSweepView(const RadialSweepView& handle);
129 * Assignment operator
131 RadialSweepView& operator=(const RadialSweepView& rhs);
141 static RadialSweepView DownCast( BaseHandle handle );
143 public: // Not for use by application developers
145 RadialSweepView( RadialSweepViewImpl& impl );
147 RadialSweepView( Dali::Internal::CustomActor* impl );