|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #ifndef RATELIMITDRAWER_H_ |
|
23 #define RATELIMITDRAWER_H_ |
|
24 |
|
25 #include <e32std.h> |
|
26 #include "Graphics/WSGRAPHICDRAWER.H" |
|
27 #include <Graphics/WSGRAPHICDRAWERINTERFACE.H> |
|
28 #include "../inc/constants.h" |
|
29 |
|
30 /** |
|
31 Drawer plug-in class used to draw the animation and scheduling. |
|
32 */ |
|
33 NONSHARABLE_CLASS(CWsRateLimitGraphicDrawer): public CWsGraphicDrawer |
|
34 { |
|
35 public: |
|
36 enum {EImplUid = 0x102869F6}; |
|
37 |
|
38 public: |
|
39 static CWsRateLimitGraphicDrawer* NewL(); |
|
40 ~CWsRateLimitGraphicDrawer(); |
|
41 void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId,MWsClient& aOwner,const TDesC8& aData); |
|
42 void HandleMessage(const TDesC8& aData); |
|
43 private: |
|
44 void DoDraw(MWsGc& aGc,const TRect& aRect,const TDesC8& aData) const; |
|
45 void InitialiseMembers(); |
|
46 private: |
|
47 CWsRateLimitGraphicDrawer(); |
|
48 |
|
49 private: |
|
50 TRgb iColors[KMaxFrames]; |
|
51 mutable TReal iFrameRate; |
|
52 mutable TInt iFrame; |
|
53 mutable TTime iStartTime; |
|
54 }; |
|
55 |
|
56 #endif /*RATELIMITDRAWER_H_*/ |