|
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 vkb ui state machine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // System includes |
|
20 #include <peninputlayoutbasecontrol.h> // EEventVirtualKeyUp |
|
21 #include <peninputcommonlayoutglobalenum.h> |
|
22 |
|
23 // user includes |
|
24 #include "peninputvkbuistate.h" |
|
25 |
|
26 // constant definition |
|
27 |
|
28 // ======== MEMBER FUNCTIONS ======== |
|
29 |
|
30 // Implementation of Class CPeninputVkbUiState |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CPeninputVkbUiState::NewL |
|
34 // (other items were commented in a header). |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 CPeninputVkbUiState* CPeninputVkbUiState::NewL(MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext) |
|
38 { |
|
39 CPeninputVkbUiState* self = new ( ELeave ) CPeninputVkbUiState(aUiStateMgr,aContext); |
|
40 CleanupStack::PushL(self); |
|
41 self->Construct(); |
|
42 CleanupStack::Pop(self); |
|
43 return self; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CPeninputVkbUiState::~CPeninputVkbUiState |
|
48 // (other items were commented in a header). |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CPeninputVkbUiState::~CPeninputVkbUiState() |
|
52 { |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CPeninputVkbUiState::HandleControlEvent |
|
57 // (other items were commented in a header). |
|
58 // return False --->iVkbWindow->HandleControlEvent() by UiLayout |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 TBool CPeninputVkbUiState::HandleControlEvent(TInt aEventType, const TDesC& aEventData) |
|
62 { |
|
63 if (aEventType == EEventVirtualKeyUp) |
|
64 { |
|
65 return HandleVkbEvent(aEventType, aEventData); |
|
66 } |
|
67 else if (aEventType == EPeninputLayoutEventBack) |
|
68 { |
|
69 return HandleBackEvent(aEventType, aEventData); |
|
70 } |
|
71 else if ((aEventType == EPeninputLayoutEventTab) || |
|
72 (aEventType == EPeninputLayoutEventEnter) || |
|
73 (aEventType == EPeninputLayoutEventSpace)) |
|
74 { |
|
75 return HandleEnterSpaceTabEvent(aEventType, aEventData); |
|
76 } |
|
77 else |
|
78 { |
|
79 return EFalse; |
|
80 } |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CPeninputVkbUiState::CPeninputVkbUiState |
|
85 // (other items were commented in a header). |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 CPeninputVkbUiState::CPeninputVkbUiState(MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext) |
|
89 : CPeninputUiStateBase( aUiStateMgr, aContext ) |
|
90 { |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CPeninputVkbUiState::HandleVkbEvent |
|
95 // (other items were commented in a header). |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 TBool CPeninputVkbUiState::HandleVkbEvent(TInt /*aEventType*/, |
|
99 const TDesC& /*aEventData*/) |
|
100 { |
|
101 return ETrue; |
|
102 } |
|
103 |
|
104 // ----------------------------------------------------------------------------- |
|
105 // CPeninputVkbUiState::HandleBackEvent |
|
106 // (other items were commented in a header). |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 TBool CPeninputVkbUiState::HandleBackEvent(TInt /*aEventType*/, |
|
110 const TDesC& /*aEventData*/) |
|
111 { |
|
112 return ETrue; |
|
113 } |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // CPeninputVkbUiState::HandleEnterSpaceTabEvent |
|
117 // (other items were commented in a header). |
|
118 // ----------------------------------------------------------------------------- |
|
119 // |
|
120 TBool CPeninputVkbUiState::HandleEnterSpaceTabEvent(TInt /*aEventType*/, |
|
121 const TDesC& /*aEventData*/) |
|
122 { |
|
123 return ETrue; |
|
124 } |
|
125 |
|
126 // End Of File |