23 #include <s32mem.h> |
23 #include <s32mem.h> |
24 #include <barsread.h> |
24 #include <barsread.h> |
25 |
25 |
26 #include <aknlayoutscalable_apps.cdl.h> |
26 #include <aknlayoutscalable_apps.cdl.h> |
27 #include <aknlayoutscalable_avkon.cdl.h> |
27 #include <aknlayoutscalable_avkon.cdl.h> |
28 #include <aknlayoutdef.h> |
28 #include <AknLayoutDef.h> |
29 #include <aknutils.h> |
29 #include <AknUtils.h> |
30 #include <aknsutils.h> |
30 #include <AknsUtils.h> |
31 #include <akniconutils.h> |
31 #include <akniconutils.h> |
32 #include <aknfeppeninputenums.h> |
32 #include <aknfeppeninputenums.h> |
33 #include <aknfepglobalenums.h> |
33 #include <AknFepGlobalEnums.h> |
34 |
34 |
35 #include <peninputlayout.h> |
35 #include <peninputlayout.h> |
36 #include <peninputrepeatbutton.h> |
36 #include <peninputrepeatbutton.h> |
37 |
37 |
38 #include "hbufcarrayar.h" |
38 #include "hbufcarrayar.h" |
219 const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects, |
219 const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects, |
220 const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape) |
220 const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape) |
221 { |
221 { |
222 iIsLandscape = aIsLandscape; |
222 iIsLandscape = aIsLandscape; |
223 |
223 |
224 // relayout the button group |
224 // relayout the button |
225 TRect spaceBtnRect(aBtnRects[0]); |
225 TRect pageBtnRect(aBtnRects[0]); |
226 |
|
227 TInt pdx = (spaceBtnRect.Size().iWidth/3)/2; |
|
228 MoveIconButton(iSpaceBtn,spaceBtnRect,pdx,KSymbolButtonInnerPadding); |
|
229 |
|
230 TRect pieceInnerRect = spaceBtnRect; |
|
231 pieceInnerRect.Shrink(pdx*2,KSymbolButtonInnerPadding); |
|
232 |
|
233 // that's a not good algrithm in funciton AknPenInputDrawUtils::Draw3PiecesColorIcon for drawing 3Pieces icons |
|
234 // as when the outter rect's height was not equal to the inter rect's height, the target rects the left icons and right icons |
|
235 // would be bitblited onto are set to be Rect(0.0.0.0.0) [[which should not be that behavior]]. |
|
236 // Please theck the codes: AknPenInputDrawUtils::Draw3PiecesColorIcon: this function should be Updated. |
|
237 iSpaceBtn->SetDraw3PieceFrameInfo( |
|
238 TDraw3PiecesFrame(KAknsIIDQgnIndiInputSpaceL, |
|
239 KAknsIIDQgnIndiInputSpaceMiddle, |
|
240 KAknsIIDQgnIndiInputSpaceR, |
|
241 pieceInnerRect)); |
|
242 TRect enterBtnRect(aBtnRects[1]); |
|
243 |
|
244 MoveIconButton(iEnterBtn,enterBtnRect,pdx,KSymbolButtonInnerPadding); |
|
245 |
|
246 TRect pageBtnRect(aBtnRects[2]); |
|
247 |
226 |
248 if(aIsLandscape) |
227 if(aIsLandscape) |
249 { |
228 { |
250 i2Page1Btn->Hide(EFalse); |
229 i2Page1Btn->Hide(EFalse); |
251 i2Page2Btn->Hide(EFalse); |
230 i2Page2Btn->Hide(EFalse); |
301 iMutiPageKeypad->SetDrawOpaqueBackground( EFalse ); |
280 iMutiPageKeypad->SetDrawOpaqueBackground( EFalse ); |
302 } |
281 } |
303 |
282 |
304 void CPeninputArabicFingerHwrSymbolTable::CreateButtonGroupL() |
283 void CPeninputArabicFingerHwrSymbolTable::CreateButtonGroupL() |
305 { |
284 { |
306 iEnterBtn = CreateEventBtnL(EHwrCtrlIdBtnEnter,R_AKN_FEP_HWR_ENTER); |
|
307 iSpaceBtn = CreateEventBtnL(EHwrCtrlIdBtnSpace,R_AKN_FEP_HWR_SPACE); |
|
308 // Create 3-pieces color icon for space button |
|
309 CPenInput3PiecesColorIcons* colorIcons = |
|
310 CPenInput3PiecesColorIcons::NewL( R_AKN_FEP_VKB_SPACE_ICON1, |
|
311 R_AKN_FEP_VKB_SPACE_ICON2, |
|
312 R_AKN_FEP_VKB_SPACE_ICON3 ); |
|
313 iSpaceBtn->Set3PiecesColorIcons( colorIcons ); |
|
314 |
|
315 // create the page button for portrait |
285 // create the page button for portrait |
316 i3Page1Btn = CreateEventBtnL(EHwrCtrlId3Page1Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_1); |
286 i3Page1Btn = CreateEventBtnL(EHwrCtrlId3Page1Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_1); |
317 i3Page2Btn = CreateEventBtnL(EHwrCtrlId3Page2Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_2); |
287 i3Page2Btn = CreateEventBtnL(EHwrCtrlId3Page2Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_2); |
318 i3Page3Btn = CreateEventBtnL(EHwrCtrlId3Page3Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_3); |
288 i3Page3Btn = CreateEventBtnL(EHwrCtrlId3Page3Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_3); |
319 |
289 |
612 |
582 |
613 CleanupStack::PopAndDestroy( keytexts ); //keytexts |
583 CleanupStack::PopAndDestroy( keytexts ); //keytexts |
614 |
584 |
615 aVirtualKey->SetRect(aKeyRect); |
585 aVirtualKey->SetRect(aKeyRect); |
616 TRect innerrect = aKeyRect; |
586 TRect innerrect = aKeyRect; |
617 innerrect.Shrink( TSize(10,10) ); |
587 innerrect.Shrink( TSize(2,2) ); |
618 aVirtualKey->SetInnerRect( innerrect ); |
588 aVirtualKey->SetInnerRect( innerrect ); |
619 } |
589 } |
620 |
590 |
621 // --------------------------------------------------------------------------- |
591 // --------------------------------------------------------------------------- |
622 // Navigate the symbol page |
592 // Navigate the symbol page |
719 // |
689 // |
720 void CPeninputArabicFingerHwrSymbolTable::Draw() |
690 void CPeninputArabicFingerHwrSymbolTable::Draw() |
721 { |
691 { |
722 if(AbleToDraw()) |
692 if(AbleToDraw()) |
723 { |
693 { |
724 DrawOpaqueMaskBackground( Rect() ); |
694 //Draw button area background. |
725 |
695 // DrawOpaqueMaskBackground( Rect() ); |
|
696 // DrawOpaqueMaskBackground(); |
|
697 DrawOpaqueMaskBackground(iMutiPageKeypad->Rect()); |
726 if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() ) |
698 if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() ) |
727 { |
699 { |
728 AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved); |
700 AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved); |
729 } |
701 } |
730 // draw background |
702 // draw background |
731 DrawBackground(); |
703 // DrawBackground(); |
732 |
704 DrawBackground(iMutiPageKeypad->Rect()); |
733 // draw group |
705 // draw group |
734 CControlGroup::Draw(); |
706 CControlGroup::Draw(); |
735 |
707 |
736 // bitblt the new content to screen |
708 // bitblt the new content to screen |
737 UpdateArea(iRect); |
709 UpdateArea(iRect); |
738 } |
710 } |
739 } |
711 } |
740 |
|
741 // End Of File |
712 // End Of File |