|
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 base control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "peninputlayouttimer.h" |
|
20 #include "peninputlayoutcandidatewnd.h" |
|
21 #include "peninputlayout.h" |
|
22 |
|
23 const TInt KDefaultBorder = 1 ; |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS ============================= |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // CCandidateWnd::CCandidateWnd |
|
29 // C++ default constructor |
|
30 // (other items were commented in a header). |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 EXPORT_C CCandidateWnd::CCandidateWnd(const TRect& aRect,TInt aCandidateRectNum, |
|
34 CFepUiLayout* aUiLayout,TInt aCtrlId, |
|
35 TTimeIntervalMicroSeconds32 aHideTimer) |
|
36 :CFepUiBaseCtrl(aRect,aUiLayout,aCtrlId), |
|
37 iSelection(-1), |
|
38 iDelay(aHideTimer), |
|
39 iBaseline(-1), |
|
40 iFontOwnership(EFalse) |
|
41 { |
|
42 SetControlType(ECtrlCandidateList); |
|
43 |
|
44 if(iDelay.Int()!=0) |
|
45 iAutoHide=ETrue; |
|
46 else |
|
47 iAutoHide=EFalse; |
|
48 |
|
49 if(aCandidateRectNum <=0) |
|
50 iCandidateRectNum = 1; |
|
51 else |
|
52 iCandidateRectNum = aCandidateRectNum; |
|
53 |
|
54 iFontSpec.iHeight = 0; |
|
55 //candidate window is opaque |
|
56 SetMaskBkCol(KRgbBlack); |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // CCandidateWnd::~CCandidateWnd |
|
61 // Destructor |
|
62 // (other items were commented in a header). |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 EXPORT_C CCandidateWnd::~CCandidateWnd() |
|
66 { |
|
67 //free the candidate buffer |
|
68 for(TInt i = 0; i < iCandidateList.Count(); i++) |
|
69 { |
|
70 HBufC* buf = iCandidateList[i]; |
|
71 delete buf; |
|
72 } |
|
73 iCandidateList.Close(); |
|
74 iCandidateRectList.Close(); |
|
75 iCandidateTextRectList.Close(); |
|
76 delete iHideTimer; |
|
77 |
|
78 if(iFontOwnership && iFont) |
|
79 { |
|
80 BitmapDevice()->ReleaseFont(iFont); |
|
81 iFont = NULL; |
|
82 } |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // CCandidateWnd::NewL |
|
87 // factory function |
|
88 // (other items were commented in a header). |
|
89 // --------------------------------------------------------------------------- |
|
90 // |
|
91 EXPORT_C CCandidateWnd* CCandidateWnd::NewL(const TRect& aRect,TInt aCandidateRectNum, |
|
92 CFepUiLayout* aUiLayout,TInt aCtrlId, |
|
93 TTimeIntervalMicroSeconds32 aHideTime) |
|
94 { |
|
95 CCandidateWnd* wnd=new (ELeave)CCandidateWnd(aRect,aCandidateRectNum, |
|
96 aUiLayout,aCtrlId,aHideTime); |
|
97 CleanupStack::PushL(wnd); |
|
98 wnd->ConstructL (); |
|
99 CleanupStack::Pop(wnd); |
|
100 return wnd; |
|
101 } |
|
102 |
|
103 // --------------------------------------------------------------------------- |
|
104 // CCandidateWnd::GetCandidateL |
|
105 // Set candidate data |
|
106 // (other items were commented in a header). |
|
107 // --------------------------------------------------------------------------- |
|
108 // |
|
109 EXPORT_C const TDesC& CCandidateWnd::GetSelCandidate() |
|
110 { |
|
111 if(iSelection >= 0 && iSelection < iCandidateList.Count()) |
|
112 { |
|
113 return *(iCandidateList[iSelection]); |
|
114 } |
|
115 return KNullDesC(); |
|
116 } |
|
117 |
|
118 // --------------------------------------------------------------------------- |
|
119 // CCandidateWnd::SetAutoHideDelay |
|
120 // Set auto hide timer delay |
|
121 // (other items were commented in a header). |
|
122 // --------------------------------------------------------------------------- |
|
123 // |
|
124 EXPORT_C void CCandidateWnd::SetAutoHideDelay(TTimeIntervalMicroSeconds32 aDelay) |
|
125 { |
|
126 iDelay = aDelay; |
|
127 if(iDelay.Int()!=0) |
|
128 { |
|
129 iAutoHide=ETrue; |
|
130 iHideTimer->SetTimer(iDelay); |
|
131 } |
|
132 else |
|
133 { |
|
134 iAutoHide=EFalse; |
|
135 iHideTimer->Cancel(); |
|
136 } |
|
137 |
|
138 } |
|
139 |
|
140 // --------------------------------------------------------------------------- |
|
141 // CCandidateWnd::SetCandidateNumL |
|
142 // Set the number of candidates in one line |
|
143 // (other items were commented in a header). |
|
144 // --------------------------------------------------------------------------- |
|
145 // |
|
146 EXPORT_C void CCandidateWnd::SetCandidateNumL(TInt aNumInLine) |
|
147 { |
|
148 if(aNumInLine <=0) |
|
149 iCandidateRectNum = 1; |
|
150 else |
|
151 iCandidateRectNum = aNumInLine; |
|
152 |
|
153 iCandidateRectList.Reset(); |
|
154 iCandidateTextRectList.Reset(); |
|
155 TRect rect(Rect()); |
|
156 |
|
157 TInt w = (rect.Width() - KDefaultBorder * (1+iCandidateRectNum) ) |
|
158 / iCandidateRectNum; |
|
159 for(TInt i=0;i<iCandidateRectNum;i++) |
|
160 { |
|
161 rect.iBr.iX=rect.iTl.iX+w; |
|
162 iCandidateRectList.AppendL(rect); |
|
163 iCandidateTextRectList.AppendL(rect); |
|
164 rect.iTl.iX=rect.iBr.iX+1; |
|
165 } |
|
166 } |
|
167 |
|
168 |
|
169 // --------------------------------------------------------------------------- |
|
170 // CCandidateWnd::SetCandidateNumL |
|
171 // Set the number of candidates in one line |
|
172 // (other items were commented in a header). |
|
173 // --------------------------------------------------------------------------- |
|
174 // |
|
175 EXPORT_C void CCandidateWnd::SetCandidateNumL(TInt aNumInLine, |
|
176 const TSize& aCellRectSize, const TRect& aTextRect) |
|
177 { |
|
178 if(aNumInLine <= 0) |
|
179 iCandidateRectNum = 1; |
|
180 else |
|
181 iCandidateRectNum = aNumInLine; |
|
182 |
|
183 iCandidateRectList.Reset(); |
|
184 iCandidateTextRectList.Reset(); |
|
185 TRect rect(Rect()); |
|
186 TRect textRect; //for text drawing |
|
187 |
|
188 TPoint offset = aTextRect.iTl; |
|
189 for(TInt i = 0;i < iCandidateRectNum;i++) |
|
190 { |
|
191 rect.iBr.iX = rect.iTl.iX + aCellRectSize.iWidth; |
|
192 iCandidateRectList.AppendL(rect); |
|
193 textRect.iTl = rect.iTl + offset; |
|
194 textRect.iBr.iX = textRect.iTl.iX + aTextRect.Width(); |
|
195 textRect.iBr.iY = textRect.iTl.iY + aTextRect.Height(); |
|
196 iCandidateTextRectList.AppendL(textRect); |
|
197 |
|
198 rect.iTl.iX = rect.iBr.iX + 1; |
|
199 } |
|
200 } |
|
201 |
|
202 // --------------------------------------------------------------------------- |
|
203 // CCandidateWnd::SetFont |
|
204 // Set candidate window font |
|
205 // (other items were commented in a header). |
|
206 // --------------------------------------------------------------------------- |
|
207 // |
|
208 EXPORT_C void CCandidateWnd::SetFont(const TFontSpec& aFontSpec) |
|
209 { |
|
210 |
|
211 iFontSpec = aFontSpec; |
|
212 if(iFontOwnership && iFont) //release the owned font |
|
213 { |
|
214 BitmapDevice()->ReleaseFont(iFont); |
|
215 iFont = NULL; |
|
216 } |
|
217 if(BitmapDevice()) |
|
218 { |
|
219 if (KErrNone != BitmapDevice()->GetNearestFontInPixels(iFont,iFontSpec)) |
|
220 iFont = NULL; |
|
221 } |
|
222 iFontOwnership = ETrue; |
|
223 } |
|
224 |
|
225 // --------------------------------------------------------------------------- |
|
226 // CCandidateWnd::SetFont |
|
227 // Set candidate window font |
|
228 // (other items were commented in a header). |
|
229 // --------------------------------------------------------------------------- |
|
230 // |
|
231 EXPORT_C void CCandidateWnd::SetFont(const CFont* aFont) |
|
232 { |
|
233 if(iFontOwnership && iFont) |
|
234 { |
|
235 BitmapDevice()->ReleaseFont(iFont); |
|
236 iFont = NULL; |
|
237 } |
|
238 iFont = const_cast<CFont*>(aFont); |
|
239 if(iFont) |
|
240 iFontSpec = iFont->FontSpecInTwips(); |
|
241 iFontOwnership = EFalse; |
|
242 } |
|
243 |
|
244 // --------------------------------------------------------------------------- |
|
245 // CCandidateWnd::Draw |
|
246 // Draw control |
|
247 // (other items were commented in a header). |
|
248 // --------------------------------------------------------------------------- |
|
249 // |
|
250 EXPORT_C void CCandidateWnd::Draw() |
|
251 { |
|
252 //do nothing if not ready or hiden or no candidate while in auto hide mode |
|
253 if(!AbleToDraw() || (iAutoHide && iCandidateList.Count() <= 0)) |
|
254 return; |
|
255 |
|
256 DrawOpaqueMaskBackground(); |
|
257 CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc()); |
|
258 TRect wndRect = Rect(); |
|
259 |
|
260 // ----- draw on bitmaps ----- |
|
261 DrawBackground(); |
|
262 //draw two lines: the up left and up top line |
|
263 gc->DrawLine(wndRect.iTl,TPoint(wndRect.iTl.iX,wndRect.iBr.iY)); |
|
264 gc->DrawLine(wndRect.iTl,TPoint(wndRect.iBr.iX,wndRect.iTl.iY)); |
|
265 |
|
266 |
|
267 |
|
268 //draw candidate text |
|
269 if(iFont) |
|
270 BitGc()->UseFont(iFont); |
|
271 |
|
272 TBuf<1> buf; |
|
273 |
|
274 BitGc()->SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
275 |
|
276 // __ASSERT_DEBUG(iCandidateRectList.Count(),EUiLayoutCandiateNumIsNotSet); |
|
277 |
|
278 TRect rect=iCandidateRectList[0]; |
|
279 BitGc()->DrawLine(TPoint(rect.iTl.iX,rect.iTl.iY), |
|
280 TPoint(rect.iTl.iX,rect.iBr.iY)); |
|
281 |
|
282 TInt baseLine = iBaseline > 0 ? iBaseline : |
|
283 iCandidateTextRectList[0].Height()*KDEFAULTBASELINERATIO; |
|
284 |
|
285 for(TInt i = 0 ; i < iCandidateRectNum ;i++) |
|
286 { |
|
287 //draw bottom line and right line |
|
288 TPoint bottom_from(iCandidateRectList[i].iTl.iX, |
|
289 iCandidateRectList[i].iBr.iY); |
|
290 TPoint bottom_to(iCandidateRectList[i].iBr.iX, |
|
291 iCandidateRectList[i].iBr.iY); |
|
292 BitGc()->DrawLine(bottom_from,bottom_to); |
|
293 |
|
294 TPoint right_from(iCandidateRectList[i].iBr.iX, |
|
295 iCandidateRectList[i].iTl.iY); |
|
296 TPoint right_to(iCandidateRectList[i].iBr.iX, |
|
297 iCandidateRectList[i].iBr.iY); |
|
298 BitGc()->DrawLine(right_from,right_to); |
|
299 |
|
300 if(i < iCandidateList.Count() && iFont) |
|
301 { |
|
302 HBufC* data=iCandidateList[i]; |
|
303 |
|
304 BitGc()->DrawText(*data,iCandidateTextRectList[i],baseLine, |
|
305 CGraphicsContext::ECenter ); |
|
306 } |
|
307 } |
|
308 if(iFont) |
|
309 BitGc()->DiscardFont(); |
|
310 } |
|
311 |
|
312 |
|
313 // --------------------------------------------------------------------------- |
|
314 // CCandidateWnd::Move |
|
315 // Move the candidate window |
|
316 // (other items were commented in a header). |
|
317 // --------------------------------------------------------------------------- |
|
318 // |
|
319 EXPORT_C void CCandidateWnd::Move(const TPoint& aOffset) |
|
320 { |
|
321 CFepUiBaseCtrl::Move(aOffset); |
|
322 //Recal candidate rect after moving |
|
323 |
|
324 for(TInt i = 0 ; i < iCandidateTextRectList.Count();i++) |
|
325 { |
|
326 iCandidateTextRectList[i].Move(aOffset); |
|
327 iCandidateRectList[i].Move(aOffset); |
|
328 } |
|
329 |
|
330 } |
|
331 |
|
332 // --------------------------------------------------------------------------- |
|
333 // CCandidateWnd::DrawIndication |
|
334 // Draw selection effect |
|
335 // (other items were commented in a header). |
|
336 // --------------------------------------------------------------------------- |
|
337 // |
|
338 void CCandidateWnd::DrawIndication(TInt aSelection,TBool aPressedFlag) |
|
339 { |
|
340 if(aSelection < 0) |
|
341 return; |
|
342 CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc()); |
|
343 |
|
344 TRect rect = iCandidateTextRectList[aSelection]; |
|
345 |
|
346 |
|
347 gc->Activate( BitmapDevice() ); |
|
348 const TUint8 blackMap = 128; |
|
349 const TUint8 whiteMap = 240; |
|
350 if(aPressedFlag) //need press effect |
|
351 { |
|
352 gc->SetFadingParameters(blackMap, whiteMap); |
|
353 gc->SetFaded(ETrue); |
|
354 } |
|
355 else |
|
356 gc->SetFaded(EFalse); |
|
357 |
|
358 TPoint bmpPos = rect.iTl; |
|
359 gc->SetPenColor( PenColor() ); |
|
360 if(BackgroundBmp()) |
|
361 gc->BitBlt(bmpPos, BackgroundBmp(), rect); |
|
362 else |
|
363 { |
|
364 gc->SetBrushColor( BkColor()); |
|
365 gc->SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
366 gc->SetPenColor(BkColor()); |
|
367 gc->SetPenStyle(CGraphicsContext::ESolidPen); |
|
368 gc->DrawRect(rect); |
|
369 } |
|
370 |
|
371 gc->UseFont(iFont); |
|
372 |
|
373 HBufC* data=iCandidateList[aSelection]; |
|
374 gc->SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
375 |
|
376 TInt baseLine = iBaseline > 0 ? iBaseline : |
|
377 iCandidateTextRectList[0].Height()*KDEFAULTBASELINERATIO; |
|
378 gc->SetPenColor( PenColor()); |
|
379 gc->SetPenStyle(CGraphicsContext::ESolidPen); |
|
380 gc->DrawText(*data,rect,baseLine,CGraphicsContext::ECenter ); |
|
381 |
|
382 gc->DiscardFont(); |
|
383 |
|
384 UpdateArea(rect, EFalse); |
|
385 gc->SetFaded(EFalse); |
|
386 } |
|
387 |
|
388 // --------------------------------------------------------------------------- |
|
389 // CCandidateWnd::HandlePointerDownEventL |
|
390 // handle pointer down event |
|
391 // (other items were commented in a header). |
|
392 // --------------------------------------------------------------------------- |
|
393 // |
|
394 EXPORT_C CFepUiBaseCtrl* CCandidateWnd::HandlePointerDownEventL( const TPoint& aPt) |
|
395 { |
|
396 //call base to set state |
|
397 CFepUiBaseCtrl::HandlePointerDownEventL(aPt); |
|
398 for(TInt i=0;i < iCandidateRectList.Count() && i<iCandidateList.Count();i++) |
|
399 { |
|
400 if(iCandidateRectList[i].Contains(aPt)) |
|
401 { |
|
402 if(iHideTimer) |
|
403 iHideTimer->Cancel(); |
|
404 |
|
405 //selected |
|
406 iSelection = i; |
|
407 DrawIndication(i); |
|
408 iPointerLeft = EFalse; |
|
409 iPointerLeftCandidate = EFalse; |
|
410 return this; |
|
411 } |
|
412 } |
|
413 |
|
414 iSelection = -1; //no selection |
|
415 return this; |
|
416 } |
|
417 // --------------------------------------------------------------------------- |
|
418 // CCandidateWnd::HandlePointerMoveEventL |
|
419 // handle pointer move event |
|
420 // (other items were commented in a header). |
|
421 // --------------------------------------------------------------------------- |
|
422 // |
|
423 EXPORT_C CFepUiBaseCtrl* CCandidateWnd::HandlePointerMoveEventL( const TPoint& aPoint) |
|
424 { |
|
425 for(TInt i=0;i < iCandidateRectList.Count() && i<iCandidateList.Count();i++) |
|
426 { |
|
427 if(iCandidateRectList[i].Contains(aPoint)) |
|
428 { |
|
429 //selected |
|
430 if(i != iSelection) |
|
431 { |
|
432 if(!iPointerLeftCandidate) |
|
433 { |
|
434 DrawIndication(iSelection,EFalse); |
|
435 iPointerLeftCandidate = ETrue; //pointer move to another candidate |
|
436 } |
|
437 } |
|
438 else |
|
439 { |
|
440 if(iPointerLeftCandidate) |
|
441 { |
|
442 DrawIndication(iSelection,ETrue); |
|
443 iPointerLeftCandidate = EFalse; |
|
444 } |
|
445 } |
|
446 return this; |
|
447 } |
|
448 } |
|
449 return this; |
|
450 } |
|
451 // --------------------------------------------------------------------------- |
|
452 // CCandidateWnd::HanldePointerUpEventL |
|
453 // handle pointer up event |
|
454 // (other items were commented in a header). |
|
455 // --------------------------------------------------------------------------- |
|
456 // |
|
457 EXPORT_C CFepUiBaseCtrl* CCandidateWnd::HandlePointerUpEventL( const TPoint& aPoint) |
|
458 { |
|
459 TBool bContinue = ETrue; |
|
460 for(TInt i=0;i < iCandidateRectList.Count() && i < iCandidateList.Count() |
|
461 && bContinue;i++) |
|
462 { |
|
463 if(iCandidateRectList[i].Contains(aPoint)) |
|
464 { |
|
465 if(iHideTimer) |
|
466 iHideTimer->Cancel(); |
|
467 |
|
468 //selected |
|
469 if(iSelection != i) |
|
470 { |
|
471 //cancel the selection if pen down and up in different place |
|
472 DrawIndication(iSelection,EFalse); |
|
473 iSelection = -1; |
|
474 iPointerLeftCandidate = EFalse; |
|
475 iPointerLeft = EFalse; |
|
476 bContinue = EFalse; |
|
477 |
|
478 } |
|
479 else |
|
480 { |
|
481 if(iCandidateList.Count()>0) |
|
482 { |
|
483 HBufC* data=iCandidateList[i]; |
|
484 if(data->Length() > 0) |
|
485 { |
|
486 //report to observer |
|
487 ReportEvent(EEventCandidateSelected,*data); |
|
488 } |
|
489 } |
|
490 DrawIndication(iSelection,EFalse); |
|
491 |
|
492 bContinue = EFalse; |
|
493 } |
|
494 } |
|
495 } |
|
496 //reset the timer |
|
497 if(iHideTimer) |
|
498 iHideTimer->SetTimer(iDelay); |
|
499 |
|
500 return this; |
|
501 } |
|
502 |
|
503 // --------------------------------------------------------------------------- |
|
504 // CCandidateWnd::SetCandidateL |
|
505 // Set candidate data |
|
506 // (other items were commented in a header). |
|
507 // --------------------------------------------------------------------------- |
|
508 // |
|
509 EXPORT_C void CCandidateWnd::SetCandidateL(const RPointerArray<HBufC>& aCandidateData) |
|
510 { |
|
511 iCandidateList.ResetAndDestroy(); |
|
512 |
|
513 if(aCandidateData.Count()) |
|
514 { |
|
515 for(TInt i = 0; i < aCandidateData.Count(); i++) |
|
516 { |
|
517 HBufC* data = aCandidateData[i]->AllocL(); |
|
518 CleanupStack::PushL(data); |
|
519 iCandidateList.AppendL(data); |
|
520 CleanupStack::Pop(data); |
|
521 } |
|
522 Hide(EFalse); |
|
523 Draw(); |
|
524 //report event, so as hwr window may redraw the stroke in case of that |
|
525 // hwr window is overlapped with candidate window |
|
526 RootControl()->HandleControlEvent(EEventRegionUpdated,this,KNullDesC); |
|
527 |
|
528 iSelection = 0; |
|
529 } |
|
530 else |
|
531 iSelection = -1; |
|
532 |
|
533 UpdateArea(Rect(),EFalse); |
|
534 |
|
535 if(iAutoHide && iCandidateList.Count()>0) |
|
536 iHideTimer->SetTimer(iDelay); |
|
537 } |
|
538 |
|
539 |
|
540 // --------------------------------------------------------------------------- |
|
541 // CCandidateWnd::HandleTimerOut |
|
542 // handle hide timer event |
|
543 // (other items were commented in a header). |
|
544 // --------------------------------------------------------------------------- |
|
545 // |
|
546 EXPORT_C void CCandidateWnd::HandleTimerOut(TInt /*aTimeType*/) |
|
547 { |
|
548 Hide(ETrue); |
|
549 } |
|
550 |
|
551 |
|
552 // --------------------------------------------------------------------------- |
|
553 // CCandidateWnd::ConstructL |
|
554 // Second phrase constructor |
|
555 // (other items were commented in a header). |
|
556 // --------------------------------------------------------------------------- |
|
557 // |
|
558 EXPORT_C void CCandidateWnd::ConstructL() |
|
559 { |
|
560 BaseConstructL(); |
|
561 if(BitmapDevice() && iFontSpec.iHeight) |
|
562 { |
|
563 if (KErrNone != BitmapDevice()->GetNearestFontInPixels(iFont,iFontSpec)) |
|
564 iFont = NULL; |
|
565 } |
|
566 |
|
567 SetCandidateNumL(iCandidateRectNum); |
|
568 if(iAutoHide) |
|
569 { |
|
570 iHideTimer = CLayoutTimer::NewL(this,CLayoutTimer::ECandidateClearTimer); |
|
571 } |
|
572 } |
|
573 |
|
574 // --------------------------------------------------------------------------- |
|
575 // CCandidateWnd::HandlePointerLeave |
|
576 // Handle pointer leave event |
|
577 // --------------------------------------------------------------------------- |
|
578 // |
|
579 EXPORT_C void CCandidateWnd::HandlePointerLeave(const TPoint& aPt) |
|
580 { |
|
581 DrawIndication(iSelection,EFalse); |
|
582 iPointerLeftCandidate = ETrue; //pointer left the cell. |
|
583 CFepUiBaseCtrl::HandlePointerLeave(aPt); |
|
584 } |
|
585 |
|
586 // --------------------------------------------------------------------------- |
|
587 // CCandidateWnd::OnLayoutDraggingStart |
|
588 // Response to layout dragging start event |
|
589 // (other items were commented in a header). |
|
590 // --------------------------------------------------------------------------- |
|
591 // |
|
592 EXPORT_C void CCandidateWnd::OnLayoutDraggingStart() |
|
593 { |
|
594 if(iHideTimer) |
|
595 iHideTimer->Cancel(); |
|
596 } |
|
597 |
|
598 // --------------------------------------------------------------------------- |
|
599 // CCandidateWnd::OnLayoutDraggingEnd |
|
600 // Response to layout dragging end event |
|
601 // (other items were commented in a header). |
|
602 // --------------------------------------------------------------------------- |
|
603 // |
|
604 EXPORT_C void CCandidateWnd::OnLayoutDraggingEnd() |
|
605 { |
|
606 } |
|
607 |
|
608 // --------------------------------------------------------------------------- |
|
609 // CFepUiBaseCtrl::OnDeActivate |
|
610 // Response to layout de activation event |
|
611 // (other items were commented in a header). |
|
612 // --------------------------------------------------------------------------- |
|
613 // |
|
614 EXPORT_C void CCandidateWnd::OnDeActivate() |
|
615 { |
|
616 CFepUiBaseCtrl::OnDeActivate(); |
|
617 if(iAutoHide) |
|
618 iHideTimer->Cancel(); |
|
619 } |
|
620 |
|
621 // --------------------------------------------------------------------------- |
|
622 // CFepUiBaseCtrl::OnActivate |
|
623 // Response to layout activation event |
|
624 // (other items were commented in a header). |
|
625 // --------------------------------------------------------------------------- |
|
626 // |
|
627 EXPORT_C void CCandidateWnd::OnActivate() |
|
628 { |
|
629 //do nothing |
|
630 CFepUiBaseCtrl::OnActivate(); |
|
631 if(iAutoHide) |
|
632 iHideTimer->SetTimer(iDelay); |
|
633 } |
|
634 |
|
635 //end of file |
|
636 |