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 Flora License, Version 1.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://floralicense.org/license/
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.
20 #include <dali-toolkit/dali-toolkit.h>
22 class RadialSweepViewImpl;
25 /********************************************************************************
26 * Handle to RadialSweepView implementation
28 class RadialSweepView : public Dali::Toolkit::Control
32 * Create a new RadialSweepView with default parameters (2 second animation,
33 * no rotation, sweeping out a full cicle).
35 static RadialSweepView New( );
38 * Create a new RadialSweepView.
39 * @param[in] duration The duration of the sweep animation
40 * @param[in] diameter The diameter of the stencil mask
41 * @param[in] initialAngle The initial angle of the anticlockwise line of the sweep sector
42 * @param[in] finalAngle The final angle of the anticlockwise line of the sweep sector
43 * @param[in] initialSector The angle of the starting sector
44 * @param[in] finalSector The angle of the sector at the end of the animation.
45 * Note, to cover the entire circle, use a value of 359.9999f, not zero or 360.
50 * initialAngle \ | . final sector
54 static RadialSweepView New( float duration,
56 Dali::Degree initialAngle,
57 Dali::Degree finalAngle,
58 Dali::Degree initialSector,
59 Dali::Degree finalSector );
61 void SetDuration(float duration);
63 void SetEasingFunction( Dali::AlphaFunction easingFunction );
65 void SetDiameter(float diameter);
67 void SetInitialAngle( Dali::Degree initialAngle);
69 void SetFinalAngle( Dali::Degree finalAngle);
71 void SetInitialSector( Dali::Degree initialSector);
73 void SetFinalSector( Dali::Degree finalSector);
75 void SetInitialActorAngle( Dali::Degree initialAngle );
77 void SetFinalActorAngle( Dali::Degree finalAngle );
83 Dali::Degree GetInitialAngle( );
85 Dali::Degree GetFinalAngle( );
87 Dali::Degree GetInitialSector( );
89 Dali::Degree GetFinalSector( );
91 Dali::Degree GetInitialActorAngle( );
93 Dali::Degree GetFinalActorAngle( );
96 * @param[in] rotate True if the actors should rotate with the stencil
98 void RotateActorsWithStencil(bool rotate);
101 * Add actors to the view
103 void Add(Actor actor);
106 * Activate the sweep animation
110 void Activate( Dali::Animation anim, float offsetTime, float duration );
113 * Deactivate the sweep animation
118 * Default constructor. Create an uninitialized handle.
125 RadialSweepView(const RadialSweepView& handle);
128 * Assignment operator
130 RadialSweepView& operator=(const RadialSweepView& rhs);
135 virtual ~RadialSweepView();
140 static RadialSweepView DownCast( BaseHandle handle );
142 public: // Not for use by application developers
144 RadialSweepView( RadialSweepViewImpl& impl );
146 RadialSweepView( Dali::Internal::CustomActor* impl );