equal
deleted
inserted
replaced
236 :CFepLayoutPopupWnd(TSize(0,0), aUiLayout, aControlId) |
236 :CFepLayoutPopupWnd(TSize(0,0), aUiLayout, aControlId) |
237 { |
237 { |
238 SetControlType(ECtrlPopupChoiceList); |
238 SetControlType(ECtrlPopupChoiceList); |
239 iSubItemSkinID = KAknsIIDNone; |
239 iSubItemSkinID = KAknsIIDNone; |
240 iBackgroundSkinID = KAknsIIDNone; |
240 iBackgroundSkinID = KAknsIIDNone; |
|
241 iAlign = CGraphicsContext::ELeft; |
241 } |
242 } |
242 |
243 |
243 // CFepLayoutChoiceList::HitTest |
244 // CFepLayoutChoiceList::HitTest |
244 // Get item whose region contains the point. |
245 // Get item whose region contains the point. |
245 // (other items were commented in a header). |
246 // (other items were commented in a header). |
292 event.iCommand = 0; |
293 event.iCommand = 0; |
293 ReportChoiceEvent(event); |
294 ReportChoiceEvent(event); |
294 #ifdef RD_TACTILE_FEEDBACK |
295 #ifdef RD_TACTILE_FEEDBACK |
295 if (UiLayout()->SupportTactileFeedback()) |
296 if (UiLayout()->SupportTactileFeedback()) |
296 { |
297 { |
297 UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad, ETrue, EFalse); |
298 UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveInput, ETrue, EFalse); |
298 } |
299 } |
299 #endif //RD_TACTILE_FEEDBACK |
300 #endif //RD_TACTILE_FEEDBACK |
300 } |
301 } |
301 else |
302 else |
302 { |
303 { |
305 { |
306 { |
306 //TInt prev = iCurFocusItem; |
307 //TInt prev = iCurFocusItem; |
307 iCurFocusItem = index; |
308 iCurFocusItem = index; |
308 Draw(); |
309 Draw(); |
309 UpdateArea(Rect(),EFalse); |
310 UpdateArea(Rect(),EFalse); |
310 #ifdef RD_TACTILE_FEEDBACK |
|
311 if (UiLayout()->SupportTactileFeedback()) |
|
312 { |
|
313 UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad); |
|
314 } |
|
315 #endif //RD_TACTILE_FEEDBACK |
|
316 } |
311 } |
317 } |
312 } |
318 return this; |
313 return this; |
319 } |
314 } |
320 |
315 |
351 #ifdef RD_TACTILE_FEEDBACK |
346 #ifdef RD_TACTILE_FEEDBACK |
352 if (UiLayout()->SupportTactileFeedback()) |
347 if (UiLayout()->SupportTactileFeedback()) |
353 { |
348 { |
354 if ( iLastSelIndex != iCurFocusItem) |
349 if ( iLastSelIndex != iCurFocusItem) |
355 { |
350 { |
356 UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad); |
351 UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveInput); |
357 iLastSelIndex = iCurFocusItem; |
352 iLastSelIndex = iCurFocusItem; |
358 } |
353 } |
359 } |
354 } |
360 #endif //RD_TACTILE_FEEDBACK |
355 #endif //RD_TACTILE_FEEDBACK |
361 |
356 |
389 ReportChoiceEvent(event); |
384 ReportChoiceEvent(event); |
390 |
385 |
391 #ifdef RD_TACTILE_FEEDBACK |
386 #ifdef RD_TACTILE_FEEDBACK |
392 if (UiLayout()->SupportTactileFeedback()) |
387 if (UiLayout()->SupportTactileFeedback()) |
393 { |
388 { |
394 UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad, ETrue, EFalse); |
389 UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveInput, ETrue, EFalse); |
395 } |
390 } |
396 #endif //RD_TACTILE_FEEDBACK |
391 #endif //RD_TACTILE_FEEDBACK |
397 } |
392 } |
398 else if( index == EListOutside ) |
393 else if( index == EListOutside ) |
399 { |
394 { |
449 |
444 |
450 if( iSubItemSkinID.iMajor != EAknsMajorNone && |
445 if( iSubItemSkinID.iMajor != EAknsMajorNone && |
451 iSubItemSkinID.iMinor != EAknsMinorNone) |
446 iSubItemSkinID.iMinor != EAknsMinorNone) |
452 { |
447 { |
453 gc->Activate( BitmapDevice() ); |
448 gc->Activate( BitmapDevice() ); |
454 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
449 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
455 *gc, |
450 *gc, |
456 rtFocusRect, |
451 rtFocusRect, |
457 rtInnerRect, |
452 rtInnerRect, |
458 iSubItemSkinID, |
453 iSubItemSkinID, |
459 KAknsIIDDefault ); |
454 KAknsIIDDefault ); |
485 |
480 |
486 gc->SetBrushStyle( CGraphicsContext::ENullBrush ); |
481 gc->SetBrushStyle( CGraphicsContext::ENullBrush ); |
487 gc->SetPenColor(iFontColor); |
482 gc->SetPenColor(iFontColor); |
488 gc->SetPenStyle(CGraphicsContext::ESolidPen); |
483 gc->SetPenStyle(CGraphicsContext::ESolidPen); |
489 |
484 |
490 gc->DrawText(aItem.iText, aRect, iBaseline, CGraphicsContext::ELeft, iMargin); |
485 gc->DrawText(aItem.iText, aRect, iBaseline, iAlign, iMargin); |
491 |
486 |
492 gc->DiscardFont(); |
487 gc->DiscardFont(); |
493 } |
488 } |
494 } |
489 } |
495 |
490 |
508 TRect rtInnerRect( aRect ); |
503 TRect rtInnerRect( aRect ); |
509 rtInnerRect.Shrink( 1, 1 ); |
504 rtInnerRect.Shrink( 1, 1 ); |
510 CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc()); |
505 CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc()); |
511 |
506 |
512 gc->Activate( BitmapDevice() ); |
507 gc->Activate( BitmapDevice() ); |
513 AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), |
508 AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), |
514 *gc, |
509 *gc, |
515 aRect, |
510 aRect, |
516 rtInnerRect, |
511 rtInnerRect, |
517 iBackgroundSkinID, |
512 iBackgroundSkinID, |
518 KAknsIIDDefault ); |
513 KAknsIIDDefault ); |
583 // (other items were commented in a header). |
578 // (other items were commented in a header). |
584 // --------------------------------------------------------------------------- |
579 // --------------------------------------------------------------------------- |
585 // |
580 // |
586 EXPORT_C void CFepLayoutChoiceList::OnDisplay() |
581 EXPORT_C void CFepLayoutChoiceList::OnDisplay() |
587 { |
582 { |
|
583 iCurFocusItem = -1; |
588 ReCalcLayout(); |
584 ReCalcLayout(); |
589 } |
585 } |
590 |
586 |
591 // CFepLayoutChoiceList::ReCalcLayout |
587 // CFepLayoutChoiceList::ReCalcLayout |
592 // Calculates the displaying rect. |
588 // Calculates the displaying rect. |
655 |
651 |
656 EXPORT_C void CFepLayoutChoiceList::AfterDisplayed() |
652 EXPORT_C void CFepLayoutChoiceList::AfterDisplayed() |
657 { |
653 { |
658 TRAP_IGNORE(AfterDisplayedL()); |
654 TRAP_IGNORE(AfterDisplayedL()); |
659 } |
655 } |
|
656 |
|
657 EXPORT_C void CFepLayoutChoiceList::SetTextAlignment(const CGraphicsContext::TTextAlign aAlign) |
|
658 { |
|
659 iAlign = aAlign; |
|
660 } |
660 //End Of File |
661 //End Of File |