|
1 /* |
|
2 * Copyright (c) 2005-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 "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: Implementation for chinese peninput full screen hwr |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __PENINPUTHWRFSCNFUNCTIONPANEL_H__ |
|
20 #define __PENINPUTHWRFSCNFUNCTIONPANEL_H__ |
|
21 |
|
22 #include "peninputhwrfscnbasepanel.h" |
|
23 #include "peninputlayoutctrlgroup.h" |
|
24 #include <peninputlayoutvkb.h> |
|
25 #include <peninputvkbctrllayout.h> |
|
26 #include "peninputeventbutton.h" |
|
27 #include "peninputlayoutlatchbutton.h" |
|
28 |
|
29 class CPeninputLayoutInputmodelChoice; |
|
30 /** |
|
31 * Class CPeninputHwrfscnFunctionPanel |
|
32 * |
|
33 * Define the function panel and contain vkb control and button group |
|
34 * |
|
35 * @lib peninputhwrfscn.lib |
|
36 * @since S60 v5.0 |
|
37 */ |
|
38 class CPeninputHwrfscnFunctionPanel : public CPeninputHwrfscnBasePanel |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * The factory function |
|
43 * |
|
44 * @since Series 60 5.0 |
|
45 * @param aLayout The Full screen layout |
|
46 * @return Pointer to created CPeninputHwrfscnFunctionPanel object |
|
47 */ |
|
48 static CPeninputHwrfscnFunctionPanel* NewL( CPeninputHwrfscnLayout* aLayout ); |
|
49 |
|
50 /** |
|
51 * The destructor function |
|
52 * |
|
53 * @since Series 60 5.0 |
|
54 */ |
|
55 ~CPeninputHwrfscnFunctionPanel(); |
|
56 |
|
57 // From base class |
|
58 /** |
|
59 * From CPeninputHwrfscnBasePanel |
|
60 * Show controls |
|
61 * |
|
62 * @since Series 60 5.0 |
|
63 * @param aVisible Show or hide |
|
64 */ |
|
65 void Show( TBool aVisible ); |
|
66 |
|
67 /** |
|
68 * From CPeninputHwrfscnBasePanel |
|
69 * Draw |
|
70 * |
|
71 * @since Series 60 5.0 |
|
72 */ |
|
73 virtual void Draw(); |
|
74 |
|
75 /** |
|
76 * Handle control's event |
|
77 * |
|
78 * @since Series 60 5.0 |
|
79 * @param aEventType Event type |
|
80 * @param aCtrl Event source |
|
81 * @param aEventData event data |
|
82 */ |
|
83 virtual void HandleControlEvent( |
|
84 TInt aEventType, |
|
85 CFepUiBaseCtrl* aCtrl, |
|
86 const TDesC& aEventData ); |
|
87 |
|
88 /** |
|
89 * Handle layout command |
|
90 * |
|
91 * @since Series 60 5.0 |
|
92 * @param aCommand command type |
|
93 * @param aData Event data |
|
94 */ |
|
95 virtual void HandleCommand( TInt aCommand, TUint8* aData ); |
|
96 |
|
97 /** |
|
98 * From CPeninputHwrfscnBasePanel |
|
99 * Check if the property could be changed before changing it. |
|
100 * |
|
101 * @since S60 v5.0 |
|
102 * @param aProperty One of @see TPeninputHwrfscnProperty changed |
|
103 * @return TBool ETrue if the property needed to be changed, EFalse otherwise |
|
104 */ |
|
105 virtual TBool BeforePropertyChangedL( |
|
106 MPeninputHwrfscnPropertySubscriber:: |
|
107 TPeninputHwrfscnProperty aProptery ); |
|
108 |
|
109 /** |
|
110 * From CPeninputHwrfscnBasePanel |
|
111 * Notify the property subscriber the property changed. |
|
112 * |
|
113 * @since S60 v5.0 |
|
114 * @param aProperty One of @see TPeninputHwrfscnProperty changed |
|
115 */ |
|
116 virtual void PropertyChangedL( |
|
117 MPeninputHwrfscnPropertySubscriber:: |
|
118 TPeninputHwrfscnProperty aProptery ); |
|
119 |
|
120 /** |
|
121 * From CPeninputHwrfscnBasePanel |
|
122 * Handle size changed. |
|
123 * |
|
124 * @since S60 v5.0 |
|
125 */ |
|
126 void SizeChanged(); |
|
127 |
|
128 /** |
|
129 * |
|
130 * Handle skin changed. |
|
131 * |
|
132 * @since S60 v5.0 |
|
133 */ |
|
134 void HandleSkinChanged(); |
|
135 |
|
136 private: |
|
137 /** |
|
138 * The constructor |
|
139 * |
|
140 * @since Series 60 5.0 |
|
141 * @param aLayout The layout pointer. |
|
142 */ |
|
143 CPeninputHwrfscnFunctionPanel( CPeninputHwrfscnLayout* aLayout ); |
|
144 |
|
145 /** |
|
146 * 2nd phase constructor |
|
147 * |
|
148 * @since Series 60 5.0 |
|
149 */ |
|
150 void ConstructL(); |
|
151 |
|
152 /** |
|
153 * From CPeninputHwrfscnBasePanel |
|
154 * Handle laf (Look and feel) changed |
|
155 * |
|
156 * @since S60 v5.0 |
|
157 */ |
|
158 void LafChanged(); |
|
159 |
|
160 /** |
|
161 * Create symbol table |
|
162 * |
|
163 * @since S60 v5.0 |
|
164 */ |
|
165 void CreateSymbolTableL(); |
|
166 |
|
167 /** |
|
168 * Create more function button list |
|
169 * |
|
170 * @since S60 v5.0 |
|
171 */ |
|
172 void CreateMoreFuncBtnListL(); |
|
173 |
|
174 /** |
|
175 * Add button to more function group |
|
176 * |
|
177 * @since S60 v5.0 |
|
178 * @param aRect control rectangle |
|
179 * @param aCtrlId control ID |
|
180 * @param aResID resource ID |
|
181 */ |
|
182 void AddBtnToMoreFuncGrpL( const TRect aRect, |
|
183 TInt aCtrlId, |
|
184 TInt aResID ); |
|
185 |
|
186 /** |
|
187 * Handle control's button up event |
|
188 * |
|
189 * @since Series 60 5.0 |
|
190 * @param aEventType Event type |
|
191 * @param aCtrl Event source |
|
192 * @param aEventData event data |
|
193 */ |
|
194 void OnControlEvent_ButtonUp( TInt aEventType, |
|
195 CFepUiBaseCtrl* aCtrl, |
|
196 const TDesC& aEventData ); |
|
197 |
|
198 /** |
|
199 * Dim keys when in number mode |
|
200 * |
|
201 * @since Series 60 5.0 |
|
202 */ |
|
203 void NumberModeDimKeysL(); |
|
204 |
|
205 /** |
|
206 * Read LAF information |
|
207 * |
|
208 * @since Series 60 5.0 |
|
209 */ |
|
210 void ReadLAFInfo(); |
|
211 |
|
212 /** |
|
213 * Reset More function buttons size |
|
214 * |
|
215 * @since Series 60 5.0 |
|
216 */ |
|
217 void ResetMoreFuncBtnsSize(); |
|
218 |
|
219 /** |
|
220 * Reset symbol table size |
|
221 * |
|
222 * @since Series 60 5.0 |
|
223 */ |
|
224 void ResetSymbolTableSize(); |
|
225 |
|
226 /** |
|
227 * Get more function button group rectangle |
|
228 * |
|
229 * @since Series 60 5.0 |
|
230 * @return button group rectangle |
|
231 */ |
|
232 TRect MoreFuncBtnGroupRect(); |
|
233 |
|
234 /** |
|
235 * Get width switcher button rectangle |
|
236 * |
|
237 * @since Series 60 5.0 |
|
238 * @return button group rectangle |
|
239 */ |
|
240 TRect WidthSwitcherBtnRect( ); |
|
241 |
|
242 /** |
|
243 * Get space button rectangle |
|
244 * |
|
245 * @since Series 60 5.0 |
|
246 * @return button group rectangle |
|
247 */ |
|
248 TRect SpaceBtnRect( ); |
|
249 |
|
250 /** |
|
251 * Get enter button rectangle |
|
252 * |
|
253 * @since Series 60 5.0 |
|
254 * @return button group rectangle |
|
255 */ |
|
256 TRect EnterBtnRect( ); |
|
257 |
|
258 /** |
|
259 * Get Symbol table control rectangle |
|
260 * |
|
261 * @since Series 60 5.0 |
|
262 * @return Symbol table rectangle |
|
263 */ |
|
264 TRect SymbolTableRect(); |
|
265 |
|
266 private: //enum data |
|
267 /** |
|
268 * The more function group buttons index |
|
269 */ |
|
270 enum TPeninputHwrfscnMoreFuncGrp |
|
271 { |
|
272 //This definition is used for more function btn |
|
273 ELangWidthFullHalf = 0, |
|
274 ELangWidthHalfFull, |
|
275 ESpaceBtn, |
|
276 EEnterBtn, |
|
277 EMoreFuncBtnCount |
|
278 }; |
|
279 |
|
280 /** |
|
281 * The width state |
|
282 */ |
|
283 enum TPeninputHwrfscnWidthState |
|
284 { |
|
285 EFullWidth = 0, |
|
286 EHalfWidth, |
|
287 }; |
|
288 |
|
289 private: |
|
290 |
|
291 /** |
|
292 * The VKB control |
|
293 * Not Own |
|
294 */ |
|
295 CPeninputVkbCtrlExt* iVkbCtrl; |
|
296 |
|
297 /** |
|
298 * The VKB layout |
|
299 * Own |
|
300 */ |
|
301 CAknFepCtrlVkbLayout* iVkbLayout; |
|
302 |
|
303 /** |
|
304 * More function button group |
|
305 * Not own |
|
306 */ |
|
307 CControlGroup* iMoreFuncBtnGroup; |
|
308 |
|
309 /** |
|
310 * Symbol table group |
|
311 * Not own |
|
312 */ |
|
313 CControlGroup* iSymbolTableGroup; |
|
314 |
|
315 /** |
|
316 * language width state |
|
317 */ |
|
318 TPeninputHwrfscnWidthState iLangWidthState; |
|
319 |
|
320 /** |
|
321 * Button width |
|
322 */ |
|
323 TInt iUnitWidth; |
|
324 |
|
325 /** |
|
326 * Button height |
|
327 */ |
|
328 TInt iUnitHeight; |
|
329 |
|
330 CFbsBitmap* iSvgLatched; |
|
331 CFbsBitmap* iSvgUnLatched; |
|
332 }; |
|
333 |
|
334 #endif //__PENINPUTHWRFSCNFUNCTIONPANEL_H__ |