198 iTextEditor->ConstructL(this, 0, 0, CEikEdwin::EReadOnly | CEikEdwin::EAvkonDisableCursor | |
195 iTextEditor->ConstructL(this, 0, 0, CEikEdwin::EReadOnly | CEikEdwin::EAvkonDisableCursor | |
199 CEikEdwin::ENoAutoSelection|CEikEdwin::EAvkonEditor); |
196 CEikEdwin::ENoAutoSelection|CEikEdwin::EAvkonEditor); |
200 iTextEditor->SetMopParent(this); |
197 iTextEditor->SetMopParent(this); |
201 iTextEditor->SetRect( Rect() ); |
198 iTextEditor->SetRect( Rect() ); |
202 |
199 |
203 iLabel = new (ELeave) CEikLabel; |
|
204 iLabel->SetContainerWindowL(*this); |
|
205 iLabel->SetTextL(_L("")); |
|
206 iLabel->SetRect(Rect()); |
|
207 |
200 |
208 iDocHandler->SetExitObserver( this ); |
201 iDocHandler->SetExitObserver( this ); |
209 iTextEditor->EnableKineticScrollingL(ETrue); |
202 iTextEditor->EnableKineticScrollingL(ETrue); |
210 TRACE_EXIT_POINT; |
203 TRACE_EXIT_POINT; |
211 } |
204 } |
1005 |
993 |
1006 TAknLayoutRect listscroll_cale_day_pane; |
994 TAknLayoutRect listscroll_cale_day_pane; |
1007 listscroll_cale_day_pane.LayoutRect( main_cale_day_pane.Rect(), |
995 listscroll_cale_day_pane.LayoutRect( main_cale_day_pane.Rect(), |
1008 AknLayoutScalable_Apps::listscroll_cale_day_pane( 0 ).LayoutLine() ); |
996 AknLayoutScalable_Apps::listscroll_cale_day_pane( 0 ).LayoutLine() ); |
1009 |
997 |
1010 iLabel->SetRect(GetLabelRectL()); |
|
1011 |
998 |
1012 // Listbox layout |
999 // Listbox layout |
1013 TAknLayoutRect list_cale_pane; |
1000 TAknLayoutRect list_cale_pane; |
1014 list_cale_pane.LayoutRect( main_cale_day_pane.Rect(), AknLayoutScalable_Apps::list_cale_pane( 3 ).LayoutLine() ); |
1001 list_cale_pane.LayoutRect( main_cale_day_pane.Rect(), AknLayoutScalable_Apps::list_cale_pane( 3 ).LayoutLine() ); |
1015 |
1002 |
2456 TRACE_EXIT_POINT; |
2443 TRACE_EXIT_POINT; |
2457 return (!retVal); |
2444 return (!retVal); |
2458 } |
2445 } |
2459 |
2446 |
2460 // ---------------------------------------------------------------------------- |
2447 // ---------------------------------------------------------------------------- |
2461 // CCalenEventViewContainer::LabelRectL |
|
2462 // Returns the available label rect for this container |
|
2463 // ---------------------------------------------------------------------------- |
|
2464 TRect CCalenEventViewContainer::GetLabelRectL() |
|
2465 { |
|
2466 TRACE_ENTRY_POINT; |
|
2467 |
|
2468 // Get the main pane |
|
2469 TAknLayoutRect main_cale_day_pane; |
|
2470 main_cale_day_pane.LayoutRect( Rect(), |
|
2471 AknLayoutScalable_Apps::main_cale_day_pane().LayoutLine() ); |
|
2472 |
|
2473 TAknLayoutRect listscroll_cale_day_pane; |
|
2474 listscroll_cale_day_pane.LayoutRect( main_cale_day_pane.Rect(), |
|
2475 AknLayoutScalable_Apps::listscroll_cale_day_pane(1).LayoutLine() ); |
|
2476 |
|
2477 // Create a dummy label to find the layout rect |
|
2478 CEikLabel* dummyLabel = new( ELeave ) CEikLabel; |
|
2479 CleanupStack::PushL( dummyLabel ); |
|
2480 |
|
2481 |
|
2482 AknLayoutUtils::LayoutLabel( dummyLabel, listscroll_cale_day_pane.Rect(), |
|
2483 AknLayoutScalable_Apps::listscroll_cale_day_pane_t1( 0 ).LayoutLine() ); |
|
2484 |
|
2485 TRect labelRect = dummyLabel->Rect(); |
|
2486 |
|
2487 // Discard the label |
|
2488 CleanupStack::PopAndDestroy( dummyLabel ); |
|
2489 |
|
2490 TRACE_EXIT_POINT; |
|
2491 return labelRect; |
|
2492 } |
|
2493 // ---------------------------------------------------------------------------- |
|
2494 // CCalenEventViewContainer::SetLabelContentL |
|
2495 // ---------------------------------------------------------------------------- |
|
2496 // |
|
2497 void CCalenEventViewContainer::SetLabelContentL( CEikLabel& aLabel ) |
|
2498 { |
|
2499 TRACE_ENTRY_POINT; |
|
2500 const CFont* labelFont = NULL; |
|
2501 labelFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont,NULL); |
|
2502 aLabel.SetFont( labelFont ); |
|
2503 aLabel.SetLabelAlignment(ELayoutAlignLeft); |
|
2504 aLabel.OverrideColorL( EColorLabelTextEmphasis, KRgbBlack ); |
|
2505 |
|
2506 // get the multiple db data from services |
|
2507 RPointerArray<CCalCalendarInfo> calendarInfoList; |
|
2508 iServices.GetAllCalendarInfoL(calendarInfoList); |
|
2509 CleanupClosePushL(calendarInfoList); |
|
2510 |
|
2511 TCalCollectionId colId; |
|
2512 colId = iServices.Context().InstanceId().iColId; |
|
2513 |
|
2514 HBufC* calendarFileName = iServices.GetCalFileNameForCollectionId(colId).AllocLC(); |
|
2515 TInt calIndex = calendarInfoList.Find( *calendarFileName, |
|
2516 CCalenEventViewContainer::CalendarInfoIdentifierL); |
|
2517 CleanupStack::PopAndDestroy(calendarFileName); |
|
2518 |
|
2519 if(calIndex != KErrNotFound) |
|
2520 { |
|
2521 // add the calendar info's text field |
|
2522 aLabel.SetTextL(calendarInfoList[calIndex]->NameL()); |
|
2523 |
|
2524 TInt calendarColor = calendarInfoList[calIndex]->Color().Value(); |
|
2525 aLabel.OverrideColorL( EColorLabelHighlightFullEmphasis, calendarColor ); |
|
2526 |
|
2527 // Increment the iNumOfLinesBeforeLocField so that map icon is drwan at proper place |
|
2528 iNumOfLinesBeforeLocField = 1; |
|
2529 } |
|
2530 CleanupStack::PopAndDestroy(&calendarInfoList); |
|
2531 |
|
2532 aLabel.CropText(); |
|
2533 aLabel.SetEmphasis( CEikLabel::EFullEmphasis ); |
|
2534 TRACE_EXIT_POINT; |
|
2535 } |
|
2536 |
|
2537 // ---------------------------------------------------------------------------- |
2448 // ---------------------------------------------------------------------------- |
2538 // CCalenEventViewContainer::AddAttachmentFieldL |
2449 // CCalenEventViewContainer::AddAttachmentFieldL |
2539 // Adds attachment field |
2450 // Adds attachment field |
2540 // ---------------------------------------------------------------------------- |
2451 // ---------------------------------------------------------------------------- |
2541 // |
2452 // |