24 #include "peninputitutchnuistatepinyincomposition.h" |
24 #include "peninputitutchnuistatepinyincomposition.h" |
25 #include "peninputgenericitutuimgrbase.h" |
25 #include "peninputgenericitutuimgrbase.h" |
26 #include "peninputgenericitutdatamgr.h" |
26 #include "peninputgenericitutdatamgr.h" |
27 #include "peninputgenericitutlayoutcontext.h" |
27 #include "peninputgenericitutlayoutcontext.h" |
28 #include "peninputgenericitutconverter.h" |
28 #include "peninputgenericitutconverter.h" |
|
29 #include "peninputgenericitutwindowmanager.h" |
29 |
30 |
30 CChnItutUiStatePinyinComposition* CChnItutUiStatePinyinComposition::NewL( |
31 CChnItutUiStatePinyinComposition* CChnItutUiStatePinyinComposition::NewL( |
31 CGenericItutUiMgrBase* aOwner) |
32 CGenericItutUiMgrBase* aOwner) |
32 { |
33 { |
33 CChnItutUiStatePinyinComposition* self = |
34 CChnItutUiStatePinyinComposition* self = |
80 void CChnItutUiStatePinyinComposition::OnExit() |
83 void CChnItutUiStatePinyinComposition::OnExit() |
81 { |
84 { |
82 // hide dropdownlist & reset its status |
85 // hide dropdownlist & reset its status |
83 CFepCtrlDropdownList* spelllist = static_cast<CFepCtrlDropdownList*>( |
86 CFepCtrlDropdownList* spelllist = static_cast<CFepCtrlDropdownList*>( |
84 iOwner->LayoutContext()->Control(ECtrlIdSpellCandsList)); |
87 iOwner->LayoutContext()->Control(ECtrlIdSpellCandsList)); |
85 spelllist->ResetAndClear(CFepCtrlDropdownList::EListExpandableRollWithIcon); |
|
86 iSpellCands.ResetAndDestroy(); |
|
87 iSpellCands.Close(); |
|
88 spelllist->Hide(ETrue); |
88 spelllist->Hide(ETrue); |
89 |
89 |
90 CFepCtrlDropdownList* candlist = static_cast<CFepCtrlDropdownList*>( |
90 CFepCtrlDropdownList* candlist = static_cast<CFepCtrlDropdownList*>( |
91 iOwner->LayoutContext()->Control(ECtrlIdStdCandsList)); |
91 iOwner->LayoutContext()->Control(ECtrlIdStdCandsList)); |
92 candlist->ResetAndClear(CFepCtrlDropdownList::EListExpandable); |
|
93 iOwner->DataMgr()->ClearChnCandidates(EItutCandidates); |
92 iOwner->DataMgr()->ClearChnCandidates(EItutCandidates); |
94 candlist->Hide(ETrue); |
93 candlist->Hide(ETrue); |
95 |
94 |
96 iOwner->DataMgr()->PtiEngine()->ClearCurrentWord(); |
95 iOwner->DataMgr()->PtiEngine()->ClearCurrentWord(); |
97 // Hide ICF, Backspace, Arrow contrls when exit to avoid flick |
96 // Hide ICF, Backspace, Arrow contrls when exit to avoid flick |
98 iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue ); |
|
99 iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide(ETrue); |
|
100 iOwner->LayoutContext()->ShowArrowBtn( 0 ); |
|
101 |
97 |
102 //show indicator |
98 //show indicator |
103 iOwner->LayoutContext()->Control(ECtrlIdIndicator)->Hide(EFalse); |
|
104 |
99 |
105 iOwner->DataMgr()->PtiEngine()->ClearCurrentWord(); |
100 iOwner->DataMgr()->PtiEngine()->ClearCurrentWord(); |
106 |
101 |
107 } |
102 } |
108 |
103 |
287 } |
282 } |
288 break; |
283 break; |
289 // consume star key at pinyin composition state |
284 // consume star key at pinyin composition state |
290 case EEventRawKeyDownEvent: |
285 case EEventRawKeyDownEvent: |
291 { |
286 { |
292 const TKeyEvent *key = reinterpret_cast<const TKeyEvent*>(aEventData.Ptr()); |
287 if ( iOwner->UiManager()->IsAllowHandleRawKeyEvent()) |
293 |
288 { |
294 if (key->iScanCode == EStdKeyNkpAsterisk) |
289 const TKeyEvent *key = reinterpret_cast<const TKeyEvent*>(aEventData.Ptr()); |
295 { |
290 |
296 HandleKeyL(ECmdPenInputFingerKeyPress, EPtiKeyStar); |
291 if (key->iScanCode == EStdKeyNkpAsterisk) |
297 return ETrue; |
292 { |
298 } |
293 HandleKeyL(ECmdPenInputFingerKeyPress, EPtiKeyStar); |
|
294 return ETrue; |
|
295 } |
|
296 } |
299 } |
297 } |
300 break; |
298 break; |
301 case EEventRawKeyUpEvent: |
299 case EEventRawKeyUpEvent: |
302 { |
300 { |
303 const TKeyEvent *key = reinterpret_cast<const TKeyEvent*>(aEventData.Ptr()); |
301 if ( iOwner->UiManager()->IsAllowHandleRawKeyEvent()) |
304 |
302 { |
305 if (key->iScanCode == EStdKeyNkpAsterisk) |
303 const TKeyEvent *key = reinterpret_cast<const TKeyEvent*>(aEventData.Ptr()); |
306 { |
304 |
307 return ETrue; |
305 if (key->iScanCode == EStdKeyNkpAsterisk) |
308 } |
306 { |
|
307 return ETrue; |
|
308 } |
|
309 } |
309 } |
310 } |
310 break; |
311 break; |
311 default: |
312 default: |
312 break; |
313 break; |
313 } |
314 } |