|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef WIDGETUIWINDOWCONTAINER_H_ |
|
20 #define WIDGETUIWINDOWCONTAINER_H_ |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <coecntrl.h> |
|
25 #include <AknServerApp.h> |
|
26 |
|
27 #include "WidgetUiObserver.h" |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 // MACROS |
|
32 |
|
33 // DATA TYPES |
|
34 |
|
35 // FUNCTION PROTOTYPES |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 |
|
39 class CBrCtlInterface; |
|
40 class CWidgetUiWindowManager; |
|
41 class CWidgetUiWindowView; |
|
42 class CAknsBasicBackgroundControlContext; |
|
43 |
|
44 |
|
45 // CLASS DECLARATION |
|
46 |
|
47 /** |
|
48 * |
|
49 * @lib WidgetUI.exe |
|
50 * @since 3.1 |
|
51 */ |
|
52 class CWidgetUiWindowContainer : public CCoeControl |
|
53 { |
|
54 public: // Constructors and destructor |
|
55 /** |
|
56 * NewL |
|
57 * two-phase constructor |
|
58 * @since 3.1 |
|
59 */ |
|
60 static CWidgetUiWindowContainer* NewL( |
|
61 const TRect& aRect, |
|
62 CWidgetUiWindowManager& aWindowManager ); |
|
63 |
|
64 /** |
|
65 * ~CWidgetUiWindowContainer |
|
66 * Destructor |
|
67 * @since 3.1 |
|
68 * @param none |
|
69 * @param none |
|
70 */ |
|
71 virtual ~CWidgetUiWindowContainer(); |
|
72 |
|
73 public: // New functions |
|
74 |
|
75 /** |
|
76 * HandleCommandL |
|
77 * @since 3.1 |
|
78 * @param aCommand id |
|
79 * @return void |
|
80 */ |
|
81 void HandleCommandL( TInt aCommand ); |
|
82 |
|
83 /** |
|
84 * HandleKeyEventL |
|
85 * @since 3.1 |
|
86 * @param aKeyEvent |
|
87 * @param aType |
|
88 * @return TKeyResponse |
|
89 */ |
|
90 TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
91 |
|
92 /** |
|
93 * SizeChanged |
|
94 * @since 3.1 |
|
95 * @param none |
|
96 * @return void |
|
97 */ |
|
98 void SizeChanged(); |
|
99 |
|
100 private: // Functions from base classes |
|
101 |
|
102 /** |
|
103 * CountComponentControls |
|
104 * @since 3.1 |
|
105 * @param none |
|
106 * @return TInt the count of sub controls |
|
107 */ |
|
108 TInt CountComponentControls() const; |
|
109 |
|
110 /** |
|
111 * ComponentControl |
|
112 * @since 3.1 |
|
113 * @param aIndex |
|
114 * @return CCoeControl* |
|
115 */ |
|
116 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
117 |
|
118 /** |
|
119 * Draw |
|
120 * @since 3.1 |
|
121 * @param aRect |
|
122 * @return void |
|
123 */ |
|
124 void Draw( const TRect& aRect ) const; |
|
125 |
|
126 /** |
|
127 * OfferKeyEventL |
|
128 * @since 3.1 |
|
129 * @param aKeyEvent |
|
130 * @param aType |
|
131 * @return TKeyResponse |
|
132 */ |
|
133 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
134 |
|
135 /** |
|
136 * FocusChanged |
|
137 * @since 3.1 |
|
138 * @param TDrawNow |
|
139 * @param aDrawNow |
|
140 * @return void |
|
141 */ |
|
142 void FocusChanged(TDrawNow aDrawNow); |
|
143 |
|
144 private: |
|
145 |
|
146 /** |
|
147 * C++ default constructor. |
|
148 */ |
|
149 CWidgetUiWindowContainer( CWidgetUiWindowManager& aWindowManager ); |
|
150 |
|
151 /** |
|
152 * ConstructL |
|
153 * EPOC default constructor |
|
154 * @since 3.1 |
|
155 * @param aRect Frame rectangle for container. |
|
156 * @param aView |
|
157 * @param aWindowManager |
|
158 * @return void |
|
159 */ |
|
160 void ConstructL( const TRect& aRect ); |
|
161 |
|
162 private: // new functions |
|
163 |
|
164 /** |
|
165 * CancelLoad |
|
166 * @since 3.1 |
|
167 * @param none |
|
168 * @return void |
|
169 */ |
|
170 void CancelLoad(); |
|
171 |
|
172 /** |
|
173 * Engine |
|
174 * @since 3.1 |
|
175 * @param none |
|
176 * @return CBrCtlInterface* |
|
177 */ |
|
178 CBrCtlInterface* Engine() const; |
|
179 |
|
180 /** |
|
181 * ErrorNoteL |
|
182 * Error note display |
|
183 * @since 3.1 |
|
184 * @param aPrompt |
|
185 * @return void |
|
186 */ |
|
187 void ErrorNoteL( const TDesC& aPrompt ); |
|
188 |
|
189 /** |
|
190 * InfoNoteL |
|
191 * Confirmation note display |
|
192 * @since 3.1 |
|
193 * @param aPrompt |
|
194 * @return void |
|
195 */ |
|
196 void InfoNoteL( const TDesC& aPrompt ); |
|
197 |
|
198 private: // data |
|
199 |
|
200 CWidgetUiWindowManager& iWindowManager; // not owned, not responsible for deleting |
|
201 TInt iCommandBase; |
|
202 |
|
203 #ifdef _DEBUG |
|
204 RFileLogger iFileLogger; |
|
205 TBool iCanLog; |
|
206 #endif |
|
207 |
|
208 CAknsBasicBackgroundControlContext* iSkinContext; // owned, responsible for deleting |
|
209 |
|
210 }; |
|
211 |
|
212 #endif // WIDGETUIWINDOWCONTAINER_H |
|
213 |
|
214 // End of File |