|
1 // Copyright (c) 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 |
|
18 /** |
|
19 @file |
|
20 @test |
|
21 @internalComponent - Internal Symbian test code |
|
22 */ |
|
23 |
|
24 #ifndef __TWINDOWS_H__ |
|
25 #define __TWINDOWS_H__ |
|
26 |
|
27 #include <e32base.h> |
|
28 |
|
29 class TWsEvent; |
|
30 class TWsRedrawEvent; |
|
31 class RWindowTreeNode; |
|
32 class RWindow; |
|
33 class RWindowGroup; |
|
34 class RBlankWindow; |
|
35 class RBackedUpWindow; |
|
36 class RWsSession; |
|
37 class CWindowGc; |
|
38 class CWsScreenDevice; |
|
39 |
|
40 /** |
|
41 * The class handles redrawing of the window tree node standard class |
|
42 */ |
|
43 class CTWindowTreeNode : public CBase |
|
44 { |
|
45 public: |
|
46 virtual void Event(TWsEvent & aEvent) = 0; |
|
47 virtual void Redraw(TWsRedrawEvent & aEvent) = 0; |
|
48 virtual RWindowTreeNode* WindowTreeNode() { return iWin; } |
|
49 protected: |
|
50 RWindowTreeNode* iWin; |
|
51 }; |
|
52 |
|
53 /** |
|
54 * The class handles redrawing of the window window group |
|
55 */ |
|
56 class CTWindowGroup : public CTWindowTreeNode |
|
57 { |
|
58 public: |
|
59 static CTWindowGroup* NewL(RWsSession& aWs, CWsScreenDevice* aScreenDevice); |
|
60 ~CTWindowGroup(); |
|
61 void Event(TWsEvent & aEvent); |
|
62 void Redraw(TWsRedrawEvent & aEvent); |
|
63 RWindowGroup* WindowGroup() { return reinterpret_cast<RWindowGroup*>(iWin); } |
|
64 private: |
|
65 CTWindowGroup(); |
|
66 void ConstructL(RWsSession & aWs, CWsScreenDevice* aScreenDevice); |
|
67 }; |
|
68 |
|
69 /** |
|
70 * Base class for windows. |
|
71 */ |
|
72 class CTWindow : public CTWindowTreeNode |
|
73 { |
|
74 public: |
|
75 static CTWindow* NewL(RWsSession& aWs, CTWindowTreeNode& aGroup, CWindowGc& aGc); |
|
76 ~CTWindow(); |
|
77 void Event(TWsEvent & aEvent); |
|
78 void Redraw(TWsRedrawEvent & aEvent); |
|
79 RWindow* Window() { return reinterpret_cast<RWindow*>(iWin); } |
|
80 virtual void Draw(); |
|
81 private: |
|
82 CWindowGc& iGc; |
|
83 private: |
|
84 CTWindow(CWindowGc& aGc); |
|
85 void ConstructL(RWsSession& aWs, CTWindowTreeNode& aGroup); |
|
86 }; |
|
87 |
|
88 #endif //__TWINDOWS_H__ |