|
1 // Copyright (c) 2007-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 __SIMPLEDRAWER_H__ |
|
23 #define __SIMPLEDRAWER_H__ |
|
24 |
|
25 #include <graphics/wsgraphicdrawer.h> |
|
26 #include <graphics/wsgraphicdrawerinterface.h> |
|
27 |
|
28 class MWsGraphicDrawerContext; |
|
29 |
|
30 // A simple drawer |
|
31 NONSHARABLE_CLASS(CWsSimpleGraphicDrawer): public CWsGraphicDrawer//, public MWsEventHandler |
|
32 { |
|
33 public: |
|
34 enum {EImplUid = 0x1028351C}; |
|
35 |
|
36 public: |
|
37 static CWsSimpleGraphicDrawer* NewL(); |
|
38 virtual ~CWsSimpleGraphicDrawer(); |
|
39 // override CWsGraphicDrawer |
|
40 virtual void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId, MWsClient& aOwner, const TDesC8& aData); |
|
41 virtual void HandleMessage(const TDesC8& aData); |
|
42 protected: |
|
43 // override CWsGraphicDrawer |
|
44 void BaseConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId,MWsClient& aOwner); |
|
45 virtual void DoDraw(MWsGc& aGc, const TRect& aRect, const TDesC8& aData) const; |
|
46 void DoUpdateColor(TRgb aColor); |
|
47 protected: |
|
48 MWsGraphicDrawerContext* iContext; |
|
49 TRgb iColor; |
|
50 }; |
|
51 |
|
52 // First Contained (Child) drawer |
|
53 NONSHARABLE_CLASS(CWsInvisibleGraphicDrawer1): public CWsSimpleGraphicDrawer//, public MWsEventHandler |
|
54 { |
|
55 public: |
|
56 enum {EImplUid = 0x10283539}; |
|
57 |
|
58 public: |
|
59 static CWsInvisibleGraphicDrawer1* NewL(); |
|
60 virtual ~CWsInvisibleGraphicDrawer1(); |
|
61 // override CWsGraphicDrawer |
|
62 virtual void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId, MWsClient& aOwner, const TDesC8& aData); |
|
63 }; |
|
64 |
|
65 // Second contained (child) drawer |
|
66 NONSHARABLE_CLASS(CWsInvisibleGraphicDrawer2): public CWsSimpleGraphicDrawer//, public MWsEventHandler |
|
67 { |
|
68 public: |
|
69 enum {EImplUid = 0x1028353B}; |
|
70 |
|
71 public: |
|
72 static CWsInvisibleGraphicDrawer2* NewL(); |
|
73 virtual ~CWsInvisibleGraphicDrawer2(); |
|
74 // override CWsGraphicDrawer |
|
75 virtual void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId, MWsClient& aOwner, const TDesC8& aData); |
|
76 }; |
|
77 |
|
78 #endif |