|
1 /* |
|
2 * Copyright (c) 2002-2004 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 * Provides the TAknFepInputStateBase definition. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 #ifndef __AKN_FEP_UI_INPUTSTATE_BASE_H__ |
|
31 #define __AKN_FEP_UI_INPUTSTATE_BASE_H__ |
|
32 |
|
33 // INCLUDES |
|
34 #include <e32std.h> |
|
35 #include <uikon.hrh> |
|
36 |
|
37 #include "AknFepGlobalEnums.h" |
|
38 #include "AknFepManager.h" |
|
39 |
|
40 #include <PtiObserver.h> // MPtiObserver |
|
41 |
|
42 // CONSTANTS |
|
43 |
|
44 // MACROS |
|
45 |
|
46 // DATA TYPES |
|
47 |
|
48 // FUNCTION PROTOTYPES |
|
49 |
|
50 // FORWARD DECLARATION |
|
51 |
|
52 // CLASS DECLARATION |
|
53 class MAknFepUIManagerStateInterface; |
|
54 |
|
55 /** |
|
56 * TAknFepInputStateBase class. |
|
57 * |
|
58 * @lib AknFep.lib |
|
59 * @since 2.6 |
|
60 */ |
|
61 class TAknFepInputStateBase : public MPtiObserver |
|
62 { |
|
63 public: // Constructors and destructor |
|
64 /** |
|
65 * C++ default constructor |
|
66 * |
|
67 * @since 2.6 |
|
68 * @param aOwner Object derived MAknFepUIManagerStateInterfa |
|
69 */ |
|
70 TAknFepInputStateBase(MAknFepUIManagerStateInterface* aOwner); |
|
71 |
|
72 public: // Functions from base classes |
|
73 /** |
|
74 * From MPtiObserver interface |
|
75 * Call this function when Multitap timer of PtiEngine was time-out |
|
76 * |
|
77 * @since 2.6 |
|
78 */ |
|
79 virtual void KeyTimerExpired(); |
|
80 |
|
81 /** |
|
82 * From MPtiObserver interface |
|
83 * Call this function when getting last word in selection list |
|
84 * |
|
85 * @since 2.6 |
|
86 */ |
|
87 virtual void LastWordInSelectionList(); |
|
88 |
|
89 /** |
|
90 * From MPtiObserver interface |
|
91 * Call this function when getting first word in selection list |
|
92 * |
|
93 * @since 2.6 |
|
94 */ |
|
95 virtual void FirstWordInSelectionList(); |
|
96 |
|
97 public: // New functions |
|
98 /** |
|
99 * Hnadling Keypress events. |
|
100 * This Method is called by CAknFepUIManagerJapanese. |
|
101 * |
|
102 * @since 2.6 |
|
103 * @param aKey The event key code |
|
104 * @param aLength The Length of keypress |
|
105 * @return ETrue If aKey was handled |
|
106 */ |
|
107 virtual TBool HandleKeyL(TInt aKey, TKeyPressLength aLength); |
|
108 |
|
109 /** |
|
110 * Handling Command events. |
|
111 * This Method is called by CAknFepUIManagerJapanese. |
|
112 * |
|
113 * @since 2.6 |
|
114 * @param aCommandId Command ID value |
|
115 */ |
|
116 virtual void HandleCommandL(TInt aCommandId); |
|
117 virtual void HandleCommandL(TInt aCommandId, TInt aParam); |
|
118 /** |
|
119 * return own input state. |
|
120 * |
|
121 * @since 2.6 |
|
122 * @return own input sate |
|
123 */ |
|
124 virtual TUIState State() const; |
|
125 |
|
126 /** |
|
127 * Processing of Closeing UI |
|
128 * @since 2.6 |
|
129 */ |
|
130 virtual void CloseUI(); |
|
131 |
|
132 /** |
|
133 * Initialize state |
|
134 * @since 2.6 |
|
135 */ |
|
136 virtual void InitializeStateL(); |
|
137 |
|
138 /** |
|
139 * A patch to force the vtable to be copied during an assignment. |
|
140 * @since 2.6 |
|
141 * @param aState TAknFepInputStateBase object |
|
142 */ |
|
143 virtual void operator=(const TAknFepInputStateBase& aState); |
|
144 |
|
145 /** |
|
146 * Set the Star key flag |
|
147 * |
|
148 * @param aSet TBool. |
|
149 * @return None |
|
150 */ |
|
151 virtual void SetStarKeyFlag( TBool aSet ); |
|
152 #ifdef RD_HINDI_PHONETIC_INPUT |
|
153 /** |
|
154 * Gives the iPhoneticLatinChar |
|
155 * |
|
156 * @param aChar TChar iPhoneticLatinChar value. |
|
157 * @since 5.0 |
|
158 * @return None |
|
159 */ |
|
160 virtual void GetPhoneticLatinChar(TChar& aChar)const; |
|
161 #endif |
|
162 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
163 /** |
|
164 * Gets the length of the character of the short key press |
|
165 * @return Lenght of the character |
|
166 */ |
|
167 virtual TInt GetShortKeyPressTxtLength(); |
|
168 /** |
|
169 * Set the text for short key press |
|
170 * |
|
171 * @param aText Teh text entered for short key press. |
|
172 * @return None |
|
173 */ |
|
174 virtual void SetShortKeyPressText(const TDesC& aText); |
|
175 #endif // RD_INTELLIGENT_TEXT_INPUT |
|
176 |
|
177 protected: // Data |
|
178 TBool iFakeDelete; |
|
179 TBool iCharKeyException; |
|
180 protected: // Data |
|
181 MAknFepUIManagerStateInterface* iOwner; |
|
182 TUIState iState; |
|
183 TWordMatchState iMatchState; |
|
184 TInt iData; // data store for sub-classes... |
|
185 TInt iCbaResourceID; |
|
186 protected: |
|
187 #ifdef RD_HINDI_PHONETIC_INPUT |
|
188 TChar iPhoneticLatinChar; // Used for current Latin character to be transliterated on key timer expiry or on other key press |
|
189 TBuf<CAknFepManager::EMaximumFepWordLength > iIndicPhoneticBuffer; // Used to hold the uncommited word to append with latin character |
|
190 #endif |
|
191 //Used for Hindi |
|
192 TBool iIsStarKeyPressed; |
|
193 TBool iIsKeyTimerExpired; |
|
194 TLanguage iIndicLanguage; |
|
195 TBool iIsHalantAllowed; |
|
196 TBool iZWSPresent; |
|
197 TBool iKey1Pressed; |
|
198 TBool iRephaPresent; |
|
199 TBool iRakarPresent; |
|
200 TBool iResponseInsertZWS; |
|
201 TBool iLigaturePresent; |
|
202 TBool iIsLastWord; |
|
203 /** Stores the character which was present in the editor before |
|
204 * multitapping started. Used for validation of current character. |
|
205 */ |
|
206 TUint iPreviousCommittedChar; |
|
207 |
|
208 #ifdef RD_MARATHI |
|
209 TBool iEyeLashRaPresent; |
|
210 TBool iChandraAPresent; |
|
211 #endif // RD_MARATHI |
|
212 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
213 TBuf<CAknFepManager::EMaximumFepWordLength > iShortKeyPressText; |
|
214 #endif |
|
215 }; |
|
216 |
|
217 #endif |
|
218 |
|
219 // End of file |