|
1 /* |
|
2 * Copyright (c) 2005-2006 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 for chinese peninput full screen hwr |
|
15 * |
|
16 */ |
|
17 |
|
18 // SYSTEM INCLUDES |
|
19 #include <AknUtils.h> |
|
20 #include <aknfeppeninputenums.h> |
|
21 |
|
22 // RESOURCE INCLUDE |
|
23 #include <peninputhwrfscreencn.rsg> |
|
24 |
|
25 // USER INCLUDES |
|
26 #include "peninputhwrfscnlayout.h" |
|
27 #include "peninputhwrfscncandidatepanel.h" |
|
28 #include "peninputhwrfscnevent.h" |
|
29 #include "peninputhwrfscncontrolid.h" |
|
30 #include "peninputhwrfscnlafmanager.h" |
|
31 |
|
32 // CONSTANT DEFINITION HEADER |
|
33 #include "peninputhwrfscnstoreconstants.h" |
|
34 |
|
35 TBool GetLandScape() |
|
36 { |
|
37 TPixelsTwipsAndRotation ptSize; |
|
38 CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation( ptSize ); |
|
39 |
|
40 // set proper screen style FS HWR |
|
41 // if width less than height then landscape is EFalse, or is ETrue |
|
42 TBool isLandScape = ptSize.iPixelSize.iWidth > ptSize.iPixelSize.iHeight; |
|
43 |
|
44 return isLandScape; |
|
45 } |
|
46 |
|
47 // ============================ MEMBER FUNCTIONS =============================== |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CPeninputHwrfscnCandidatePanel::NewL() |
|
51 // . |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 CPeninputHwrfscnCandidatePanel* CPeninputHwrfscnCandidatePanel::NewL( |
|
55 CPeninputHwrfscnLayout* aLayout ) |
|
56 { |
|
57 CPeninputHwrfscnCandidatePanel* self = new( ELeave ) |
|
58 CPeninputHwrfscnCandidatePanel( aLayout ); |
|
59 CleanupStack::PushL( self ); |
|
60 self->ConstructL(); |
|
61 CleanupStack::Pop(); |
|
62 return self; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CPeninputHwrfscnCandidatePanel::CPeninputHwrfscnCandidatePanel() |
|
67 // . |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 CPeninputHwrfscnCandidatePanel::CPeninputHwrfscnCandidatePanel( |
|
71 CPeninputHwrfscnLayout* aLayout ) |
|
72 :CPeninputHwrfscnBasePanel( aLayout ), |
|
73 iDataStore( aLayout->DataStore() ) |
|
74 { |
|
75 } |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // CPeninputHwrfscnCandidatePanel::~CPeninputHwrfscnCandidatePanel() |
|
79 // . |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 CPeninputHwrfscnCandidatePanel::~CPeninputHwrfscnCandidatePanel() |
|
83 { |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // CPeninputHwrfscnCandidatePanel::ConstructL() |
|
88 // . |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void CPeninputHwrfscnCandidatePanel::ConstructL() |
|
92 { |
|
93 iPos.iX = 0; |
|
94 iPos.iY = 0; |
|
95 |
|
96 TBool isLandScape = GetLandScape(); |
|
97 |
|
98 ReadLafInfo( isLandScape ); |
|
99 |
|
100 // add candidate dropdown list |
|
101 AddCandidateDropdownListL(); |
|
102 |
|
103 // add predictive dropdown list |
|
104 AddPredictiveDropdownListL(); |
|
105 |
|
106 iDataStore.AddSubscriber( this ); |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CPeninputHwrfscnCandidatePanel::Show() |
|
111 // . |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 void CPeninputHwrfscnCandidatePanel::Show( TBool aVisible ) |
|
115 { |
|
116 if( !aVisible ) |
|
117 { |
|
118 if( !iCandidateList->Hiden() ) |
|
119 { |
|
120 iCandidateList->ResetAndClear(); |
|
121 } |
|
122 |
|
123 if( !iPredictList->Hiden() ) |
|
124 { |
|
125 iPredictList->ResetAndClear(); |
|
126 } |
|
127 } |
|
128 |
|
129 iCandidateList->Hide( !aVisible ); |
|
130 iPredictList->Hide( !aVisible ); |
|
131 } |
|
132 |
|
133 // ----------------------------------------------------------------------------- |
|
134 // CPeninputHwrfscnCandidatePanel::Draw() |
|
135 // . |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 void CPeninputHwrfscnCandidatePanel::Draw() |
|
139 { |
|
140 } |
|
141 |
|
142 // ----------------------------------------------------------------------------- |
|
143 // CPeninputHwrfscnCandidatePanel::HandleControlEvent() |
|
144 // . |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 void CPeninputHwrfscnCandidatePanel::HandleControlEvent( TInt aEventType, |
|
148 CFepUiBaseCtrl* aCtrl, |
|
149 const TDesC& aEventData ) |
|
150 { |
|
151 ReportEvent( aEventType, aCtrl, aEventData ); |
|
152 } |
|
153 |
|
154 // ----------------------------------------------------------------------------- |
|
155 // CPeninputHwrfscnCandidatePanel::HandleCommand() |
|
156 // . |
|
157 // ----------------------------------------------------------------------------- |
|
158 // |
|
159 void CPeninputHwrfscnCandidatePanel::HandleCommand( TInt aCommand, |
|
160 TUint8* aData ) |
|
161 { |
|
162 if( aCommand == EHwrEventPointerOutsideWnd ) |
|
163 { |
|
164 Show( EFalse ); |
|
165 } |
|
166 else if( aCommand == EHwrEventCursorPosChanged ) |
|
167 { |
|
168 TRect cursorRect = *( TRect* )aData; |
|
169 if( iPos.iY != cursorRect.iBr.iY ) |
|
170 { |
|
171 MoveCandidateWindow( cursorRect ); |
|
172 } |
|
173 } |
|
174 } |
|
175 |
|
176 // ----------------------------------------------------------------------------- |
|
177 // CPeninputHwrfscnCandidatePanel::ShowWritingCandidate() |
|
178 // . |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 void CPeninputHwrfscnCandidatePanel::ShowWritingCandidate( TBool aVisible ) |
|
182 { |
|
183 if( !aVisible ) |
|
184 { |
|
185 if( !iCandidateList->Hiden() ) |
|
186 { |
|
187 iCandidateList->ResetAndClear(); |
|
188 } |
|
189 } |
|
190 |
|
191 iCandidateList->Hide( !aVisible ); |
|
192 } |
|
193 |
|
194 // ----------------------------------------------------------------------------- |
|
195 // CPeninputHwrfscnCandidatePanel::BeforePropertyChangedL() |
|
196 // . |
|
197 // ----------------------------------------------------------------------------- |
|
198 // |
|
199 TBool CPeninputHwrfscnCandidatePanel::BeforePropertyChangedL( |
|
200 MPeninputHwrfscnPropertySubscriber::TPeninputHwrfscnProperty /*aProptery*/ ) |
|
201 { |
|
202 return EFalse; |
|
203 } |
|
204 |
|
205 // ----------------------------------------------------------------------------- |
|
206 // CPeninputHwrfscnCandidatePanel::PropertyChangedL() |
|
207 // . |
|
208 // ----------------------------------------------------------------------------- |
|
209 // |
|
210 void CPeninputHwrfscnCandidatePanel::PropertyChangedL( |
|
211 MPeninputHwrfscnPropertySubscriber::TPeninputHwrfscnProperty aProptery ) |
|
212 { |
|
213 switch ( aProptery ) |
|
214 { |
|
215 case MPeninputHwrfscnPropertySubscriber::EPeninputHwrfscnPropertyCandidates: |
|
216 { |
|
217 iCandidateList->Hide( EFalse ); |
|
218 |
|
219 RPointerArray<HBufC> candidates = iDataStore.Candidate(); |
|
220 TInt primaryRange = iDataStore.PrimaryRange(); |
|
221 |
|
222 if ( primaryRange == ERangeNumber ) |
|
223 { |
|
224 // display an un-expandable candidate list in number range |
|
225 iCandidateList->SetCandidatesL( candidates, |
|
226 CFepCtrlDropdownList::EListNoExpandable ); |
|
227 } |
|
228 else// in non number range |
|
229 { |
|
230 // display an expandable candidate list |
|
231 iCandidateList->SetCandidatesL( candidates, |
|
232 CFepCtrlDropdownList::EListExpandable ); |
|
233 } |
|
234 |
|
235 // set the first cell high light |
|
236 iCandidateList->SetHighlightCell( 0 ); |
|
237 iLayout->LayoutOwner()->FlushUi(); |
|
238 break; |
|
239 } |
|
240 |
|
241 case MPeninputHwrfscnPropertySubscriber:: |
|
242 EPeninputHwrfscnPropertyHomephonicCandidates: |
|
243 { |
|
244 RPointerArray<HBufC> candidates = iDataStore.Candidate(); |
|
245 |
|
246 if ( candidates.Count() <= KCandidateCountNumMode ) |
|
247 { |
|
248 // display an un-expandable candidate list |
|
249 iCandidateList->SetCandidatesL( candidates, |
|
250 CFepCtrlDropdownList::EListNoExpandable ); |
|
251 } |
|
252 else |
|
253 { |
|
254 // display an expandable candidate list |
|
255 iCandidateList->SetCandidatesL( candidates, |
|
256 CFepCtrlDropdownList::EListExpandable ); |
|
257 } |
|
258 |
|
259 iCandidateList->SetHighlightCell( 0 ); |
|
260 iLayout->LayoutOwner()->FlushUi(); |
|
261 break; |
|
262 } |
|
263 |
|
264 case MPeninputHwrfscnPropertySubscriber:: |
|
265 EPeninputHwrfscnPropertyPredictives: |
|
266 { |
|
267 iPredictList->Hide( EFalse ); |
|
268 |
|
269 TInt primaryRange = iDataStore.PrimaryRange(); |
|
270 RPointerArray<HBufC> predicts = iDataStore.Predictive(); |
|
271 |
|
272 if ( primaryRange == ERangeNumber || |
|
273 primaryRange == ERangeEnglish ) |
|
274 { |
|
275 // display an un-expandable predictive list |
|
276 iPredictList->SetCandidatesL( predicts, |
|
277 CFepCtrlDropdownList::EListNoExpandable ); |
|
278 } |
|
279 else// in native range |
|
280 { |
|
281 // display an expandable predictive list |
|
282 iPredictList->SetCandidatesL( predicts, |
|
283 CFepCtrlDropdownList::EListExpandable ); |
|
284 } |
|
285 iLayout->LayoutOwner()->FlushUi(); |
|
286 break; |
|
287 } |
|
288 |
|
289 case MPeninputHwrfscnPropertySubscriber:: |
|
290 EPeninputHwrfscnPropertyAddPredictives: |
|
291 { |
|
292 RPointerArray<HBufC> predicts = iDataStore.Predictive(); |
|
293 |
|
294 // add predict when pressing next page |
|
295 iPredictList->AddCandidatesL( predicts, |
|
296 CFepCtrlDropdownList::EListExpandable ); |
|
297 |
|
298 break; |
|
299 } |
|
300 |
|
301 default: |
|
302 break; |
|
303 } |
|
304 } |
|
305 |
|
306 // ----------------------------------------------------------------------------- |
|
307 // CPeninputHwrfscnCandidatePanel::SizeChanged() |
|
308 // . |
|
309 // ----------------------------------------------------------------------------- |
|
310 // |
|
311 void CPeninputHwrfscnCandidatePanel::SizeChanged() |
|
312 { |
|
313 ReadLafInfo( GetLandScape() ); |
|
314 |
|
315 // candidate dropdown list |
|
316 iCandidateList->SetFont( PeninputHwrfscnLAFManager::CandidateFont() ); |
|
317 |
|
318 iCandidateList->SizeChanged( iUnitWidth, |
|
319 iUnitHeight, |
|
320 iUnitWidth, |
|
321 iPos, |
|
322 KCandidateCountPerRow, |
|
323 KCandidateRowCount ); |
|
324 |
|
325 // predictive dropdown list |
|
326 iPos.iY += iUnitHeight; |
|
327 iPredictList->SetFont( PeninputHwrfscnLAFManager::CandidateFont() ); |
|
328 |
|
329 iPredictList->SizeChanged( iUnitWidth, |
|
330 iUnitHeight, |
|
331 iUnitWidth, |
|
332 iPos, |
|
333 KCandidateCountPerRow, |
|
334 KCandidateRowCount ); |
|
335 } |
|
336 |
|
337 // ----------------------------------------------------------------------------- |
|
338 // CPeninputHwrfscnCandidatePanel::LafChanged() |
|
339 // . |
|
340 // ----------------------------------------------------------------------------- |
|
341 // |
|
342 void CPeninputHwrfscnCandidatePanel::LafChanged() |
|
343 { |
|
344 |
|
345 } |
|
346 // ----------------------------------------------------------------------------- |
|
347 // CPeninputHwrfscnCandidatePanel::AddCandidateDropdownListL() |
|
348 // . |
|
349 // ----------------------------------------------------------------------------- |
|
350 // |
|
351 void CPeninputHwrfscnCandidatePanel::AddCandidateDropdownListL() |
|
352 { |
|
353 TResourceReader reader; |
|
354 CCoeEnv::Static()->CreateResourceReaderLC( reader, |
|
355 R_FSHWR_CANDIDATE_DROP_DOWN_LIST ); |
|
356 |
|
357 const CFont *font = PeninputHwrfscnLAFManager::CandidateFont(); |
|
358 TInt textMargin = ( iUnitHeight - font->HeightInPixels() ) / 2; |
|
359 |
|
360 // create the candidate list |
|
361 |
|
362 TRgb btnDownColor; |
|
363 PeninputHwrfscnLAFManager::CandidateBtnDownBgColor( btnDownColor ); |
|
364 |
|
365 TDropdownListDrawInfo candiDrawInfo(KAknsIIDQsnFrFunctionButtonInactive, |
|
366 KAknsIIDQsnFrFunctionButtonNormal, |
|
367 KAknsIIDQsnFrFunctionButtonPressed, |
|
368 KAknsIIDQsnFrItutButtonCandiSideL, |
|
369 KAknsIIDQsnFrItutButtonCandiMiddle, |
|
370 KAknsIIDQsnFrItutButtonCandiSideR, |
|
371 KAknsIIDQsnFrItutButtonCandiPressedSideL, |
|
372 KAknsIIDQsnFrItutButtonCandiPressedMiddle, |
|
373 KAknsIIDQsnFrItutButtonCandiPressedSideR, |
|
374 TRgb(194, 221, 242), |
|
375 ETrue); |
|
376 |
|
377 |
|
378 iCandidateList = CFepCtrlDropdownList::NewL( iPos, |
|
379 iLayout, |
|
380 EHwrCtrlIdCandidateList, |
|
381 reader, |
|
382 iUnitWidth, |
|
383 iUnitHeight, |
|
384 iUnitWidth, |
|
385 KCandidateCountPerRow, |
|
386 KCandidateRowCount, |
|
387 font, |
|
388 NULL, |
|
389 CGraphicsContext::ECenter, |
|
390 textMargin, |
|
391 KRgbBlack, // border color |
|
392 TRgb( 0xeeeeee ), // content bg color |
|
393 KRgbWhite, // navi bg color |
|
394 btnDownColor, |
|
395 KRgbRed ); |
|
396 |
|
397 AddToRootControlL( iCandidateList ); |
|
398 |
|
399 // set candidate list resource |
|
400 iCandidateList->SetResourceId( R_FSHWR_CANDIDATE_DROP_DOWN_LIST ); |
|
401 |
|
402 // set the needed events |
|
403 iCandidateList->SetEventIdForCandidateSelected( EHwrEventCandidateSelected ); |
|
404 |
|
405 iCandidateList->AddEventObserver( this ); |
|
406 |
|
407 // hide the candidate list |
|
408 iCandidateList->Hide( ETrue ); |
|
409 |
|
410 iCandidateList->SetDropdownListImgID(candiDrawInfo); |
|
411 |
|
412 CleanupStack::PopAndDestroy(); |
|
413 } |
|
414 |
|
415 // ----------------------------------------------------------------------------- |
|
416 // CPeninputHwrfscnCandidatePanel::AddPredictiveDropdownListL() |
|
417 // . |
|
418 // ----------------------------------------------------------------------------- |
|
419 // |
|
420 void CPeninputHwrfscnCandidatePanel::AddPredictiveDropdownListL() |
|
421 { |
|
422 TResourceReader reader; |
|
423 CCoeEnv::Static()->CreateResourceReaderLC( reader, |
|
424 R_FSHWR_PREDICT_DROP_DOWN_LIST ); |
|
425 |
|
426 const CFont *font = PeninputHwrfscnLAFManager::CandidateFont(); |
|
427 TInt textMargin = ( iUnitHeight - font->HeightInPixels() ) / 2; |
|
428 |
|
429 // create the predictive list |
|
430 TRgb btnDownColor; |
|
431 PeninputHwrfscnLAFManager::CandidateBtnDownBgColor( btnDownColor ); |
|
432 |
|
433 |
|
434 TDropdownListDrawInfo candiDrawInfo(KAknsIIDQsnFrFunctionButtonInactive, |
|
435 KAknsIIDQsnFrFunctionButtonNormal, |
|
436 KAknsIIDQsnFrFunctionButtonPressed, |
|
437 KAknsIIDQsnFrItutButtonComposeSideL, |
|
438 KAknsIIDQsnFrItutButtonComposeMiddle, |
|
439 KAknsIIDQsnFrItutButtonComposeSideR, |
|
440 KAknsIIDQsnFrItutButtonComposePressedSideL, |
|
441 KAknsIIDQsnFrItutButtonComposePressedSideR, |
|
442 KAknsIIDQsnFrItutButtonComposePressedMiddle, |
|
443 TRgb(194, 221, 242), |
|
444 ETrue); |
|
445 |
|
446 |
|
447 iPredictList = CFepCtrlDropdownList::NewL( iPos, |
|
448 iLayout, |
|
449 EHwrCtrlIdPredictiveList, |
|
450 reader, |
|
451 iUnitWidth, |
|
452 iUnitHeight, |
|
453 iUnitWidth, |
|
454 KCandidateCountPerRow, |
|
455 KCandidateRowCount, |
|
456 font, |
|
457 NULL, |
|
458 CGraphicsContext::ECenter, |
|
459 textMargin, |
|
460 KRgbBlack, // border color |
|
461 TRgb( 0xeeeeee ), // content bg color |
|
462 KRgbWhite, // navi bg color |
|
463 btnDownColor, |
|
464 KRgbRed ); |
|
465 |
|
466 AddToRootControlL( iPredictList ); |
|
467 |
|
468 // set the predictive list resource |
|
469 iPredictList->SetResourceId( R_FSHWR_PREDICT_DROP_DOWN_LIST ); |
|
470 |
|
471 // set the needed events |
|
472 iPredictList->SetEventIdForCandidateSelected( |
|
473 EHwrEventPredictiveSelected ); |
|
474 iPredictList->SetEventIdForNextPageCandidate( |
|
475 EHwrEventGetNextCandidatePage ); |
|
476 iPredictList->SetEventIdForPreviousPageCandidate( |
|
477 EHwrEventGetPreviousCandidatePage ); |
|
478 iPredictList->AddEventObserver( this ); |
|
479 |
|
480 // hide the predictive list |
|
481 iPredictList->Hide( ETrue ); |
|
482 |
|
483 iPredictList->SetDropdownListImgID(candiDrawInfo); |
|
484 |
|
485 CleanupStack::PopAndDestroy(); |
|
486 } |
|
487 |
|
488 |
|
489 // ----------------------------------------------------------------------------- |
|
490 // CPeninputHwrfscnCandidatePanel::ReadLafInfo |
|
491 // ----------------------------------------------------------------------------- |
|
492 // |
|
493 void CPeninputHwrfscnCandidatePanel::ReadLafInfo( TBool /*aLandscapeStyle*/ ) |
|
494 { |
|
495 // if size is changing, or unit size, shadow size have not been set yet |
|
496 TRect rect( PeninputHwrfscnLAFManager::CandidateUnitRect() ); |
|
497 iUnitWidth = rect.Width(); |
|
498 iUnitHeight = rect.Height(); |
|
499 } |
|
500 |
|
501 // ----------------------------------------------------------------------------- |
|
502 // CPeninputHwrfscnCandidatePanel::MoveCandidateWindow |
|
503 // ----------------------------------------------------------------------------- |
|
504 // |
|
505 void CPeninputHwrfscnCandidatePanel::MoveCandidateWindow( |
|
506 const TRect aCursorRect ) |
|
507 { |
|
508 // clear the candidate window first |
|
509 TRect oldCandidateRect = iCandidateList->Rect(); |
|
510 TRect oldPredictRect = iPredictList->Rect(); |
|
511 ClearWindow(); |
|
512 |
|
513 // calculate the extened list max height by primary range |
|
514 TInt extendedListHeight = MaxRowNum() * iUnitHeight; |
|
515 |
|
516 if( !CheckCursorPosition( aCursorRect ) ) |
|
517 { |
|
518 // if the cursor position is not valid, set a default value |
|
519 iPos.iY = iLayout->ScreenSize().iHeight - extendedListHeight - 1; |
|
520 } |
|
521 else |
|
522 { |
|
523 // set the default candidate window position to be below the cursor |
|
524 iPos = aCursorRect.iBr; |
|
525 } |
|
526 |
|
527 // calculate the bottom right Y of candidate window |
|
528 TInt brOfCanWindow = iPos.iY + extendedListHeight; |
|
529 |
|
530 // get the screen extent |
|
531 TSize screenSize = iLayout->ScreenSize(); |
|
532 |
|
533 // check if the extened window overflow |
|
534 if( brOfCanWindow > screenSize.iHeight ) |
|
535 { |
|
536 // move the position to be above the cursor |
|
537 iPos.iY = aCursorRect.iTl.iY - 3 * iUnitHeight; |
|
538 |
|
539 brOfCanWindow = iPos.iY + extendedListHeight; |
|
540 |
|
541 // check if the extened window still overflow |
|
542 if( brOfCanWindow > screenSize.iHeight ) |
|
543 { |
|
544 iPos.iY = screenSize.iHeight - extendedListHeight; |
|
545 } |
|
546 } |
|
547 |
|
548 // Set the candiate winodw x positon to be center of the screen width |
|
549 if(screenSize.iWidth < screenSize.iHeight) |
|
550 { |
|
551 iPos.iX = ( screenSize.iWidth - iUnitWidth * KCandidateCountNumMode ) / 2; |
|
552 } |
|
553 else |
|
554 { |
|
555 TRect mainPane = PeninputHwrfscnLAFManager::MainPaneRect(); |
|
556 |
|
557 iPos.iX = ( mainPane.Width() - iUnitWidth * KCandidateCountNumMode ) / 2; |
|
558 } |
|
559 |
|
560 // set the candiate list position |
|
561 iCandidateList->SetTopLeftPoint( iPos ); |
|
562 |
|
563 // set the predict list position |
|
564 iPredictList->SetTopLeftPoint( TPoint( iPos.iX,iPos.iY+iUnitHeight ) ); |
|
565 |
|
566 iLayout->UpdateArea( iCandidateList, oldCandidateRect, EFalse ); |
|
567 iLayout->UpdateArea( iPredictList, oldPredictRect, EFalse ); |
|
568 } |
|
569 |
|
570 // ----------------------------------------------------------------------------- |
|
571 // CPeninputHwrfscnCandidatePanel::ClearWindow |
|
572 // ----------------------------------------------------------------------------- |
|
573 // |
|
574 void CPeninputHwrfscnCandidatePanel::ClearWindow() |
|
575 { |
|
576 iCandidateList->Clear(); |
|
577 iPredictList->Clear(); |
|
578 } |
|
579 |
|
580 // ----------------------------------------------------------------------------- |
|
581 // CPeninputHwrfscnCandidatePanel::MaxRowNum |
|
582 // ----------------------------------------------------------------------------- |
|
583 // |
|
584 TInt CPeninputHwrfscnCandidatePanel::MaxRowNum() |
|
585 { |
|
586 /*TInt primaryRange = iDataStore.PrimaryRange(); |
|
587 |
|
588 if(primaryRange == ERangeNative) |
|
589 { |
|
590 return KMaxCandidateWinRowCount; |
|
591 } |
|
592 else if(primaryRange == ERangeNumber) |
|
593 { |
|
594 return KCandidateListCount; |
|
595 } |
|
596 else if(primaryRange == ERangeEnglish) |
|
597 { |
|
598 return KCandidateRowCount; |
|
599 }*/ |
|
600 |
|
601 return KMaxCandidateWinRowCount; |
|
602 } |
|
603 |
|
604 // ----------------------------------------------------------------------------- |
|
605 // CPeninputHwrfscnCandidatePanel::CheckCursorPosition() |
|
606 // ----------------------------------------------------------------------------- |
|
607 // |
|
608 TBool CPeninputHwrfscnCandidatePanel::CheckCursorPosition( |
|
609 const TRect aCursorRect ) const |
|
610 { |
|
611 if( aCursorRect.iBr.iY < 0 || |
|
612 aCursorRect.iBr.iY > iLayout->ScreenSize().iHeight ) |
|
613 { |
|
614 return EFalse; |
|
615 } |
|
616 else |
|
617 { |
|
618 return ETrue; |
|
619 } |
|
620 } |
|
621 |
|
622 //End of file |