47 const TUint8 KIntLen = sizeof(TInt)/2; |
47 const TUint8 KIntLen = sizeof(TInt)/2; |
48 const TUint8 KIntSize = sizeof(TInt); |
48 const TUint8 KIntSize = sizeof(TInt); |
49 |
49 |
50 const TInt16 KEmotionKeyMark = 0xFFFE; |
50 const TInt16 KEmotionKeyMark = 0xFFFE; |
51 |
51 |
52 class CPeninputFingerHwrArCallBack : public CActive |
|
53 { |
|
54 friend class CPeninputFingerHwrArLayout; |
|
55 public: |
|
56 void IssueRequestL(); |
|
57 private: |
|
58 CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout); |
|
59 void RunL(); |
|
60 void DoCancel(); |
|
61 private: |
|
62 CPeninputFingerHwrArLayout* iHwrArLayout; |
|
63 }; |
|
64 |
|
65 CPeninputFingerHwrArCallBack::CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout) |
|
66 :CActive(EPriorityHigh) |
|
67 { |
|
68 CActiveScheduler::Add(this); |
|
69 iHwrArLayout = aHwrArLayout; |
|
70 } |
|
71 void CPeninputFingerHwrArCallBack::IssueRequestL() |
|
72 { |
|
73 if(!IsActive()) |
|
74 { |
|
75 iStatus=KRequestPending; |
|
76 SetActive(); |
|
77 TRequestStatus *pS=(&iStatus); |
|
78 |
|
79 User::RequestComplete(pS,0); |
|
80 } |
|
81 } |
|
82 void CPeninputFingerHwrArCallBack::RunL() |
|
83 { |
|
84 iHwrArLayout->CallBackL(); |
|
85 } |
|
86 |
|
87 void CPeninputFingerHwrArCallBack::DoCancel() |
|
88 { |
|
89 |
|
90 } |
|
91 |
|
92 // ============================ MEMBER FUNCTIONS ============================= |
52 // ============================ MEMBER FUNCTIONS ============================= |
93 |
53 |
94 // --------------------------------------------------------------------------- |
54 // --------------------------------------------------------------------------- |
95 // Symbian Constructor |
55 // Symbian Constructor |
96 // --------------------------------------------------------------------------- |
56 // --------------------------------------------------------------------------- |
139 //create the arabic window control |
99 //create the arabic window control |
140 CreateHwrWindowL(); |
100 CreateHwrWindowL(); |
141 |
101 |
142 //retrieve the settings |
102 //retrieve the settings |
143 LoadAndPublishDefaultL(); |
103 LoadAndPublishDefaultL(); |
144 |
104 |
145 //iCallBack = new (ELeave) CPeninputFingerHwrArCallBack(this); |
|
146 |
|
147 //set screen layout extent |
105 //set screen layout extent |
148 SetRect( TRect( TPoint( 0, 0 ), ScreenSize() ) ); |
106 SetRect( TRect( TPoint( 0, 0 ), ScreenSize() ) ); |
149 } |
107 } |
150 |
108 |
151 // --------------------------------------------------------------------------- |
109 // --------------------------------------------------------------------------- |
625 newValue = GetPenTrailColor(); |
583 newValue = GetPenTrailColor(); |
626 SetBoxPenColor( newValue ); |
584 SetBoxPenColor( newValue ); |
627 |
585 |
628 iRepositorySetting->Get( KSettingsPenInputLang, newValue ); |
586 iRepositorySetting->Get( KSettingsPenInputLang, newValue ); |
629 iDataStore->SetLanguageL( newValue ); |
587 iDataStore->SetLanguageL( newValue ); |
630 |
588 |
631 // TInt displayLang = 0; |
|
632 // iCommonEngineRepository->Get(KGSDisplayTxtLang,displayLang); |
|
633 // if(displayLang == ELangArabic) |
|
634 // { |
|
635 // iHwrWnd->SetNativeNumMode(ETrue); |
|
636 // } |
|
637 // else |
|
638 // { |
|
639 // iHwrWnd->SetNativeNumMode(EFalse); |
|
640 // } |
|
641 iHwrWnd->SetNativeNumMode(iDataStore->IsNativeNumMode()); |
589 iHwrWnd->SetNativeNumMode(iDataStore->IsNativeNumMode()); |
642 } |
590 } |
643 |
591 |
644 // --------------------------------------------------------------------------- |
592 // --------------------------------------------------------------------------- |
645 // |
593 // |
672 |
620 |
673 delete iDataStore; |
621 delete iDataStore; |
674 delete iStateMgr; |
622 delete iStateMgr; |
675 delete iGSRepositoryWatcher; |
623 delete iGSRepositoryWatcher; |
676 delete iRepositorySetting; |
624 delete iRepositorySetting; |
677 // delete iCommonEngineRepository; |
|
678 //delete iCallBack; |
|
679 } |
625 } |
680 |
626 |
681 // --------------------------------------------------------------------------- |
627 // --------------------------------------------------------------------------- |
682 // Create the hwr box window. |
628 // Create the hwr box window. |
683 // --------------------------------------------------------------------------- |
629 // --------------------------------------------------------------------------- |
930 // handler of StrokeStarted event. |
876 // handler of StrokeStarted event. |
931 // --------------------------------------------------------------------------- |
877 // --------------------------------------------------------------------------- |
932 // |
878 // |
933 void CPeninputFingerHwrArLayout::OnHwrStrokeStartedL() |
879 void CPeninputFingerHwrArLayout::OnHwrStrokeStartedL() |
934 { |
880 { |
935 //iCallBack->IssueRequestL(); |
|
936 iHwrWnd->HideIndicator(); |
881 iHwrWnd->HideIndicator(); |
937 |
882 |
938 // The default candidate cell is not highlight |
883 // The default candidate cell is not highlight |
939 iDataStore->SetHighlight(EFalse); |
884 iDataStore->SetHighlight(EFalse); |
940 |
885 |