author | Simon Howkins <simonh@symbian.org> |
Mon, 15 Nov 2010 14:00:51 +0000 | |
branch | RCL_3 |
changeset 59 | 7febbd162ded |
parent 56 | 8152b1f1763a |
permissions | -rw-r--r-- |
44 | 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: split qwerty layout |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// System includes |
|
20 |
#include <aknfeppeninputenums.h> // Command from fep or IME to plugin |
|
21 |
#include <AknFepGlobalEnums.h> // Define EPluginInputModeHwr |
|
22 |
#include <peninputcmd.h> // Use global signal |
|
23 |
#include <peninputlayoutchoicelist.h> |
|
24 |
#include <peninputlayoutbutton.h> |
|
25 |
#include <peninputdragbutton.h> |
|
26 |
#include <peninputcommonlayoutglobalenum.h> |
|
27 |
#include <coemain.h> |
|
28 |
#include <peninputlayoutbubblectrl.h> |
|
29 |
#include <peninputlayoutmultilineicf.h> |
|
30 |
#include <peninputscrollablelist.h> |
|
31 |
#include <s32mem.h> |
|
32 |
||
33 |
#include <peninputrangebar.h> |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
34 |
#include <peninputcmdparam.h> |
44 | 35 |
|
36 |
// User includes |
|
37 |
#include "peninputsplitqwerty.hrh" |
|
38 |
#include "peninputuistatemgrinterface.h" |
|
39 |
#include "peninputsplitqwertylayout.h" |
|
40 |
#include "peninputsplitqwertywindow.h" |
|
41 |
#include "peninputsplitqwertydatamgr.h" |
|
42 |
#include "peninputsplitqwertyuistatestandby.h" |
|
43 |
#include "peninputsplitqwertyuistatepopup.h" |
|
44 |
#include "peninputdataconverter.h" |
|
45 |
||
46 |
// ======== MEMBER FUNCTIONS ======== |
|
47 |
const TInt KNumberOfDottedChar = 16; |
|
48 |
||
49 |
const TUint16 thaiUnicodeOri[KNumberOfDottedChar] = |
|
50 |
{ |
|
51 |
0x0E31,0x0E33,0x0E34,0x0E35,0x0E36,0x0E37,0x0E38,0x0E39, |
|
52 |
0x0E3A,0x0E47,0x0E48,0x0E49,0x0E4A,0x0E4B,0x0E4C,0x0E4D |
|
53 |
}; |
|
54 |
||
55 |
const TUint16 thaiUnicodeNew[KNumberOfDottedChar] = |
|
56 |
{ |
|
57 |
0xF731,0xF733,0xF734,0xF735,0xF736,0xF737,0xF738,0xF739, |
|
58 |
0xF73A,0xF747,0xF748,0xF749,0xF74A,0xF74B,0xF74C,0xF74D |
|
59 |
}; |
|
60 |
||
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
61 |
// TInt number in command, used to show candidate list |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
62 |
const TInt KStartIntNumber = 3; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
63 |
const TInt KEndIntNumber = 4; |
44 | 64 |
// --------------------------------------------------------------------------- |
65 |
// Symbian constructor |
|
66 |
// --------------------------------------------------------------------------- |
|
67 |
// |
|
68 |
CPeninputSplitQwertyLayoutImp* CPeninputSplitQwertyLayoutImp::NewL( TAny* /*aInitParams*/ ) |
|
69 |
{ |
|
70 |
CPeninputSplitQwertyLayoutImp* |
|
71 |
self = new ( ELeave ) CPeninputSplitQwertyLayoutImp(); |
|
72 |
||
73 |
CleanupStack::PushL( self ); |
|
74 |
self->ConstructL(); |
|
75 |
CleanupStack::Pop( self ); |
|
76 |
return self; |
|
77 |
} |
|
78 |
||
79 |
// --------------------------------------------------------------------------- |
|
80 |
// C++ destructor |
|
81 |
// --------------------------------------------------------------------------- |
|
82 |
// |
|
83 |
CPeninputSplitQwertyLayoutImp::~CPeninputSplitQwertyLayoutImp() |
|
84 |
{ |
|
85 |
} |
|
86 |
||
87 |
// --------------------------------------------------------------------------- |
|
88 |
// Create fep ui layout |
|
89 |
// --------------------------------------------------------------------------- |
|
90 |
// |
|
91 |
CFepUiLayout* CPeninputSplitQwertyLayoutImp::CreateFepUiLayoutL( |
|
92 |
MLayoutOwner* aLayoutOwner, |
|
93 |
const TAny* aData ) |
|
94 |
{ |
|
95 |
CPeninputSplitQwertyLayout* |
|
96 |
uiLayout = CPeninputSplitQwertyLayout::NewL( aLayoutOwner, aData ); |
|
97 |
||
98 |
return uiLayout; |
|
99 |
} |
|
100 |
||
101 |
// --------------------------------------------------------------------------- |
|
102 |
// C++ constructor |
|
103 |
// --------------------------------------------------------------------------- |
|
104 |
// |
|
105 |
CPeninputSplitQwertyLayoutImp::CPeninputSplitQwertyLayoutImp() |
|
106 |
{ |
|
107 |
} |
|
108 |
||
109 |
// --------------------------------------------------------------------------- |
|
110 |
// Symbian constructor |
|
111 |
// --------------------------------------------------------------------------- |
|
112 |
// |
|
113 |
void CPeninputSplitQwertyLayoutImp::ConstructL() |
|
114 |
{ |
|
115 |
} |
|
116 |
||
117 |
||
118 |
// --------------------------------------------------------------------------- |
|
119 |
// Symbian constructor |
|
120 |
// --------------------------------------------------------------------------- |
|
121 |
// |
|
122 |
CPeninputSplitQwertyLayout* CPeninputSplitQwertyLayout::NewL( |
|
123 |
MLayoutOwner* aLayoutOwner, const TAny* aInitData ) |
|
124 |
{ |
|
125 |
CPeninputSplitQwertyLayout* self = |
|
126 |
new (ELeave) CPeninputSplitQwertyLayout( aLayoutOwner ); |
|
127 |
||
128 |
CleanupStack::PushL( self ); |
|
129 |
self->ConstructL( aInitData ); |
|
130 |
CleanupStack::Pop( self ); |
|
131 |
||
132 |
return self; |
|
133 |
} |
|
134 |
||
135 |
// --------------------------------------------------------------------------- |
|
136 |
// C++ destructor |
|
137 |
// --------------------------------------------------------------------------- |
|
138 |
// |
|
139 |
CPeninputSplitQwertyLayout::~CPeninputSplitQwertyLayout() |
|
140 |
{ |
|
141 |
} |
|
142 |
||
143 |
// --------------------------------------------------------------------------- |
|
144 |
// Handle layout command event |
|
145 |
// --------------------------------------------------------------------------- |
|
146 |
// |
|
147 |
TInt CPeninputSplitQwertyLayout::HandleCommand( TInt aCmd, TUint8* aData ) |
|
148 |
{ |
|
149 |
CPeninputCommonLayoutExt::HandleCommand( aCmd, aData ); |
|
150 |
CPeninputSplitQwertyWindow* |
|
151 |
vkbWindow = static_cast<CPeninputSplitQwertyWindow*>(iLayoutWindow); |
|
152 |
||
153 |
switch ( aCmd ) |
|
154 |
{ |
|
155 |
case ECmdPenInputWindowOpen: |
|
156 |
{ |
|
157 |
UiStateMgr()->SetCurrentUiState( EPeninputVkbUiStateStandby ); |
|
158 |
} |
|
159 |
break; |
|
160 |
case ECmdPenInputWindowClose: |
|
161 |
{ |
|
162 |
vkbWindow->UnLatchDeadKey(); |
|
163 |
UiStateMgr()->SetCurrentUiState( EPeninputVkbUiStateNone ); |
|
164 |
} |
|
165 |
break; |
|
166 |
case ECmdPenInputLanguage: |
|
167 |
{ |
|
168 |
vkbWindow->SetSwitchlistLanguage( *aData ); |
|
169 |
vkbWindow->SetDeadKey(); |
|
170 |
TRAP_IGNORE( |
|
171 |
vkbWindow->ConstructAccentListL( *aData ); |
|
172 |
vkbWindow->ConstructRangeLabelListL( *aData ) |
|
173 |
); |
|
174 |
} |
|
175 |
break; |
|
176 |
case ECmdPenInputRange: |
|
177 |
{ |
|
178 |
TRAP_IGNORE( vkbWindow->UpdateRangeCtrlsL() ); |
|
179 |
} |
|
180 |
break; |
|
181 |
case ECmdPenInputIsSecretText: |
|
182 |
{ |
|
183 |
vkbWindow->SetSwitchlistSecretFlag( *aData ); |
|
184 |
} |
|
185 |
break; |
|
186 |
case ECmdPenInputDimArrowKeys: |
|
187 |
{ |
|
188 |
TBool IsDimArrowKeys = *aData; |
|
189 |
vkbWindow->DimArrowKeys( IsDimArrowKeys ); |
|
190 |
} |
|
191 |
break; |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
192 |
case ECmdPeninputVietSyncToneMarker: |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
193 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
194 |
TBool bDimToneMarker = *aData; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
195 |
vkbWindow->EnableToneMarker(bDimToneMarker); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
196 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
197 |
break; |
44 | 198 |
case ECmdPenInputSetPromptText: |
199 |
break; |
|
200 |
case ECmdPenInputCharacterPreview: |
|
201 |
{ |
|
202 |
vkbWindow->ShowBubble( *aData ); |
|
203 |
} |
|
204 |
break; |
|
205 |
case ECmdPenInputInEditWordQueryDlg: |
|
206 |
{ |
|
207 |
iInEditWordQueryDlg = *aData; |
|
208 |
} |
|
209 |
break; |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
210 |
case ECmdPenInputPopupCandidateList: |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
211 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
212 |
TRAP_IGNORE( HandleShowCandidateListCmdL( aData ) ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
213 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
214 |
break; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
215 |
case ECmdPenInputHideCandidateList: |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
216 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
217 |
SignalOwner( ESignalHideServerCandidate ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
218 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
219 |
break; |
44 | 220 |
case ECmdPeninputITIStatus: |
221 |
{ |
|
222 |
// Set the flag to indicate if FSQ with ITI feature is opened |
|
223 |
iITIEnabled = CPeninputDataConverter::AnyToInt( aData ); |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
224 |
} |
44 | 225 |
break; |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
226 |
case ECmdPeninputSelectServerCandidate: |
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
227 |
{ |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
228 |
TRAP_IGNORE( HandleSelectServerCandItemL( aData ) ); |
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
229 |
} |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
230 |
break; |
44 | 231 |
default: |
232 |
{ |
|
233 |
} |
|
234 |
break; |
|
235 |
} |
|
236 |
||
237 |
return KErrNone; |
|
238 |
} |
|
239 |
||
240 |
// --------------------------------------------------------------------------- |
|
241 |
// Handle control event |
|
242 |
// --------------------------------------------------------------------------- |
|
243 |
// |
|
244 |
void CPeninputSplitQwertyLayout::HandleControlEvent( TInt aEventType, |
|
245 |
CFepUiBaseCtrl* aCtrl, |
|
246 |
const TDesC& aEventData ) |
|
247 |
{ |
|
248 |
switch ( aEventType ) |
|
249 |
{ |
|
250 |
case EEventVirtualKeyUp: |
|
251 |
{ |
|
252 |
TRAP_IGNORE( HandleVirtualKeyUpL( aEventType, aCtrl, aEventData ) ); |
|
253 |
} |
|
254 |
break; |
|
255 |
default: |
|
256 |
{ |
|
257 |
CPeninputCommonLayoutExt::HandleControlEvent( aEventType, |
|
258 |
aCtrl, aEventData ); |
|
259 |
} |
|
260 |
break; |
|
261 |
} |
|
262 |
} |
|
263 |
||
264 |
// --------------------------------------------------------------------------- |
|
265 |
// Handle editor text coming |
|
266 |
// --------------------------------------------------------------------------- |
|
267 |
// |
|
268 |
TInt CPeninputSplitQwertyLayout::OnAppEditorTextComing( |
|
269 |
const TFepInputContextFieldData& aData ) |
|
270 |
{ |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
271 |
CPeninputSplitQwertyWindow* |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
272 |
win = static_cast<CPeninputSplitQwertyWindow*>(iLayoutWindow); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
273 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
274 |
//Suppress ICF related actions |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
275 |
if ( win ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
276 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
277 |
return KErrNone; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
278 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
279 |
|
44 | 280 |
return CPeninputCommonLayoutExt::OnAppEditorTextComing( aData ); |
281 |
} |
|
282 |
||
283 |
// --------------------------------------------------------------------------- |
|
284 |
// Inform layout the size changing event |
|
285 |
// --------------------------------------------------------------------------- |
|
286 |
// |
|
287 |
TInt CPeninputSplitQwertyLayout::SizeChanged( const TAny* aData ) |
|
288 |
{ |
|
289 |
return CPeninputCommonLayoutExt::SizeChanged( aData ); |
|
290 |
} |
|
291 |
||
292 |
// --------------------------------------------------------------------------- |
|
293 |
// Inform UI that application infomation changed |
|
294 |
// --------------------------------------------------------------------------- |
|
295 |
// |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
296 |
void CPeninputSplitQwertyLayout::HandleAppInfoChange( const TDesC& /*aInfo*/, |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
297 |
TPeninputAppInfo /*aType*/ ) |
44 | 298 |
{ |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
299 |
//Suppress ICF related actions |
44 | 300 |
} |
301 |
||
302 |
// --------------------------------------------------------------------------- |
|
303 |
// Called by owner when the layout is going to be active |
|
304 |
// --------------------------------------------------------------------------- |
|
305 |
// |
|
306 |
void CPeninputSplitQwertyLayout::OnActivate() |
|
307 |
{ |
|
308 |
CPeninputCommonLayoutExt::OnActivate(); |
|
309 |
||
310 |
CPeninputSplitQwertyWindow* |
|
311 |
win = static_cast<CPeninputSplitQwertyWindow*>( iLayoutWindow ); |
|
312 |
||
313 |
if( win ) |
|
314 |
{ |
|
315 |
win->UpdateLayoutPosAndSize(); |
|
316 |
} |
|
317 |
} |
|
318 |
||
319 |
// --------------------------------------------------------------------------- |
|
320 |
// Tell whether this layout require transparency. |
|
321 |
// --------------------------------------------------------------------------- |
|
322 |
// |
|
323 |
TBool CPeninputSplitQwertyLayout::SemiTransparencyRequired() |
|
324 |
{ |
|
325 |
return ETrue; |
|
326 |
} |
|
327 |
||
328 |
// --------------------------------------------------------------------------- |
|
329 |
// C++ constructor |
|
330 |
// --------------------------------------------------------------------------- |
|
331 |
// |
|
332 |
CPeninputSplitQwertyLayout::CPeninputSplitQwertyLayout( MLayoutOwner* aLayoutOwner ) |
|
333 |
: CPeninputCommonLayoutExt( aLayoutOwner ) |
|
334 |
, iLayoutType( EPluginInputModeFSQ ) |
|
335 |
{ |
|
336 |
iInEditWordQueryDlg = EFalse; |
|
337 |
} |
|
338 |
||
339 |
// --------------------------------------------------------------------------- |
|
340 |
// Symbian constructor |
|
341 |
// --------------------------------------------------------------------------- |
|
342 |
// |
|
343 |
void CPeninputSplitQwertyLayout::ConstructL( const TAny* aInitData ) |
|
344 |
{ |
|
345 |
// must set layout type first |
|
346 |
iLayoutType = EPluginInputModeFSQ; |
|
347 |
||
348 |
CPeninputCommonLayoutExt::ConstructL( aInitData ); |
|
349 |
||
350 |
CPeninputUiStateBase* state = NULL; |
|
351 |
CPeninputUiStateBase* initialState = NULL; |
|
352 |
||
353 |
//init state |
|
354 |
state = CPeninputUiStateBase::NewL( UiStateMgr(), this ); |
|
355 |
UiStateMgr()->AddUiState( state, EPeninputVkbUiStateNone ); |
|
356 |
initialState = state; |
|
357 |
||
358 |
//standby state |
|
359 |
state= CPeninputSplitQwertyUiStateStandby::NewL( UiStateMgr(), this ); |
|
360 |
UiStateMgr()->AddUiState( state, EPeninputVkbUiStateStandby ); |
|
361 |
||
362 |
//popup state |
|
363 |
state = CPeninputSplitQwertyUiStatePopup::NewL( UiStateMgr(), this ); |
|
364 |
UiStateMgr()->AddUiState( state, EPeninputVkbUiStatePopup ); |
|
365 |
||
366 |
UiStateMgr()->SetCurrentUiState( initialState ); |
|
367 |
} |
|
368 |
||
369 |
// --------------------------------------------------------------------------- |
|
370 |
// Factory method for creation of layout window |
|
371 |
// --------------------------------------------------------------------------- |
|
372 |
// |
|
373 |
void CPeninputSplitQwertyLayout::CreateLayoutWindowL() |
|
374 |
{ |
|
375 |
iLayoutWindow = CPeninputSplitQwertyWindow::NewL( this, this, UiStateMgr() ); |
|
376 |
} |
|
377 |
||
378 |
// --------------------------------------------------------------------------- |
|
379 |
// Factory method for creation resource config |
|
380 |
// --------------------------------------------------------------------------- |
|
381 |
// |
|
382 |
void CPeninputSplitQwertyLayout::CreateDataMgrL( const TAny* /*aInitData*/ ) |
|
383 |
{ |
|
384 |
iDataMgr = CPeninputSplitQwertyDataMgr::NewL( this ); |
|
385 |
} |
|
386 |
||
387 |
// --------------------------------------------------------------------------- |
|
388 |
// Get the layout type |
|
389 |
// --------------------------------------------------------------------------- |
|
390 |
// |
|
391 |
TInt CPeninputSplitQwertyLayout::LayoutType() |
|
392 |
{ |
|
393 |
return iLayoutType; |
|
394 |
} |
|
395 |
||
396 |
// --------------------------------------------------------------------------- |
|
397 |
// Handle virtual key event |
|
398 |
// --------------------------------------------------------------------------- |
|
399 |
// |
|
400 |
void CPeninputSplitQwertyLayout::HandleVirtualKeyUpL( TInt aEventType, |
|
401 |
CFepUiBaseCtrl* aCtrl, |
|
402 |
const TDesC& aEventData ) |
|
403 |
{ |
|
404 |
CPeninputSplitQwertyWindow* |
|
405 |
win = static_cast<CPeninputSplitQwertyWindow*>( iLayoutWindow ); |
|
406 |
||
407 |
TBool flag = win->HandleVirtualKeyUpEvent( aEventType, aCtrl, aEventData ); |
|
408 |
if( !flag ) |
|
409 |
{ |
|
410 |
HBufC* number = HBufC::NewL( 1 ); |
|
411 |
TPtrC eventDataPtr = aEventData; |
|
412 |
TInt len = aEventData.Length(); |
|
413 |
if ( len > 1 ) |
|
414 |
{ |
|
415 |
TVirtualKeyEventData* data = (TVirtualKeyEventData*) aEventData.Ptr(); |
|
416 |
TUint16 inputCode = data->iKeyEvent.iCode; |
|
417 |
TUint16 outputCode = inputCode; |
|
418 |
TBool isDottedChar = EFalse; |
|
419 |
for ( TInt i = 0; i < KNumberOfDottedChar; i++ ) |
|
420 |
{ |
|
421 |
if ( thaiUnicodeNew[i] == inputCode ) |
|
422 |
{ |
|
423 |
outputCode = thaiUnicodeOri[i]; |
|
424 |
isDottedChar = ETrue; |
|
425 |
break; |
|
426 |
} |
|
427 |
} |
|
428 |
if ( isDottedChar ) |
|
429 |
{ |
|
430 |
number->Des().Append( outputCode ); |
|
431 |
data->iKeyData.Set( *number ); |
|
432 |
eventDataPtr.Set( reinterpret_cast<TUint16*>(data), |
|
433 |
sizeof(*data)/sizeof(TUint16) ); |
|
434 |
} |
|
435 |
} |
|
436 |
||
437 |
CPeninputCommonLayoutExt::HandleControlEvent( aEventType, aCtrl, |
|
438 |
eventDataPtr ); |
|
439 |
delete number; |
|
440 |
} |
|
441 |
} |
|
442 |
||
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
443 |
|
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
444 |
// --------------------------------------------------------------------------- |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
445 |
// Handle show candidate list command. |
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
446 |
// --------------------------------------------------------------------------- |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
447 |
// |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
448 |
void CPeninputSplitQwertyLayout::HandleShowCandidateListCmdL( TUint8* aData ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
449 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
450 |
// Read candidate data from a block of memory staring from aData |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
451 |
// The format is activeIndex | count of candiates | |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
452 |
// length 1 | text 1 | length 2 | text 2 |... |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
453 |
TPtr8 buf8( aData, sizeof( TInt32 ) * KStartIntNumber, |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
454 |
sizeof( TInt32 ) * KStartIntNumber ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
455 |
RDesReadStream readStream; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
456 |
readStream.Open( buf8 ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
457 |
CleanupClosePushL( readStream ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
458 |
// Get activeIndex |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
459 |
TInt activeIndex = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
460 |
// Get coutn of candidates |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
461 |
TInt count = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
462 |
TInt langCode = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
463 |
TBidiText::TDirectionality dir = |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
464 |
TBidiText::ScriptDirectionality( ( TLanguage )langCode ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
465 |
CGraphicsContext::TTextAlign align = ( dir == TBidiText::ELeftToRight ) ? |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
466 |
CGraphicsContext::ELeft : |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
467 |
CGraphicsContext::ERight; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
468 |
CleanupStack::PopAndDestroy( &readStream ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
469 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
470 |
CDesCArray* itemArray = NULL; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
471 |
if ( count > 0 ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
472 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
473 |
TUint8* curPointer = aData + sizeof( TInt ) * KStartIntNumber; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
474 |
itemArray = new ( ELeave ) CDesCArrayFlat( count ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
475 |
CleanupStack::PushL( itemArray ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
476 |
for ( TInt i = 0; i < count; i++ ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
477 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
478 |
// Get length |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
479 |
buf8.Set( curPointer, sizeof( TInt32 ), sizeof( TInt32 ) ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
480 |
readStream.Open( buf8 ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
481 |
CleanupClosePushL( readStream ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
482 |
TInt32 textSize = 0; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
483 |
textSize = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
484 |
CleanupStack::PopAndDestroy( &readStream ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
485 |
if ( textSize > 0 ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
486 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
487 |
// Get text |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
488 |
curPointer += sizeof( TInt32 ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
489 |
HBufC* itemText = ReadTextInfoHBufCL |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
490 |
( (TUint16*)curPointer, |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
491 |
( textSize + 1 )/ 2 ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
492 |
if ( itemText ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
493 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
494 |
CleanupStack::PushL( itemText ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
495 |
itemArray->AppendL( *itemText ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
496 |
CleanupStack::PopAndDestroy( itemText ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
497 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
498 |
curPointer += textSize; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
499 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
500 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
501 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
502 |
buf8.Set( curPointer, sizeof( TInt32 ) * KEndIntNumber, |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
503 |
sizeof( TInt32 ) * KEndIntNumber ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
504 |
readStream.Open( buf8 ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
505 |
CleanupClosePushL( readStream ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
506 |
TRect rect; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
507 |
rect.iTl.iX = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
508 |
rect.iTl.iY = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
509 |
rect.iBr.iX = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
510 |
rect.iBr.iY = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
511 |
CleanupStack::PopAndDestroy( &readStream ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
512 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
513 |
TPeninputCandidateData cmd; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
514 |
cmd.iAlign = ( TInt ) align; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
515 |
cmd.iInitRect = rect; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
516 |
cmd.iSpellEnabled = EFalse; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
517 |
cmd.iTextWidthEnabled = EFalse; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
518 |
cmd.iItemArray = itemArray; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
519 |
cmd.iActiveIndex = activeIndex; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
520 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
521 |
TPtrC buf( reinterpret_cast<TUint16*>( &cmd ), sizeof( cmd ) ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
522 |
SignalOwner( ESignalShowServerCandidate, buf ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
523 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
524 |
CleanupStack::PopAndDestroy( itemArray ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
525 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
526 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
527 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
528 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
529 |
// --------------------------------------------------------------------------- |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
530 |
// Read text stored in a block of memory into HBufC. |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
531 |
// --------------------------------------------------------------------------- |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
532 |
// |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
533 |
HBufC* CPeninputSplitQwertyLayout::ReadTextInfoHBufCL( TUint16* aStartPtr, |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
534 |
TInt aLength ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
535 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
536 |
HBufC* itemText = NULL; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
537 |
if ( aLength > 0 ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
538 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
539 |
itemText = HBufC::NewLC( aLength ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
540 |
TPtr itemTextPtr = itemText->Des(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
541 |
itemTextPtr.Copy( aStartPtr, aLength ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
542 |
CleanupStack::Pop( itemText ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
543 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
544 |
return itemText; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
545 |
} |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
546 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
547 |
// --------------------------------------------------------------------------- |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
548 |
// Handle select candidate list item command. |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
549 |
// --------------------------------------------------------------------------- |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
550 |
// |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
551 |
void CPeninputSplitQwertyLayout::HandleSelectServerCandItemL( TUint8* aData ) |
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
552 |
{ |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
553 |
TPtr8* ptr = reinterpret_cast< TPtr8* > ( aData ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
554 |
RDesReadStream readStream; |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
555 |
readStream.Open( *ptr ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
556 |
CleanupClosePushL( readStream ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
557 |
TInt command = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
558 |
TInt focusItem = readStream.ReadInt32L(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
559 |
CleanupStack::PopAndDestroy(&readStream); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
560 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
561 |
if ( command == ECandItemCmdItemSelected ) |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
562 |
{ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
563 |
TPtrC buf( reinterpret_cast< TUint16* >( &focusItem ), |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
564 |
sizeof( TInt ) ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
565 |
SignalOwner ( ESignalSelectCandidate, buf ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
566 |
} |
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
567 |
} |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
568 |
|
44 | 569 |
// End Of File |