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 |
52 // ============================ MEMBER FUNCTIONS ============================= |
92 // ============================ MEMBER FUNCTIONS ============================= |
53 |
93 |
54 // --------------------------------------------------------------------------- |
94 // --------------------------------------------------------------------------- |
55 // Symbian Constructor |
95 // Symbian Constructor |
56 // --------------------------------------------------------------------------- |
96 // --------------------------------------------------------------------------- |
99 //create the arabic window control |
139 //create the arabic window control |
100 CreateHwrWindowL(); |
140 CreateHwrWindowL(); |
101 |
141 |
102 //retrieve the settings |
142 //retrieve the settings |
103 LoadAndPublishDefaultL(); |
143 LoadAndPublishDefaultL(); |
104 |
144 |
|
145 //iCallBack = new (ELeave) CPeninputFingerHwrArCallBack(this); |
|
146 |
105 //set screen layout extent |
147 //set screen layout extent |
106 SetRect( TRect( TPoint( 0, 0 ), ScreenSize() ) ); |
148 SetRect( TRect( TPoint( 0, 0 ), ScreenSize() ) ); |
107 } |
149 } |
108 |
150 |
109 // --------------------------------------------------------------------------- |
151 // --------------------------------------------------------------------------- |
583 newValue = GetPenTrailColor(); |
625 newValue = GetPenTrailColor(); |
584 SetBoxPenColor( newValue ); |
626 SetBoxPenColor( newValue ); |
585 |
627 |
586 iRepositorySetting->Get( KSettingsPenInputLang, newValue ); |
628 iRepositorySetting->Get( KSettingsPenInputLang, newValue ); |
587 iDataStore->SetLanguageL( newValue ); |
629 iDataStore->SetLanguageL( newValue ); |
588 |
630 |
|
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 // } |
589 iHwrWnd->SetNativeNumMode(iDataStore->IsNativeNumMode()); |
641 iHwrWnd->SetNativeNumMode(iDataStore->IsNativeNumMode()); |
590 } |
642 } |
591 |
643 |
592 // --------------------------------------------------------------------------- |
644 // --------------------------------------------------------------------------- |
593 // |
645 // |
620 |
672 |
621 delete iDataStore; |
673 delete iDataStore; |
622 delete iStateMgr; |
674 delete iStateMgr; |
623 delete iGSRepositoryWatcher; |
675 delete iGSRepositoryWatcher; |
624 delete iRepositorySetting; |
676 delete iRepositorySetting; |
|
677 // delete iCommonEngineRepository; |
|
678 //delete iCallBack; |
625 } |
679 } |
626 |
680 |
627 // --------------------------------------------------------------------------- |
681 // --------------------------------------------------------------------------- |
628 // Create the hwr box window. |
682 // Create the hwr box window. |
629 // --------------------------------------------------------------------------- |
683 // --------------------------------------------------------------------------- |
876 // handler of StrokeStarted event. |
930 // handler of StrokeStarted event. |
877 // --------------------------------------------------------------------------- |
931 // --------------------------------------------------------------------------- |
878 // |
932 // |
879 void CPeninputFingerHwrArLayout::OnHwrStrokeStartedL() |
933 void CPeninputFingerHwrArLayout::OnHwrStrokeStartedL() |
880 { |
934 { |
|
935 //iCallBack->IssueRequestL(); |
881 iHwrWnd->HideIndicator(); |
936 iHwrWnd->HideIndicator(); |
882 |
937 |
883 // The default candidate cell is not highlight |
938 // The default candidate cell is not highlight |
884 iDataStore->SetHighlight(EFalse); |
939 iDataStore->SetHighlight(EFalse); |
885 |
940 |