|
1 /* |
|
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: HWR layout UI class implementation file. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 // System includes |
|
30 #include <aknfeppeninputenums.h> |
|
31 #include <aknedsts.h> //CAknEdwinState |
|
32 |
|
33 // User includes |
|
34 #include "pluginfepmanagerhwr.h" |
|
35 #include "peninputimeplugincn.h" |
|
36 |
|
37 // ======== MEMBER FUNCTIONS ======== |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CPluginFepManagerHwr::NewL |
|
40 // factory function |
|
41 // (other items were commented in a header). |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 CPluginFepManagerHwr* CPluginFepManagerHwr::NewL(CPenInputImePluginCn& aOwner, |
|
45 RPeninputServer* aPenInputServer) |
|
46 { |
|
47 CPluginFepManagerHwr* self = new(ELeave)CPluginFepManagerHwr(aOwner, aPenInputServer); |
|
48 CleanupStack::PushL(self); |
|
49 self->BaseConstructL(); |
|
50 CleanupStack::Pop(self); |
|
51 return self; |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CPluginFepManagerHwr::SetNumberModeKeyMappingL |
|
56 // Set layout UI current number mode key mapping. |
|
57 // (other items were commented in a header). |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 void CPluginFepManagerHwr::SetNumberModeKeyMappingL( |
|
61 TAknEditorNumericKeymap aAknEditorNumericKeymap) |
|
62 { |
|
63 //don't send number key map here, the key mapping is only meaningful |
|
64 //in ENumber range |
|
65 iNumberKeyMapping = aAknEditorNumericKeymap; |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CPluginFepManagerHwr::HandleCommandL |
|
70 // Handle command come from FEP. |
|
71 // (other items were commented in a header). |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 void CPluginFepManagerHwr::HandleCommandL(TInt aCommandId,TInt aParam) |
|
75 { |
|
76 if( aCommandId == ECmdPenInputSetWindowPos) |
|
77 { |
|
78 return; |
|
79 } |
|
80 CPluginFepManagerBase::HandleCommandL(aCommandId, aParam); |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CPluginFepManagerHwr::CPluginFepManagerHwr |
|
85 // C++ default constructor. |
|
86 // (other items were commented in a header). |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 CPluginFepManagerHwr::CPluginFepManagerHwr(CPenInputImePluginCn& aOwner, |
|
90 RPeninputServer* aPenInputServer) |
|
91 :CPluginFepManagerBase(aOwner, aPenInputServer) |
|
92 { |
|
93 } |
|
94 |
|
95 // ----------------------------------------------------------------------------- |
|
96 // CPluginFepManagerHwr::SetLayoutRange |
|
97 // Set layout primary range. |
|
98 // (other items were commented in a header). |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 void CPluginFepManagerHwr::SetLayoutRange(const CAknEdwinState* aEditorState) |
|
102 { |
|
103 CPluginFepManagerBase::SetLayoutRange(aEditorState); |
|
104 |
|
105 //set number key mapping |
|
106 if( iPermittedRange == ERangeNumber ) |
|
107 { |
|
108 SendCommandToServer(ECmdPenInputEditorNumericKeyMap, iNumberKeyMapping); |
|
109 } |
|
110 else |
|
111 { |
|
112 //for not number only editor, we set plain number and |
|
113 //second range handles other characters |
|
114 SendCommandToServer(ECmdPenInputEditorNumericKeyMap, |
|
115 EAknEditorPlainNumberModeKeymap); |
|
116 } |
|
117 } |
|
118 |
|
119 // End Of File |