|
1 // Copyright (c) 2005-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 @internalComponent - Internal Symbian test code |
|
19 */ |
|
20 |
|
21 #ifndef __TESTWINDOWS_H__ |
|
22 #define __TESTWINDOWS_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 class TWsEvent; |
|
27 class TWsRedrawEvent; |
|
28 class RWindowTreeNode; |
|
29 class RWindow; |
|
30 class RWindowGroup; |
|
31 class RWsSession; |
|
32 class CWindowGc; |
|
33 |
|
34 class CTestWindowTreeNode : public CBase |
|
35 { |
|
36 public: |
|
37 virtual void EventL(TWsEvent & aEvent) = 0; |
|
38 virtual void RedrawL(TWsRedrawEvent & aEvent) = 0; |
|
39 virtual RWindowTreeNode* WindowTreeNode() { return iWin; } |
|
40 protected: |
|
41 RWindowTreeNode* iWin; |
|
42 }; |
|
43 |
|
44 class CTestWindowGroup : public CTestWindowTreeNode |
|
45 { |
|
46 public: |
|
47 CTestWindowGroup(RWsSession & aWs); |
|
48 ~CTestWindowGroup(); |
|
49 void EventL(TWsEvent & aEvent); |
|
50 void RedrawL(TWsRedrawEvent & aEvent); |
|
51 RWindowGroup* WindowGroup() { return reinterpret_cast<RWindowGroup*>(iWin); } |
|
52 }; |
|
53 |
|
54 class CTestWindow : public CTestWindowTreeNode |
|
55 { |
|
56 public: |
|
57 CTestWindow(RWsSession& aWs, CTestWindowGroup& aGroup, CWindowGc& aGc); |
|
58 ~CTestWindow(); |
|
59 void EventL(TWsEvent & aEvent); |
|
60 void RedrawL(TWsRedrawEvent & aEvent); |
|
61 RWindow* Window() { return reinterpret_cast<RWindow*>(iWin); } |
|
62 virtual void DrawL(); |
|
63 protected: |
|
64 CWindowGc& iGc; |
|
65 }; |
|
66 |
|
67 #endif //__TESTWINDOWS_H__ |