|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Base class for timed animations |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 * @internal reviewed 12/07/2007 by Michael Yip |
|
23 */ |
|
24 |
|
25 #ifndef C_GLXANIMATIONTIMED_H |
|
26 #define C_GLXANIMATIONTIMED_H |
|
27 |
|
28 #include <alf/alfeventhandler.h> |
|
29 |
|
30 // INTERNAL INCLUDES |
|
31 #include "mglxanimation.h" |
|
32 |
|
33 // FORWARD DECLARES |
|
34 class CGlxUiUtility; |
|
35 |
|
36 /** |
|
37 * Base class for timed animations |
|
38 */ |
|
39 class CGlxAnimationTimed : public CBase, public MGlxAnimation, public MAlfEventHandler |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Constructor |
|
44 */ |
|
45 CGlxAnimationTimed(); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 */ |
|
50 ~CGlxAnimationTimed(); |
|
51 |
|
52 private: // From MGlxAnimation |
|
53 void AnimateL( TInt aTime, MGlxAnimationObserver* aObserver ); |
|
54 |
|
55 private: // From MAlfEventHandler |
|
56 TBool OfferEventL( const TAlfEvent &aEvent ); |
|
57 |
|
58 protected: |
|
59 |
|
60 /** |
|
61 * Start the animation using the supplied timed value |
|
62 * @param aTimer Timer to use for the animation. @see MGlxAnimation::AnimateL |
|
63 */ |
|
64 virtual void StartTimedAnimationL( TInt aTime ) = 0; |
|
65 |
|
66 private: |
|
67 /// Ref: Observer to animation, if any |
|
68 MGlxAnimationObserver* iObserver; |
|
69 |
|
70 /// Own: The Alf utility |
|
71 CGlxUiUtility* iUiUtility; |
|
72 |
|
73 /// Whether an animation is in progress |
|
74 TBool iTimedAnimationInProgress; |
|
75 }; |
|
76 |
|
77 #endif // C_GLXANIMATIONTIMED_H |