200 { |
200 { |
201 return ( iLayoutDataInfo.Count() && iLayoutType != ELayoutNone ) ? ETrue : EFalse; |
201 return ( iLayoutDataInfo.Count() && iLayoutType != ELayoutNone ) ? ETrue : EFalse; |
202 } |
202 } |
203 |
203 |
204 // --------------------------------------------------------------------------- |
204 // --------------------------------------------------------------------------- |
205 // Get split indicator rect with text |
|
206 // --------------------------------------------------------------------------- |
|
207 // |
|
208 const TRect& MPeninputLafDataCommon::SplitIndiRectWithText() const |
|
209 { |
|
210 ASSERT( IsValid()); |
|
211 return iLayoutDataInfo[iLayoutType]->iSplitIndiPaneRectWithText; |
|
212 } |
|
213 |
|
214 // --------------------------------------------------------------------------- |
|
215 // Get split indicator rect without text |
|
216 // --------------------------------------------------------------------------- |
|
217 // |
|
218 const TRect& MPeninputLafDataCommon::SplitIndiRectWithoutText() const |
|
219 { |
|
220 ASSERT( IsValid()); |
|
221 return iLayoutDataInfo[iLayoutType]->iSplitIndiPaneRectWithoutText; |
|
222 } |
|
223 |
|
224 // --------------------------------------------------------------------------- |
|
225 // Get split indicator icon rect with text |
|
226 // --------------------------------------------------------------------------- |
|
227 // |
|
228 const TRect& MPeninputLafDataCommon::SplitIndiIconRectWithText() const |
|
229 { |
|
230 ASSERT( IsValid()); |
|
231 return iLayoutDataInfo[iLayoutType]->iSplitIndiIconRectWithText; |
|
232 } |
|
233 |
|
234 // --------------------------------------------------------------------------- |
|
235 // Get split indicator icon rect without text |
|
236 // --------------------------------------------------------------------------- |
|
237 // |
|
238 const TRect& MPeninputLafDataCommon::SplitIndiIconRectWithoutText() const |
|
239 { |
|
240 ASSERT( IsValid()); |
|
241 return iLayoutDataInfo[iLayoutType]->iSplitIndiIconRectWithoutText; |
|
242 } |
|
243 |
|
244 // --------------------------------------------------------------------------- |
|
245 // Get split indicator text layout |
|
246 // --------------------------------------------------------------------------- |
|
247 // |
|
248 const TAknTextLineLayout& MPeninputLafDataCommon::SplitIndiText() const |
|
249 { |
|
250 ASSERT( IsValid()); |
|
251 return iLayoutDataInfo[iLayoutType]->iSplitIndiText; |
|
252 } |
|
253 |
|
254 // --------------------------------------------------------------------------- |
|
255 // Symbian constructor |
205 // Symbian constructor |
256 // --------------------------------------------------------------------------- |
206 // --------------------------------------------------------------------------- |
257 // |
207 // |
258 CPeninputLafDataFSQ* CPeninputLafDataFSQ::NewL( TInt aLayoutType ) |
208 CPeninputLafDataFSQ* CPeninputLafDataFSQ::NewL( TInt aLayoutType ) |
259 { |
209 { |
427 rowNumberOfKeyboard = 3; |
377 rowNumberOfKeyboard = 3; |
428 break; |
378 break; |
429 } |
379 } |
430 } |
380 } |
431 |
381 |
432 // Compute the gap between first row key's top line and keyboard's top line |
382 // Compute the gap between first row key's top line and keyboard's top line |
433 gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY; |
383 gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY; |
434 // Compute function button's top left Y coordinate |
384 // Compute function button's top left Y coordinate |
435 rectOfButtons.iTl.iY = rectOfButtons.iTl.iY + |
385 rectOfButtons.iTl.iY = rectOfButtons.iTl.iY + |
436 keypaneRect.Rect().Height() * rowNumberOfKeyboard + gapValue; |
386 keypaneRect.Rect().Height() * rowNumberOfKeyboard + gapValue; |
437 |
387 |
462 bound.Move( j * rectXPane.Width(), i * rectXPane.Height() ); |
412 bound.Move( j * rectXPane.Width(), i * rectXPane.Height() ); |
463 |
413 |
464 data->iKeypad.iRects.AppendL( bound ); |
414 data->iKeypad.iRects.AppendL( bound ); |
465 |
415 |
466 TRect inner = rectXPane; |
416 TRect inner = rectXPane; |
467 inner.Move( j * rectXPane.Width(), i * rectXPane.Height() ); |
417 inner.Move( j * rectXPane.Width(), i * rectXPane.Height() ); |
468 |
418 |
469 TAknLayoutText keyTextLayout; |
419 TAknLayoutText keyTextLayout; |
470 keyTextLayout.LayoutText( inner, keyText ); |
420 keyTextLayout.LayoutText( inner, keyText ); |
471 data->iKeypad.iCharRects.AppendL( keyTextLayout.TextRect() ); |
421 data->iKeypad.iCharRects.AppendL( keyTextLayout.TextRect() ); |
472 } |
422 } |
474 |
424 |
475 //buttons |
425 //buttons |
476 |
426 |
477 //all template rects are relative to TL of buttons row |
427 //all template rects are relative to TL of buttons row |
478 rectXPane = keypaneRect.Rect(); |
428 rectXPane = keypaneRect.Rect(); |
479 |
|
480 // The key rect without gap |
429 // The key rect without gap |
481 rectXBorder = RelativeRect( keypaneRect.Rect(), rectXPane.iTl ); |
430 rectXBorder = RelativeRect( keypaneRect.Rect(), rectXPane.iTl ); |
482 |
|
483 rectXInner = RelativeRect( keylabelRect.Rect(), rectXPane.iTl ); |
431 rectXInner = RelativeRect( keylabelRect.Rect(), rectXPane.iTl ); |
484 TRect rect3PicPane = RelativeRect( pic3paneRect.Rect(), rectXPane.iTl ); |
432 TRect rect3PicPane = RelativeRect( pic3paneRect.Rect(), rectXPane.iTl ); |
485 rectXPane.Move( - rectXPane.iTl ); |
433 rectXPane.Move( - rectXPane.iTl ); |
486 |
434 |
487 TInt spaceBtnWidth = rectOfButtons.Width() - rectXPane.Width() * 8; |
435 TInt spaceBtnWidth = rectOfButtons.Width() - rectXPane.Width() * 8; |
541 layoutInnerect.LayoutRect( layoutrect.Rect(), linelayoutInner ); |
489 layoutInnerect.LayoutRect( layoutrect.Rect(), linelayoutInner ); |
542 |
490 |
543 data->iPreviewWndText = keyText; |
491 data->iPreviewWndText = keyText; |
544 data->iPreviewWndRect = layoutrect.Rect(); |
492 data->iPreviewWndRect = layoutrect.Rect(); |
545 data->iPreviewWndInnerRect = layoutInnerect.Rect(); |
493 data->iPreviewWndInnerRect = layoutInnerect.Rect(); |
546 |
|
547 // bubble indicator |
|
548 TAknWindowLineLayout icfIndiPaneWithText, icfIndiPaneWithoutText, |
|
549 indiIconWithText, indiIconWithoutText; |
|
550 TAknLayoutRect icfIndiPaneRectWithText, icfIndiPaneRectWithoutText, |
|
551 indiIconRectWithText, indiIconRectWithoutText; |
|
552 TAknTextLineLayout indiTextLayout; |
|
553 |
|
554 icfIndiPaneWithText = AknLayoutScalable_Avkon::icf_edit_indi_pane(1).LayoutLine(); |
|
555 icfIndiPaneRectWithText.LayoutRect( rectAppWin, icfIndiPaneWithText ); |
|
556 data->iSplitIndiPaneRectWithText = icfIndiPaneRectWithText.Rect(); |
|
557 |
|
558 icfIndiPaneWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine(); |
|
559 icfIndiPaneRectWithoutText.LayoutRect( rectAppWin, icfIndiPaneWithoutText ); |
|
560 data->iSplitIndiPaneRectWithoutText = icfIndiPaneRectWithoutText.Rect(); |
|
561 |
|
562 indiIconWithText = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(1).LayoutLine(); |
|
563 indiIconRectWithText.LayoutRect( icfIndiPaneRectWithText.Rect(), indiIconWithText ); |
|
564 data->iSplitIndiIconRectWithText = indiIconRectWithText.Rect(); |
|
565 |
|
566 indiIconWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(0).LayoutLine(); |
|
567 indiIconRectWithoutText.LayoutRect( icfIndiPaneRectWithoutText.Rect(), indiIconWithoutText ); |
|
568 data->iSplitIndiIconRectWithoutText = indiIconRectWithoutText.Rect(); |
|
569 |
|
570 indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(0).LayoutLine(); |
|
571 data->iSplitIndiText = indiTextLayout; |
|
572 |
494 |
573 return data; |
495 return data; |
574 } |
496 } |
575 |
497 |
576 // --------------------------------------------------------------------------- |
498 // --------------------------------------------------------------------------- |
904 // --------------------------------------------------------------------------- |
826 // --------------------------------------------------------------------------- |
905 // |
827 // |
906 void CPeninputSplitQwertyLafMgr::ConstructL() |
828 void CPeninputSplitQwertyLafMgr::ConstructL() |
907 { |
829 { |
908 } |
830 } |
909 |
|
910 // --------------------------------------------------------------------------- |
|
911 // Get split indicator rect with text |
|
912 // --------------------------------------------------------------------------- |
|
913 // |
|
914 const TRect& CPeninputSplitQwertyLafMgr::SplitIndiRectWithText() const |
|
915 { |
|
916 ASSERT(iLafData); |
|
917 return iLafData->SplitIndiRectWithText(); |
|
918 } |
|
919 |
|
920 // --------------------------------------------------------------------------- |
|
921 // Get split indicator pane rect without text |
|
922 // --------------------------------------------------------------------------- |
|
923 // |
|
924 const TRect& CPeninputSplitQwertyLafMgr::SplitIndiRectWithoutText() const |
|
925 { |
|
926 ASSERT(iLafData); |
|
927 return iLafData->SplitIndiRectWithoutText(); |
|
928 } |
|
929 |
|
930 // --------------------------------------------------------------------------- |
|
931 // Get split indicator icon rect with text |
|
932 // --------------------------------------------------------------------------- |
|
933 // |
|
934 const TRect& CPeninputSplitQwertyLafMgr::SplitIndiIconRectWithText() const |
|
935 { |
|
936 ASSERT(iLafData); |
|
937 return iLafData->SplitIndiIconRectWithText(); |
|
938 } |
|
939 |
|
940 // --------------------------------------------------------------------------- |
|
941 // Get split indicator icon rect without text |
|
942 // --------------------------------------------------------------------------- |
|
943 // |
|
944 const TRect& CPeninputSplitQwertyLafMgr::SplitIndiIconRectWithoutText() const |
|
945 { |
|
946 ASSERT(iLafData); |
|
947 return iLafData->SplitIndiIconRectWithoutText(); |
|
948 } |
|
949 |
|
950 // --------------------------------------------------------------------------- |
|
951 // Get split indicator text layout |
|
952 // --------------------------------------------------------------------------- |
|
953 // |
|
954 const TAknTextLineLayout& CPeninputSplitQwertyLafMgr::SplitIndiText() const |
|
955 { |
|
956 ASSERT(iLafData); |
|
957 return iLafData->SplitIndiText(); |
|
958 } |
|
959 // End Of File |
831 // End Of File |