44
|
1 |
/*
|
|
2 |
* Copyright (c) 2009-2010 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: Header of LAF manager.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef C_PENINPUTFINGERHWRARLAFMANAGER_H
|
|
20 |
#define C_PENINPUTFINGERHWRARLAFMANAGER_H
|
|
21 |
|
|
22 |
/**
|
|
23 |
* Class PeninputFingerHwrArLafManager
|
|
24 |
*
|
|
25 |
* Wrapper of L&F data.
|
|
26 |
*
|
|
27 |
* @lib peninputfingerhwrar.lib
|
|
28 |
* @since Symbian TB9.2
|
|
29 |
*/
|
|
30 |
class CPeninputFingerHwrArLafManager : public CBase
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
/**
|
|
34 |
* Symbian constructor.
|
|
35 |
*
|
|
36 |
* @since Symbian TB9.2
|
|
37 |
* @return Pointer to created object.
|
|
38 |
*/
|
|
39 |
static CPeninputFingerHwrArLafManager* NewL();
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Symbian constructor.
|
|
43 |
*
|
|
44 |
* @since Symbian TB9.2
|
|
45 |
* @return Pointer to created object.
|
|
46 |
*/
|
|
47 |
static CPeninputFingerHwrArLafManager* NewLC();
|
|
48 |
|
|
49 |
/**
|
|
50 |
* standard c++ destructor.
|
|
51 |
*
|
|
52 |
* @since Symbian TB9.2
|
|
53 |
* @return None
|
|
54 |
*/
|
|
55 |
~CPeninputFingerHwrArLafManager();
|
|
56 |
|
|
57 |
public:
|
|
58 |
/**
|
|
59 |
* read laf data.
|
|
60 |
*
|
|
61 |
* @since Symbian TB9.2
|
|
62 |
* @return None
|
|
63 |
*/
|
|
64 |
void ReadLafInfo();
|
|
65 |
|
|
66 |
/**
|
|
67 |
* get screen orientation.
|
|
68 |
*
|
|
69 |
* @since Symbian TB9.2
|
|
70 |
* @return ETrue if is landscape.
|
|
71 |
*/
|
|
72 |
TBool IsLandscape();
|
|
73 |
|
|
74 |
/**
|
|
75 |
* get rect of layout.
|
|
76 |
*
|
|
77 |
* @since Symbian TB9.2
|
|
78 |
* @return rect of layout.
|
|
79 |
*/
|
|
80 |
TRect LayoutRect();
|
|
81 |
|
|
82 |
/**
|
|
83 |
* get rect of specified control.
|
|
84 |
*
|
|
85 |
* @since Symbian TB9.2
|
|
86 |
* @param aCtrlId specifies control id.
|
|
87 |
* @return rect of specified control.
|
|
88 |
*/
|
|
89 |
TRect CtrlRect( TInt aCtrlId );
|
|
90 |
|
|
91 |
public: // icf
|
|
92 |
/**
|
|
93 |
* get rect of ICF control.
|
|
94 |
*
|
|
95 |
* @since Symbian TB9.2
|
|
96 |
* @return rect of icf.
|
|
97 |
*/
|
|
98 |
TRect IcfRect();
|
|
99 |
|
|
100 |
/**
|
|
101 |
* get left margin of icf.
|
|
102 |
*
|
|
103 |
* @since Symbian TB9.2
|
|
104 |
* @return left margin of icf.
|
|
105 |
*/
|
|
106 |
TInt IcfLeftMargin();
|
|
107 |
|
|
108 |
/**
|
|
109 |
* get Right margin of icf.
|
|
110 |
*
|
|
111 |
* @since Symbian TB9.2
|
|
112 |
* @return Right margin of icf.
|
|
113 |
*/
|
|
114 |
TInt IcfRightMargin();
|
|
115 |
|
|
116 |
/**
|
|
117 |
* get top margin of icf.
|
|
118 |
*
|
|
119 |
* @since Symbian TB9.2
|
|
120 |
* @return top margin of icf.
|
|
121 |
*/
|
|
122 |
TInt IcfTopMargin();
|
|
123 |
|
|
124 |
/**
|
|
125 |
* get bottom margin of icf.
|
|
126 |
*
|
|
127 |
* @since Symbian TB9.2
|
|
128 |
* @return bottom margin of icf.
|
|
129 |
*/
|
|
130 |
TInt IcfBottomMargin();
|
|
131 |
|
|
132 |
/**
|
|
133 |
* get line spacing of icf.
|
|
134 |
*
|
|
135 |
* @since Symbian TB9.2
|
|
136 |
* @return line spacing of icf.
|
|
137 |
*/
|
|
138 |
TInt IcfLineSpaceMargin();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* get font of icf.
|
|
142 |
*
|
|
143 |
* @since Symbian TB9.2
|
|
144 |
* @return font of icf.
|
|
145 |
*/
|
|
146 |
CFont* IcfFont();
|
|
147 |
|
|
148 |
/**
|
|
149 |
* get text height of icf.
|
|
150 |
*
|
|
151 |
* @since Symbian TB9.2
|
|
152 |
* @return text height of icf.
|
|
153 |
*/
|
|
154 |
TInt IcfTextHeight();
|
|
155 |
|
|
156 |
/**
|
|
157 |
* get indicator bubble rect.
|
|
158 |
*
|
|
159 |
* @since Symbian TB9.2
|
|
160 |
* @return bubble rect.
|
|
161 |
*/
|
|
162 |
TRect IndicatorBubbleRect();
|
|
163 |
public: //buttons
|
|
164 |
|
|
165 |
/**
|
|
166 |
* get inner padding of buttons.
|
|
167 |
*
|
|
168 |
* @since Symbian TB9.2
|
|
169 |
* @return inner padding of buttons.
|
|
170 |
*/
|
|
171 |
TSize ButtonInnerPadding();
|
|
172 |
|
|
173 |
public: //symbol table
|
|
174 |
|
|
175 |
/**
|
|
176 |
* get row count of virtual sctpad.
|
|
177 |
*
|
|
178 |
* @since Symbian TB9.2
|
|
179 |
* @return row count of virtual sctpad.
|
|
180 |
*/
|
|
181 |
TInt VirtualSctpadRowCount();
|
|
182 |
|
|
183 |
/**
|
|
184 |
* get column count of virtual sctpad.
|
|
185 |
*
|
|
186 |
* @since Symbian TB9.2
|
|
187 |
* @return column count of virtual sctpad.
|
|
188 |
*/
|
|
189 |
TInt VirtualSctpadColCount();
|
|
190 |
|
|
191 |
/**
|
|
192 |
* get row count of virtual number sctpad.
|
|
193 |
*
|
|
194 |
* @since Symbian TB9.2
|
|
195 |
* @return row count of virtual number sctpad.
|
|
196 |
*/
|
|
197 |
TInt VirtualNumSctpadRowCount();
|
|
198 |
|
|
199 |
/**
|
|
200 |
* get column count of virtual number sctpad.
|
|
201 |
*
|
|
202 |
* @since Symbian TB9.2
|
|
203 |
* @return column count of virtual number sctpad.
|
|
204 |
*/
|
|
205 |
TInt VirtualNumSctpadColCount();
|
|
206 |
/**
|
|
207 |
* get cell size of virtual sctpad.
|
|
208 |
*
|
|
209 |
* @since Symbian TB9.2
|
|
210 |
* @return cell size of virtual sctpad.
|
|
211 |
*/
|
|
212 |
TRect VirtualSctpadCellSize();
|
|
213 |
|
|
214 |
/**
|
|
215 |
* get cell size of virtual numpad.
|
|
216 |
*
|
|
217 |
* @since Symbian TB9.2
|
|
218 |
* @return cell size of virtual sctpad.
|
|
219 |
*/
|
|
220 |
TRect VirtualNumpadCellSize();
|
|
221 |
/**
|
|
222 |
* get cell rect of virtual sctpad.
|
|
223 |
*
|
|
224 |
* @since Symbian TB9.2
|
|
225 |
* @param aArrayRects a TRect array to receive cell rect.
|
|
226 |
* @return none.
|
|
227 |
*/
|
|
228 |
void GetVirtualKeyRects( RArray<TRect>& aArrayRects );
|
|
229 |
|
|
230 |
/**
|
|
231 |
* get cell rect of virtual sctpad.
|
|
232 |
*
|
|
233 |
* @since Symbian TB9.2
|
|
234 |
* @param aArrayRects a TRect array to receive cell rect.
|
|
235 |
* @return none.
|
|
236 |
*/
|
|
237 |
void GetNumVirtualKeyRects( RArray<TRect>& aArrayRects );
|
|
238 |
|
|
239 |
/**
|
|
240 |
* get text layout of virtual sctpad.
|
|
241 |
*
|
|
242 |
* @since Symbian TB9.2
|
|
243 |
* @return a TAknTextLineLayout object to layout cell text.
|
|
244 |
*/
|
|
245 |
TAknTextLineLayout SctpadKeyTxtLayout();
|
|
246 |
|
|
247 |
/**
|
|
248 |
* get text layout of virtual numpad.
|
|
249 |
*
|
|
250 |
* @since Symbian TB9.2
|
|
251 |
* @return a TAknTextLineLayout object to layout cell text.
|
|
252 |
*/
|
|
253 |
TAknTextLineLayout NumpadKeyTxtLayout();
|
|
254 |
|
|
255 |
/**
|
|
256 |
* get preview bubble rect.
|
|
257 |
*
|
|
258 |
* @since Symbian TB9.2
|
|
259 |
* @return a TRect object to preview bubble rect.
|
|
260 |
*/
|
|
261 |
TRect PreviewBubbleRect();
|
|
262 |
|
|
263 |
/**
|
|
264 |
* get preview bubble inner rect.
|
|
265 |
*
|
|
266 |
* @since Symbian TB9.2
|
|
267 |
* @return a TRect object to preview bubble inner rect.
|
|
268 |
*/
|
|
269 |
TRect PreviewBubbleInnerRect();
|
|
270 |
|
|
271 |
/**
|
|
272 |
* get preview bubble font.
|
|
273 |
*
|
|
274 |
* @since Symbian TB9.2
|
|
275 |
* @return a CFont pointer to preview bubble font.
|
|
276 |
*/
|
|
277 |
const CFont* PreviewBubbleFont();
|
|
278 |
|
|
279 |
/**
|
|
280 |
* get preview bubble text layout.
|
|
281 |
*
|
|
282 |
* @since Symbian TB9.2
|
|
283 |
* @return a TAknTextLineLayout object to preview bubble text layout.
|
|
284 |
*/
|
|
285 |
TAknTextLineLayout PreviewBubbleTextLayout();
|
|
286 |
|
|
287 |
public: // candidate list
|
|
288 |
|
|
289 |
/**
|
|
290 |
* get width unit of candidate list.
|
|
291 |
*
|
|
292 |
* @since Symbian TB9.2
|
|
293 |
* @return width unit of candidate list.
|
|
294 |
*/
|
|
295 |
TInt CandidateUnitWidth();
|
|
296 |
|
|
297 |
/**
|
|
298 |
* get height unit of candidate list.
|
|
299 |
*
|
|
300 |
* @since Symbian TB9.2
|
|
301 |
* @return height unit of candidate list.
|
|
302 |
*/
|
|
303 |
TInt CandidateUnitHeight();
|
|
304 |
|
|
305 |
/**
|
|
306 |
* get horizontal margin of candidate list.
|
|
307 |
*
|
|
308 |
* @since Symbian TB9.2
|
|
309 |
* @return horizontal margin of candidate list.
|
|
310 |
*/
|
|
311 |
TInt CandidateHorizontalMargin();
|
|
312 |
|
|
313 |
/**
|
|
314 |
* get vertical margin of candidate list.
|
|
315 |
*
|
|
316 |
* @since Symbian TB9.2
|
|
317 |
* @return vertical margin of candidate list.
|
|
318 |
*/
|
|
319 |
TInt CandidateVerticalMargin();
|
|
320 |
|
|
321 |
/**
|
|
322 |
* get top-left position of candidate list.
|
|
323 |
*
|
|
324 |
* @since Symbian TB9.2
|
|
325 |
* @return top-left position of candidate list.
|
|
326 |
*/
|
|
327 |
TPoint CandidateLTPos();
|
|
328 |
|
|
329 |
/**
|
|
330 |
* get top-left position of predictive list.
|
|
331 |
*
|
|
332 |
* @since Symbian TB9.2
|
|
333 |
* @return top-left position of predictive list.
|
|
334 |
*/
|
|
335 |
TPoint PredictiveLTPos();
|
|
336 |
|
|
337 |
/**
|
|
338 |
* get font of candidate list.
|
|
339 |
*
|
|
340 |
* @since Symbian TB9.2
|
|
341 |
* @return font of candidate list.
|
|
342 |
*/
|
|
343 |
const CFont* CandidateFont();
|
|
344 |
|
|
345 |
/**
|
|
346 |
* Get indicator rect
|
|
347 |
*/
|
|
348 |
TRect GetIndicatorRect();
|
|
349 |
|
|
350 |
/**
|
|
351 |
* Get arrow padding size
|
|
352 |
*/
|
|
353 |
TSize GetArrowPaddingSize();
|
|
354 |
public: //sct paging buttons
|
|
355 |
/**
|
|
356 |
* get text layout of sct paging button.
|
|
357 |
*
|
|
358 |
* @since Symbian TB9.2
|
|
359 |
* @return a TAknTextLineLayout object to layout text.
|
|
360 |
*/
|
|
361 |
TAknTextLineLayout SctPageBtnTxtLayout();
|
|
362 |
|
|
363 |
/**
|
|
364 |
* Get buttons rects for symbol table
|
|
365 |
*/
|
|
366 |
RArray<TRect>& GetSymBtnArray();
|
|
367 |
|
|
368 |
/**
|
|
369 |
* Get virtual key pad rect
|
|
370 |
*/
|
|
371 |
TRect GetVirtualKeyRect();
|
|
372 |
/**
|
|
373 |
* Get virtual number key pad rect
|
|
374 |
*/
|
|
375 |
TRect GetVirtualNumKeyRect();
|
|
376 |
private:
|
|
377 |
|
|
378 |
/**
|
|
379 |
* C++ constructor
|
|
380 |
*
|
|
381 |
* @since Symbian TB9.2
|
|
382 |
* @return None
|
|
383 |
*/
|
|
384 |
CPeninputFingerHwrArLafManager();
|
|
385 |
|
|
386 |
/**
|
|
387 |
* Symbian second-phase constructor
|
|
388 |
*
|
|
389 |
* @since Symbian TB9.2
|
|
390 |
* @return None
|
|
391 |
*/
|
|
392 |
void ConstructL();
|
|
393 |
|
|
394 |
private:
|
|
395 |
/**
|
|
396 |
* Retrieve layout data
|
|
397 |
*/
|
|
398 |
void RetrieveLayoutData();
|
|
399 |
|
|
400 |
/**
|
|
401 |
* Retrieve the laf data for ICF editor
|
|
402 |
*/
|
|
403 |
void RetrieveLafDataForICF();
|
|
404 |
|
|
405 |
/**
|
|
406 |
* Retrieve the laf data for function button:
|
|
407 |
* Close, optons, symbol, delete, and arrows buttons.
|
|
408 |
*/
|
|
409 |
void RetrieveLafDataForFunctionalButton();
|
|
410 |
|
|
411 |
/**
|
|
412 |
* Retrieve the laf data for candidate list
|
|
413 |
*/
|
|
414 |
void RetrieveLafDataForCandidateList();
|
|
415 |
|
|
416 |
/**
|
|
417 |
* Retrieve the laf data for symbol table
|
|
418 |
*/
|
|
419 |
void RetrieveLafDataForSymbolTable();
|
|
420 |
|
|
421 |
/**
|
|
422 |
* Retrieve the laf data for symbol table
|
|
423 |
*/
|
|
424 |
void RetrieveLafDataForNumSymbolTable();
|
|
425 |
|
|
426 |
/**
|
|
427 |
* Retrieve the landscape laf data for symbol table
|
|
428 |
*/
|
|
429 |
void RetrieveLandscapeLafDataForSymbolTable();
|
|
430 |
|
|
431 |
/**
|
|
432 |
* Retrieve the portrait laf data for symbol table
|
|
433 |
*/
|
|
434 |
void RetrievePortraitLafDataForSymbolTable();
|
|
435 |
|
|
436 |
/**
|
|
437 |
* Retrieve the landscape laf data for number symbol table
|
|
438 |
*/
|
|
439 |
void RetrieveLandscapeLafDataForNumSymbolTable();
|
|
440 |
|
|
441 |
/**
|
|
442 |
* Retrieve the portrait laf data for number symbol table
|
|
443 |
*/
|
|
444 |
void RetrievePortraitLafDataForNumSymbolTable();
|
|
445 |
|
|
446 |
/**
|
|
447 |
* Retrieve the laf data for HWR writing box
|
|
448 |
*/
|
|
449 |
void RetrieveLafDataForHwrBox();
|
|
450 |
|
|
451 |
/**
|
|
452 |
* Retrieve the laf data for Candidate Preview bubble
|
|
453 |
*/
|
|
454 |
void RetrieveLafDataForPreviewBubble();
|
|
455 |
|
|
456 |
private: //datas
|
|
457 |
|
|
458 |
TBool iIsLandscape;
|
|
459 |
TRect iLayoutRect;
|
|
460 |
TPoint iLayoutOffset;
|
|
461 |
TSize iScreenSize;
|
|
462 |
/**
|
|
463 |
* control rects
|
|
464 |
*
|
|
465 |
*/
|
|
466 |
TRect iRectIcf;
|
|
467 |
TRect iRectWritingBox;
|
|
468 |
TRect iRectNumpad;
|
|
469 |
TRect iRectSctpad;
|
|
470 |
TRect iRectBtnSpace;
|
|
471 |
TRect iRectBtnEnter;
|
|
472 |
TRect iIndicatorRect;
|
|
473 |
|
|
474 |
/**
|
|
475 |
* Functinal button laf
|
|
476 |
*/
|
|
477 |
TRect iRectBtnClose;
|
|
478 |
TRect iRectBtnRangeSmb;
|
|
479 |
TRect iRectBtnBackspace;
|
|
480 |
TRect iRectBtnArrowLeft;
|
|
481 |
TRect iRectBtnArrowRight;
|
|
482 |
TRect iRectBtnArrowUp;
|
|
483 |
TRect iRectBtnArrowDown;
|
|
484 |
TRect iRectBtnOption;
|
|
485 |
TRect iRectBtnSctPage;
|
|
486 |
TRect iRectBtnNumType;
|
|
487 |
TSize iArrowPaddingSize;
|
|
488 |
TSize iSizeBtnPadding;
|
|
489 |
|
|
490 |
/**
|
|
491 |
* ICF laf
|
|
492 |
*/
|
|
493 |
TInt iIcfTextLeftMargin;
|
|
494 |
TInt iIcfTextRightMargin;
|
|
495 |
TInt iIcfTextTopMargin;
|
|
496 |
TInt iIcfTextBottomMargin;
|
|
497 |
TInt iIcfTextLineSpaceMargin;
|
|
498 |
TInt iIcfTextHeight;
|
|
499 |
TInt iIcfTextAlignment;
|
|
500 |
CFont* iIcfFont;
|
|
501 |
|
|
502 |
/**
|
|
503 |
* Msg indicator bubble.
|
|
504 |
*/
|
|
505 |
TRect iRectIndicatorBubble;
|
|
506 |
|
|
507 |
/**
|
|
508 |
* Candidate laf
|
|
509 |
*/
|
|
510 |
TInt iCandsHorizontalMargin;
|
|
511 |
TInt iCandsVerticalMargin;
|
|
512 |
TInt iCandsUnitWidth;
|
|
513 |
TInt iCandsUnitHeight;
|
|
514 |
TPoint iCandidateLTPos;
|
|
515 |
CFont* iCandsFont;
|
|
516 |
TInt iCandsTextMargin;
|
|
517 |
|
|
518 |
/**
|
|
519 |
* Symbol table laf data
|
|
520 |
*/
|
|
521 |
TRect iRectOfSymbolTable;
|
|
522 |
TInt iSctpadRowCount;
|
|
523 |
TInt iSctpadColCount;
|
|
524 |
TSize iSizeSctpadCell;
|
|
525 |
RArray<TRect> iSymBtnRectArray;
|
|
526 |
|
|
527 |
/**
|
|
528 |
* virtual key rects array
|
|
529 |
*/
|
|
530 |
RArray<TRect> iSCTrectArray;
|
|
531 |
// Number symbol table laf data
|
|
532 |
TRect iRectOfNumSymbolTable;
|
|
533 |
TInt iNumSctpadRowCount;
|
|
534 |
TInt iNumSctpadColCount;
|
|
535 |
TSize iSizeNumSctpadCell;
|
|
536 |
// RArray<TRect> iNumSymBtnRectArray;
|
|
537 |
RArray<TRect> iNumSCTrectArray;
|
|
538 |
/**
|
|
539 |
* Preview bubble
|
|
540 |
*/
|
|
541 |
TRect iPreviewWndRect;
|
|
542 |
TRect iPreviewWndInnerRect;
|
|
543 |
const CFont* iBubbleFont;
|
|
544 |
TAknTextLineLayout iPreviewWndText;
|
|
545 |
};
|
|
546 |
|
|
547 |
#endif // C_PENINPUTFINGERHWRARLAFMANAGER_H
|
|
548 |
|
|
549 |
// End Of File
|