|
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 __TWINDOWPOSITION_H |
|
23 #define __TWINDOWPOSITION_H |
|
24 |
|
25 #include <eikappui.h> |
|
26 #include <eikapp.h> |
|
27 #include <eikdoc.h> |
|
28 #include <coecntrl.h> |
|
29 #include <e32cmn.h> |
|
30 #include <e32std.h> |
|
31 #include <test/testexecutestepbase.h> |
|
32 #include <test/appfwk_test_appui.h> |
|
33 |
|
34 const TUid KUidCoeControlTestApp={ 0xA0003976 }; //app uid |
|
35 const TInt KErrWindowPosDoesNotMatch = -1234; |
|
36 |
|
37 // |
|
38 // class CCoeConD |
|
39 // |
|
40 class CCoeConD : public CCoeControl |
|
41 { |
|
42 public: |
|
43 void ConstructL(const CCoeControl& aParent); |
|
44 }; |
|
45 |
|
46 // |
|
47 // class CCoeConB |
|
48 // |
|
49 class CCoeConB; |
|
50 class CCoeConC : public CCoeControl |
|
51 { |
|
52 public: |
|
53 CCoeConC(CCoeConB& aParent); |
|
54 ~CCoeConC(); |
|
55 void ConstructL(); |
|
56 void SetViewPortRect(TRect aRect ); |
|
57 TInt CountComponentControls() const; |
|
58 CCoeControl* ComponentControl(TInt aIndex) const; |
|
59 private: |
|
60 // From CCoeControl |
|
61 void Draw(const TRect& aRect) const; |
|
62 private: |
|
63 CCoeConB& iParent; |
|
64 CCoeConD* iCoeConD; |
|
65 }; |
|
66 |
|
67 // |
|
68 // class CCoeConB |
|
69 // |
|
70 class CCoeConB : public CCoeControl |
|
71 { |
|
72 public: |
|
73 CCoeConB(); |
|
74 ~CCoeConB(); |
|
75 void ConstructL(CCoeControl* aParent); |
|
76 TInt CountComponentControls() const; |
|
77 CCoeControl* ComponentControl(TInt aIndex) const; |
|
78 TPoint WindowPos(); |
|
79 private: |
|
80 // From CCoeControl |
|
81 void Draw(const TRect& /*aRect*/) const; |
|
82 private: |
|
83 CCoeConC* iCoeConC; |
|
84 }; |
|
85 |
|
86 // |
|
87 // |
|
88 // CCoeConTestView |
|
89 // |
|
90 // |
|
91 class CCoeConTestView : public CCoeControl |
|
92 { |
|
93 public: |
|
94 CCoeConTestView(); |
|
95 ~CCoeConTestView(); |
|
96 void ConstructL(const TRect& aRect); |
|
97 void DrawCoeConB() const; |
|
98 TInt CountComponentControls() const; |
|
99 CCoeControl* ComponentControl(TInt aIndex) const; |
|
100 private: |
|
101 // From CCoeControl |
|
102 void Draw(const TRect& /*aRect*/) const; |
|
103 private: |
|
104 CCoeConB* iCoeControlB; |
|
105 }; |
|
106 |
|
107 // |
|
108 // |
|
109 // CCoeConTestAppUi |
|
110 // |
|
111 // |
|
112 class CCoeConTestAppUi : public CTestAppUi |
|
113 { |
|
114 public: |
|
115 CCoeConTestAppUi(); |
|
116 ~CCoeConTestAppUi(); |
|
117 void ConstructL(); |
|
118 private: |
|
119 void RunTestStepL(TInt aNumStep); |
|
120 void TestWindowPosition(); |
|
121 private: |
|
122 CCoeConTestView* iAppView; |
|
123 }; |
|
124 |
|
125 // |
|
126 // |
|
127 // CCoeConTestApp |
|
128 // |
|
129 // |
|
130 class CCoeConTestApp : public CEikApplication |
|
131 { |
|
132 private: |
|
133 // From CApaApplication |
|
134 CApaDocument* CreateDocumentL(); |
|
135 TUid AppDllUid() const; |
|
136 }; |
|
137 |
|
138 // |
|
139 // |
|
140 // CCoeConTestDocument |
|
141 // |
|
142 // |
|
143 class CCoeConTestDocument : public CEikDocument |
|
144 { |
|
145 public: |
|
146 CCoeConTestDocument(CEikApplication& aApp); |
|
147 private: |
|
148 // From CEikDocument |
|
149 CEikAppUi* CreateAppUiL(); |
|
150 }; |
|
151 |
|
152 #endif // TWINDOWPOSITION_H |
|
153 |