|
1 /* |
|
2 * Copyright (c) 2002-2007 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: Implementation of the hwr ui state machine (Standby State) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // System includes |
|
20 #include <aknfeppeninputenums.h> // ERangeNumber |
|
21 #include <peninputlayoutcontext.h> |
|
22 #include <peninputdataconverter.h> |
|
23 |
|
24 // user includes |
|
25 #include "peninputhwrboxuistatestandby.h" |
|
26 |
|
27 // ======== MEMBER FUNCTIONS ======== |
|
28 |
|
29 // Implementation of Class CPeninputHwrBoxUiStateStandby |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // CPeninputHwrBoxUiStateStandby::NewL |
|
33 // (other items were commented in a header). |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 CPeninputHwrBoxUiStateStandby* CPeninputHwrBoxUiStateStandby::NewL(MPeninputUiStateMgr* aUiStateMgr, |
|
37 MPeninputLayoutContext* aContext) |
|
38 { |
|
39 CPeninputHwrBoxUiStateStandby* self = new ( ELeave ) CPeninputHwrBoxUiStateStandby(aUiStateMgr,aContext); |
|
40 CleanupStack::PushL(self); |
|
41 self->Construct(); |
|
42 CleanupStack::Pop(self); |
|
43 return self; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CPeninputHwrBoxUiStateStandby::~CPeninputHwrBoxUiStateStandby |
|
48 // (other items were commented in a header). |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CPeninputHwrBoxUiStateStandby::~CPeninputHwrBoxUiStateStandby() |
|
52 { |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CPeninputHwrBoxUiStateStandby::HandleKeyEventL |
|
57 // (other items were commented in a header). |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 TBool CPeninputHwrBoxUiStateStandby::HandleKeyEventL(const TRawEvent& /*aData*/) |
|
61 { |
|
62 return EFalse; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CPeninputHwrBoxUiStateStandby::CPeninputHwrBoxUiStateStandby |
|
67 // (other items were commented in a header). |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 CPeninputHwrBoxUiStateStandby::CPeninputHwrBoxUiStateStandby(MPeninputUiStateMgr* aUiStateMgr, |
|
71 MPeninputLayoutContext* aContext) |
|
72 :CPeninputHwrBoxUiState(aUiStateMgr,aContext) |
|
73 { |
|
74 } |
|
75 |
|
76 // ----------------------------------------------------------------------------- |
|
77 // CPeninputHwrBoxUiStateStandby::HandleVkbEvent |
|
78 // pseudo virual key (hwr 1 char) |
|
79 // (other items were commented in a header). |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 TBool CPeninputHwrBoxUiStateStandby::HandleVkbEvent(TInt /*aEventType*/, const TDesC& aEventData) |
|
83 { |
|
84 TBool rs = SendKey(aEventData); |
|
85 return rs; |
|
86 } |
|
87 |
|
88 // ----------------------------------------------------------------------------- |
|
89 // CPeninputHwrBoxUiStateStandby::HandleBackEvent |
|
90 // (other items were commented in a header). |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 TBool CPeninputHwrBoxUiStateStandby::HandleBackEvent(TInt /*aEventType*/, const TDesC& aEventData) |
|
94 { |
|
95 return SendKey(aEventData); |
|
96 |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // CPeninputHwrBoxUiStateStandby::HandleEnterSpaceTabEvent |
|
101 // (other items were commented in a header). |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 TBool CPeninputHwrBoxUiStateStandby::HandleEnterSpaceTabEvent(TInt /*aEventType*/, const TDesC& aEventData) |
|
105 { |
|
106 TInt permittedRange = CPeninputDataConverter::AnyToInt |
|
107 ( iContext->RequestData( EPeninputDataTypePermittedRange ) ); |
|
108 if (permittedRange == ERangeNumber) |
|
109 { |
|
110 return ETrue; |
|
111 } |
|
112 else |
|
113 { |
|
114 return SendKey(aEventData); |
|
115 } |
|
116 } |
|
117 |
|
118 // End Of File |