286 TInt i = 0; |
290 TInt i = 0; |
287 iRectBtnClose = buttonRect[i++]; |
291 iRectBtnClose = buttonRect[i++]; |
288 iRectBtnOption = buttonRect[i++]; |
292 iRectBtnOption = buttonRect[i++]; |
289 iRectBtnRangeSmb = buttonRect[i++]; |
293 iRectBtnRangeSmb = buttonRect[i++]; |
290 iRectBtnBackspace = buttonRect[i++]; |
294 iRectBtnBackspace = buttonRect[i++]; |
291 iRectBtnArrowUp = buttonRect[i++]; |
295 iRectBtnArrowLeft = buttonRect[i++]; |
292 iRectBtnArrowDown = buttonRect[i++]; |
296 iRectBtnArrowRight = buttonRect[i++]; |
293 iRectBtnArrowLeft = buttonRect[i++]; |
297 iRectBtnSpace = buttonRect[i++]; |
294 iRectBtnArrowRight = buttonRect[i++]; |
298 iRectBtnEnter = buttonRect[i++]; |
295 buttonRect.Close(); |
299 buttonRect.Close(); |
296 |
300 |
297 // padding size of Btn |
301 // padding size of Btn |
298 iSizeBtnPadding = TSize(6, 6); |
302 TInt xpad = iRectBtnOption.iTl.iX - iRectBtnClose.iBr.iX; |
|
303 TInt ypad = iRectBtnArrowLeft.iTl.iY - iRectBtnClose.iBr.iY; |
|
304 |
|
305 iSizeBtnPadding = TSize(xpad, ypad); |
299 |
306 |
300 // padding size of arrow button |
307 // padding size of arrow button |
301 if(iIsLandscape) |
308 if(iIsLandscape) |
302 { |
309 { |
303 iArrowPaddingSize = TSize(8,8); |
310 iArrowPaddingSize = TSize(8,8); |
361 TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(2).LayoutLine(); |
385 TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(2).LayoutLine(); |
362 TAknLayoutRect candpaneRect; |
386 TAknLayoutRect candpaneRect; |
363 candpaneRect.LayoutRect( iLayoutRect, candlistpane ); |
387 candpaneRect.LayoutRect( iLayoutRect, candlistpane ); |
364 iRectOfSymbolTable = candpaneRect.Rect(); |
388 iRectOfSymbolTable = candpaneRect.Rect(); |
365 |
389 |
366 // get candidate row1 pane |
390 // get 1st row pane in button area |
367 TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 0).LayoutLine(); |
391 TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 0).LayoutLine(); |
368 TAknLayoutRect candrow1paneRect; |
392 TAknLayoutRect candrow1paneRect; |
369 candrow1paneRect.LayoutRect( iRectOfSymbolTable, candRow1Pane ); |
393 candrow1paneRect.LayoutRect( iRectOfSymbolTable, candRow1Pane ); |
370 |
394 |
371 iSymBtnRectArray.Reset(); |
395 iSymBtnRectArray.Reset(); |
372 for(TInt i = 0; i < 2; i++) |
396 TAknWindowLineLayout cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 5, 0, 0 ). |
373 { |
397 LayoutLine(); |
374 // get candidate cell pane with row 0 and col i |
398 TAknLayoutRect cellPaneRect; |
375 TAknWindowLineLayout cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 0, i , 0 ). |
399 cellPaneRect.LayoutRect( candrow1paneRect.Rect(), cellPane ); |
376 LayoutLine(); |
400 |
377 TAknLayoutRect cellPaneRect; |
401 // get the candidate cell bg pane with row 0 and col i |
378 cellPaneRect.LayoutRect( candrow1paneRect.Rect(), cellPane ); |
402 TAknWindowLineLayout cellbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(5).LayoutLine(); |
379 |
403 TAknLayoutRect cellbgRect; |
380 // get the candidate cell bg pane with row 0 and col i |
404 cellbgRect.LayoutRect( cellPaneRect.Rect(), cellbgpane ); |
381 TAknWindowLineLayout candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).LayoutLine(); |
405 iSymBtnRectArray.Append(cellbgRect.Rect()); |
382 TAknLayoutRect BgRect; |
406 //get 1st row pane in SCT area |
383 BgRect.LayoutRect( cellPaneRect.Rect(), candbgpane ); |
|
384 iSymBtnRectArray.Append(BgRect.Rect()); |
|
385 } |
|
386 |
|
387 TInt xGap = iSymBtnRectArray[1].iTl.iX - iSymBtnRectArray[0].iBr.iX; |
|
388 TRect thirdBtn(iSymBtnRectArray[1]); |
|
389 thirdBtn.Move(TPoint(iSymBtnRectArray[1].Width(),0)); |
|
390 iSymBtnRectArray.Append(thirdBtn); |
|
391 |
|
392 TAknWindowLineLayout rowPane, key1bgpane, keypane; |
|
393 TAknLayoutRect rowRect, key1bgRect, keyRect; |
|
394 |
|
395 TAknWindowLineLayout row1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 1).LayoutLine(); |
407 TAknWindowLineLayout row1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 1).LayoutLine(); |
396 TAknLayoutRect row1Rect; |
408 TAknLayoutRect row1Rect; |
397 row1Rect.LayoutRect(iRectOfSymbolTable,row1Pane); |
409 row1Rect.LayoutRect(iRectOfSymbolTable,row1Pane); |
398 iRectSctpad.iTl = row1Rect.Rect().iTl; |
410 iRectSctpad.iTl = row1Rect.Rect().iTl; |
399 iRectSctpad.iBr = iRectOfSymbolTable.iBr; |
411 // iRectSctpad.iBr = iRectOfSymbolTable.iBr; |
400 |
412 |
401 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 0 , 0 ). |
413 TAknWindowLineLayout key1bgpane, keypane; |
|
414 TAknLayoutRect key1bgRect, keyRect; |
|
415 |
|
416 |
|
417 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 0 , 0 ). |
402 LayoutLine(); |
418 LayoutLine(); |
403 keyRect.LayoutRect(row1Rect.Rect(), keypane); |
419 keyRect.LayoutRect(row1Rect.Rect(), keypane); |
404 |
420 |
405 key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine(); |
421 key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine(); |
406 key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane); |
422 key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane); |
407 |
423 |
408 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 1 , 0 ). |
424 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 1 , 0 ). |
409 LayoutLine(); |
425 LayoutLine(); |
410 keyRect.LayoutRect(row1Rect.Rect(), keypane); |
426 keyRect.LayoutRect(row1Rect.Rect(), keypane); |
411 |
427 |
412 TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine(); |
428 TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine(); |
413 TAknLayoutRect key2bgRect; |
429 TAknLayoutRect key2bgRect; |
414 key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane); |
430 key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane); |
415 |
431 |
416 TAknWindowLineLayout row2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 2).LayoutLine(); |
432 TAknWindowLineLayout row2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 2).LayoutLine(); |
417 TAknLayoutRect row2Rect; |
433 TAknLayoutRect row2Rect; |
418 row2Rect.LayoutRect(iRectOfSymbolTable,row2Pane); |
434 row2Rect.LayoutRect(iRectOfSymbolTable,row2Pane); |
419 |
435 |
420 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 0 , 0 ).LayoutLine(); |
436 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 0 , 0 ).LayoutLine(); |
421 keyRect.LayoutRect(row2Rect.Rect(), keypane); |
437 keyRect.LayoutRect(row2Rect.Rect(), keypane); |
422 |
438 |
423 TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine(); |
439 TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine(); |
424 TAknLayoutRect key3bgRect; |
440 TAknLayoutRect key3bgRect; |
425 key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane); |
441 key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane); |
426 |
442 |
427 TInt keyHorizontalGap = key2bgRect.Rect().iTl.iX - key1bgRect.Rect().iBr.iX; |
443 TInt keyHorizontalGap = key2bgRect.Rect().iTl.iX - key1bgRect.Rect().iBr.iX; |
428 TInt keyVerticalGap = key3bgRect.Rect().iTl.iY - key1bgRect.Rect().iBr.iY; |
444 TInt keyVerticalGap = key3bgRect.Rect().iTl.iY - key1bgRect.Rect().iBr.iY; |
517 // calculate the symbol table rect |
536 // calculate the symbol table rect |
518 iRectOfSymbolTable.iBr = iRectSctpad.iBr; |
537 iRectOfSymbolTable.iBr = iRectSctpad.iBr; |
519 } |
538 } |
520 |
539 |
521 // --------------------------------------------------------------------------- |
540 // --------------------------------------------------------------------------- |
|
541 // CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForNumSymbolTable() |
|
542 // Retrieve the landscape laf data for number symbol table area |
|
543 // --------------------------------------------------------------------------- |
|
544 // |
|
545 void CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForNumSymbolTable() |
|
546 { |
|
547 // TAknLayoutScalableParameterLimits candiPaneVariety = AknLayoutScalable_Avkon::fshwr2_func_candi_pane_ParamLimits(2); |
|
548 |
|
549 iNumSctpadRowCount = KLandscapeNumpadRow; |
|
550 iNumSctpadColCount = KLandscapeNumpadCol; |
|
551 |
|
552 // get the functional buttons laf data for symbol table |
|
553 // candidate list |
|
554 TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(2).LayoutLine(); |
|
555 TAknLayoutRect candpaneRect; |
|
556 candpaneRect.LayoutRect( iLayoutRect, candlistpane ); |
|
557 iRectOfNumSymbolTable = candpaneRect.Rect(); |
|
558 |
|
559 // get candidate row1 pane |
|
560 TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(2, 0, 0).LayoutLine(); |
|
561 TAknLayoutRect candrow1paneRect; |
|
562 candrow1paneRect.LayoutRect( candpaneRect.Rect(), candRow1Pane ); |
|
563 |
|
564 TAknWindowLineLayout rowPane, key1bgpane, keypane; |
|
565 TAknLayoutRect rowRect, key1bgRect, keyRect; |
|
566 |
|
567 iRectNumpad.iTl = candpaneRect.Rect().iTl; |
|
568 |
|
569 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 0 , 0 ). |
|
570 LayoutLine(); |
|
571 keyRect.LayoutRect(candrow1paneRect.Rect(), keypane); |
|
572 |
|
573 key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine(); |
|
574 key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane); |
|
575 |
|
576 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 1 , 0 ). |
|
577 LayoutLine(); |
|
578 keyRect.LayoutRect(candrow1paneRect.Rect(), keypane); |
|
579 |
|
580 TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine(); |
|
581 TAknLayoutRect key2bgRect; |
|
582 key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane); |
|
583 |
|
584 TAknWindowLineLayout row2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(2, 0, 1).LayoutLine(); |
|
585 TAknLayoutRect row2Rect; |
|
586 row2Rect.LayoutRect(candpaneRect.Rect(),row2Pane); |
|
587 |
|
588 keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 1, 0 ).LayoutLine(); |
|
589 keyRect.LayoutRect(row2Rect.Rect(), keypane); |
|
590 |
|
591 TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine(); |
|
592 TAknLayoutRect key3bgRect; |
|
593 key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane); |
|
594 |
|
595 TInt keyHorizontalGap = key2bgRect.Rect().iTl.iX - key1bgRect.Rect().iBr.iX; |
|
596 TInt keyVerticalGap = key3bgRect.Rect().iTl.iY - key1bgRect.Rect().iBr.iY; |
|
597 |
|
598 TRect cursorRect(key1bgRect.Rect()); |
|
599 TRect originRect(key1bgRect.Rect()); |
|
600 TInt rectHeight = cursorRect.Height(); |
|
601 TInt rectWidth = cursorRect.Width(); |
|
602 |
|
603 iNumSCTrectArray.Reset(); |
|
604 for(TInt i = 0; i < iNumSctpadRowCount; i++) |
|
605 { |
|
606 cursorRect = originRect; |
|
607 cursorRect.Move(0,i*(rectHeight+keyVerticalGap)); |
|
608 iNumSCTrectArray.Append(cursorRect); |
|
609 for(TInt j = 1; j < iNumSctpadColCount; j++) |
|
610 { |
|
611 cursorRect.Move((rectWidth+keyHorizontalGap),0); |
|
612 iNumSCTrectArray.Append(cursorRect); |
|
613 } |
|
614 } |
|
615 |
|
616 // calculate the symbol table rect |
|
617 iRectOfNumSymbolTable.iBr = cursorRect.iBr; |
|
618 iRectNumpad.iBr = iRectOfNumSymbolTable.iBr; |
|
619 } |
|
620 |
|
621 // --------------------------------------------------------------------------- |
|
622 // CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForNumSymbolTable() |
|
623 // Retrieve the portrait laf data for number symbol table area |
|
624 // --------------------------------------------------------------------------- |
|
625 // |
|
626 void CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForNumSymbolTable() |
|
627 { |
|
628 |
|
629 // get the functional buttons laf data for number symbol table |
|
630 // candidate list |
|
631 TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine(); |
|
632 |
|
633 TAknLayoutRect candpaneRect; |
|
634 candpaneRect.LayoutRect( iLayoutRect, candlistpane ); |
|
635 TRect rect = candpaneRect.Rect(); |
|
636 |
|
637 // get candidate row2 pane |
|
638 TAknWindowLineLayout candRow2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1). |
|
639 LayoutLine(); |
|
640 TAknLayoutRect candrow2paneRect; |
|
641 candrow2paneRect.LayoutRect( rect, candRow2Pane ); |
|
642 iRectOfNumSymbolTable.iTl = candrow2paneRect.Rect().iTl; |
|
643 |
|
644 // get the virtual key rects |
|
645 TAknWindowLineLayout writingBoxPane; |
|
646 TAknLayoutRect boxRect; |
|
647 writingBoxPane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(0).LayoutLine(); |
|
648 boxRect.LayoutRect(iLayoutRect, writingBoxPane); |
|
649 iRectNumpad = boxRect.Rect(); |
|
650 |
|
651 TAknWindowLineLayout keypane, keybgpane; |
|
652 TAknLayoutRect keyRect, keybgRect; |
|
653 |
|
654 TAknLayoutScalableParameterLimits sctPaneVariety = |
|
655 AknLayoutScalable_Avkon::cell_fshwr2_syb_pane_ParamLimits(0); |
|
656 |
|
657 iNumSctpadRowCount = sctPaneVariety.LastRow() + 1; |
|
658 iNumSctpadColCount = sctPaneVariety.LastColumn() + 1; |
|
659 |
|
660 iNumSCTrectArray.Reset(); |
|
661 for(TInt i = 0; i < iNumSctpadRowCount; i++) |
|
662 { |
|
663 for ( TInt j = 0; j < iNumSctpadColCount; j++ ) |
|
664 { |
|
665 keypane = AknLayoutScalable_Avkon::cell_fshwr2_syb_pane(0, j, i).LayoutLine(); |
|
666 keyRect.LayoutRect(iRectNumpad, keypane); |
|
667 keybgpane = AknLayoutScalable_Avkon::cell_fshwr2_syb_bg_pane(0).LayoutLine(); |
|
668 keybgRect.LayoutRect(keyRect.Rect(), keybgpane); |
|
669 iNumSCTrectArray.Append( keybgRect.Rect()); |
|
670 } |
|
671 } |
|
672 iSizeNumSctpadCell = keybgRect.Rect().Size(); |
|
673 |
|
674 // calculate the symbol table rect |
|
675 iRectOfNumSymbolTable.iBr = iRectNumpad.iBr; |
|
676 } |
|
677 |
|
678 // --------------------------------------------------------------------------- |
522 // CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble() |
679 // CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble() |
523 // Retrieve the laf data for preview bubble |
680 // Retrieve the laf data for preview bubble |
524 // --------------------------------------------------------------------------- |
681 // --------------------------------------------------------------------------- |
525 // |
682 // |
526 void CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble() |
683 void CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble() |
1020 aArrayRects.Append(absoluteRect); |
1202 aArrayRects.Append(absoluteRect); |
1021 } |
1203 } |
1022 } |
1204 } |
1023 |
1205 |
1024 // --------------------------------------------------------------------------- |
1206 // --------------------------------------------------------------------------- |
|
1207 // get cell rect of virtual sctpad. |
|
1208 // --------------------------------------------------------------------------- |
|
1209 // |
|
1210 void CPeninputFingerHwrArLafManager::GetNumVirtualKeyRects( RArray<TRect>& aArrayRects ) |
|
1211 { |
|
1212 aArrayRects.Reset(); |
|
1213 |
|
1214 for(TInt i = 0; i < iNumSCTrectArray.Count(); i++) |
|
1215 { |
|
1216 TRect absoluteRect = iNumSCTrectArray[i]; |
|
1217 absoluteRect.Move(-iRectNumpad.iTl.iX, -iRectNumpad.iTl.iY); |
|
1218 aArrayRects.Append(absoluteRect); |
|
1219 } |
|
1220 } |
|
1221 |
|
1222 // --------------------------------------------------------------------------- |
1025 // get text layout of virtual sctpad. |
1223 // get text layout of virtual sctpad. |
1026 // --------------------------------------------------------------------------- |
1224 // --------------------------------------------------------------------------- |
1027 // |
1225 // |
1028 TAknTextLineLayout CPeninputFingerHwrArLafManager::SctpadKeyTxtLayout() |
1226 TAknTextLineLayout CPeninputFingerHwrArLafManager::SctpadKeyTxtLayout() |
1029 { |
1227 { |
1030 TAknTextLineLayout layout = AknLayoutScalable_Avkon:: |
1228 TAknTextLineLayout layout; |
1031 cell_fshwr2_syb_bg_pane_t1(0).LayoutLine(); |
1229 if(iIsLandscape) |
|
1230 { |
|
1231 layout = AknLayoutScalable_Avkon:: |
|
1232 fshwr2_func_candi_cell_pane_t1(4).LayoutLine(); |
|
1233 } |
|
1234 else |
|
1235 { |
|
1236 layout = AknLayoutScalable_Avkon:: |
|
1237 cell_fshwr2_syb_bg_pane_t1(0).LayoutLine(); |
|
1238 } |
|
1239 return layout; |
|
1240 } |
|
1241 |
|
1242 // --------------------------------------------------------------------------- |
|
1243 // get text layout of virtual sctpad. |
|
1244 // --------------------------------------------------------------------------- |
|
1245 // |
|
1246 TAknTextLineLayout CPeninputFingerHwrArLafManager::NumpadKeyTxtLayout() |
|
1247 { |
|
1248 TAknTextLineLayout layout; |
|
1249 if(iIsLandscape) |
|
1250 { |
|
1251 layout = AknLayoutScalable_Avkon:: |
|
1252 fshwr2_func_candi_cell_pane_t1(6).LayoutLine(); |
|
1253 } |
|
1254 else |
|
1255 { |
|
1256 layout = AknLayoutScalable_Avkon:: |
|
1257 cell_fshwr2_syb_bg_pane_t1(0).LayoutLine(); |
|
1258 } |
1032 return layout; |
1259 return layout; |
1033 } |
1260 } |
1034 |
1261 |
1035 // --------------------------------------------------------------------------- |
1262 // --------------------------------------------------------------------------- |
1036 // get width unit of candidate list. |
1263 // get width unit of candidate list. |