|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Intermediate class for defining data shared between numeric edwins |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #include <aknnumed.h> |
|
22 #include <aknenv.h> |
|
23 #include <AknSettingCache.h> |
|
24 #include <numberconversion.h> |
|
25 |
|
26 #include <AknTasHook.h> |
|
27 EXPORT_C void CAknNumericEdwin::Reserved_3() |
|
28 {} |
|
29 |
|
30 |
|
31 |
|
32 EXPORT_C void CAknNumericEdwin::MapKeyEvent(TKeyEvent& aKeyEvent,TEventCode& /*aType*/, TDigitType aDigitType) const |
|
33 /** |
|
34 Maps a key event so that any numeric character is mapped to the correct digit type that this editor is using. |
|
35 @since 2.0 |
|
36 @param aKeyEvent the key event to modify |
|
37 @param aType the type to modify |
|
38 @param aDigitType the digit type to map all numeric characters to. |
|
39 */ |
|
40 { |
|
41 TChar ch(aKeyEvent.iCode); |
|
42 TBuf<1> numbuf; |
|
43 numbuf.Append(ch); |
|
44 NumberConversion::ConvertDigits(numbuf, aDigitType); |
|
45 |
|
46 // In case ConvertDigits didn't find anything sensible to |
|
47 // put in numbuf, but still deleted its content. |
|
48 if ( numbuf.Length() > 0 ) |
|
49 { |
|
50 aKeyEvent.iCode = numbuf[0]; |
|
51 } |
|
52 } |
|
53 |
|
54 EXPORT_C CAknNumericEdwin::~CAknNumericEdwin() |
|
55 { |
|
56 AKNTASHOOK_REMOVE(); |
|
57 } |
|
58 |
|
59 EXPORT_C void CAknNumericEdwin::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
|
60 { |
|
61 CEikEdwin::HandlePointerEventL(aPointerEvent); |
|
62 } |
|
63 |
|
64 EXPORT_C void* CAknNumericEdwin::ExtensionInterface( TUid /*aInterface*/ ) |
|
65 { |
|
66 return NULL; |
|
67 } |