uifw/AvKon/src/eikfrlbd.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 23 3d340a0166ff
equal deleted inserted replaced
16:71dd06cfe933 18:0aa5fbdfbc30
  1306     return err == KErrNone ? count : err;
  1306     return err == KErrNone ? count : err;
  1307     }
  1307     }
  1308 
  1308 
  1309 EXPORT_C CCoeControl *CFormattedCellListBoxData::Control() const 
  1309 EXPORT_C CCoeControl *CFormattedCellListBoxData::Control() const 
  1310     {
  1310     {
       
  1311     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1311     return iExtension->iControl;
  1312     return iExtension->iControl;
  1312     }
  1313     }
  1313 
  1314 
  1314 EXPORT_C void CFormattedCellListBoxData::SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition)
  1315 EXPORT_C void CFormattedCellListBoxData::SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition)
  1315     {
  1316     {
  1316     if (iExtension)
  1317     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1317         iExtension->iSeparatorLinePosition = aPosition;
  1318     iExtension->iSeparatorLinePosition = aPosition;
  1318     }
  1319     }
  1319 EXPORT_C TAknSeparatorLinePosition CFormattedCellListBoxData::SeparatorLinePosition() const
  1320 EXPORT_C TAknSeparatorLinePosition CFormattedCellListBoxData::SeparatorLinePosition() const
  1320     {
  1321     {
  1321     if (iExtension)
  1322     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1322         return iExtension->iSeparatorLinePosition;
  1323     return iExtension->iSeparatorLinePosition;
  1323     else
       
  1324         return ENoLine;
       
  1325     }
  1324     }
  1326 EXPORT_C CAknLayoutData *CFormattedCellListBoxData::LayoutData() const
  1325 EXPORT_C CAknLayoutData *CFormattedCellListBoxData::LayoutData() const
  1327     {
  1326     {
  1328         return NULL;
  1327         return NULL;
  1329     }
  1328     }
  1339 CFormattedCellListBoxDataExtension *CFormattedCellListBoxData::Extension() { return iExtension; }
  1338 CFormattedCellListBoxDataExtension *CFormattedCellListBoxData::Extension() { return iExtension; }
  1340 CFormattedCellListBoxDataExtension *CFormattedCellListBoxData::Extension() const { return iExtension; }
  1339 CFormattedCellListBoxDataExtension *CFormattedCellListBoxData::Extension() const { return iExtension; }
  1341 
  1340 
  1342 EXPORT_C void CFormattedCellListBoxData::SetControl(CCoeControl *aControl)
  1341 EXPORT_C void CFormattedCellListBoxData::SetControl(CCoeControl *aControl)
  1343     {
  1342     {
       
  1343     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1344     iExtension->SetControl( aControl );
  1344     iExtension->SetControl( aControl );
  1345     }
  1345     }
  1346 
  1346 
  1347 EXPORT_C MAknsControlContext* CFormattedCellListBoxData::SkinBackgroundContext() const
  1347 EXPORT_C MAknsControlContext* CFormattedCellListBoxData::SkinBackgroundContext() const
  1348     {
  1348     {
       
  1349     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1349     if (iExtension->iSkinEnabled)
  1350     if (iExtension->iSkinEnabled)
  1350         {
  1351         {
  1351         if (iExtension->iPopupFrame)
  1352         if (iExtension->iPopupFrame)
  1352             {
  1353             {
  1353             return iExtension->iPopupFrame;
  1354             return iExtension->iPopupFrame;
  1364     }
  1365     }
  1365 
  1366 
  1366 
  1367 
  1367 EXPORT_C void CFormattedCellListBoxData::SetSkinEnabledL(TBool aEnabled)
  1368 EXPORT_C void CFormattedCellListBoxData::SetSkinEnabledL(TBool aEnabled)
  1368     {
  1369     {
       
  1370     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1369     CListBoxData::SetSkinEnabledL(aEnabled);
  1371     CListBoxData::SetSkinEnabledL(aEnabled);
  1370     iExtension->iSkinEnabled = aEnabled;
  1372     iExtension->iSkinEnabled = aEnabled;
  1371     }
  1373     }
  1372 
  1374 
  1373 EXPORT_C TBool CFormattedCellListBoxData::SkinEnabled() const
  1375 EXPORT_C TBool CFormattedCellListBoxData::SkinEnabled() const
  1374     {
  1376     {
       
  1377     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1375     return iExtension->iSkinEnabled;
  1378     return iExtension->iSkinEnabled;
  1376     }
  1379     }
  1377 
  1380 
  1378 EXPORT_C void CFormattedCellListBoxData::SetSkinStyle(const TAknsItemID *id, const TRect &aTileRect)
  1381 EXPORT_C void CFormattedCellListBoxData::SetSkinStyle(const TAknsItemID *id, const TRect &aTileRect)
  1379     {
  1382     {
  1380 
  1383     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1381     if (iExtension->iSkinControlContext)
  1384     if (iExtension->iSkinControlContext)
  1382         {
  1385         {
  1383         iExtension->iSkinControlContext->SetTiledBitmap(*id);
  1386         iExtension->iSkinControlContext->SetTiledBitmap(*id);
  1384         iExtension->iSkinControlContext->SetTiledRect(aTileRect);
  1387         iExtension->iSkinControlContext->SetTiledRect(aTileRect);
  1385         }
  1388         }
  1386     }
  1389     }
  1387 EXPORT_C void CFormattedCellListBoxData::SetSkinParentPos(const TPoint &aPos)
  1390 EXPORT_C void CFormattedCellListBoxData::SetSkinParentPos(const TPoint &aPos)
  1388     {
  1391     {
       
  1392     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1389     if (iExtension->iSkinControlContext)
  1393     if (iExtension->iSkinControlContext)
  1390         {
  1394         {
  1391         iExtension->iSkinControlContext->SetParentPos(aPos);
  1395         iExtension->iSkinControlContext->SetParentPos(aPos);
  1392         }
  1396         }
  1393     }
  1397     }
  1394 EXPORT_C void CFormattedCellListBoxData::SetBackgroundSkinStyle(const TAknsItemID *aId, const TRect &aRect)
  1398 EXPORT_C void CFormattedCellListBoxData::SetBackgroundSkinStyle(const TAknsItemID *aId, const TRect &aRect)
  1395     {
  1399     {
       
  1400     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1396     if (iExtension->iSkinControlContext)
  1401     if (iExtension->iSkinControlContext)
  1397         {
  1402         {
  1398         iExtension->iSkinControlContext->SetBitmap(*aId);
  1403         iExtension->iSkinControlContext->SetBitmap(*aId);
  1399         iExtension->iSkinControlContext->SetRect(aRect);
  1404         iExtension->iSkinControlContext->SetRect(aRect);
  1400         }
  1405         }
  1401     }
  1406     }
  1402 EXPORT_C void CFormattedCellListBoxData::SetListEndSkinStyle(const TAknsItemID *aListEndId, const TRect &aRect)
  1407 EXPORT_C void CFormattedCellListBoxData::SetListEndSkinStyle(const TAknsItemID *aListEndId, const TRect &aRect)
  1403     {
  1408     {
       
  1409     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1404     if (iExtension->iSkinControlContext)
  1410     if (iExtension->iSkinControlContext)
  1405         {
  1411         {
  1406         iExtension->iSkinControlContext->SetBottomBitmap(*aListEndId);
  1412         iExtension->iSkinControlContext->SetBottomBitmap(*aListEndId);
  1407         iExtension->iSkinControlContext->SetBottomRect(aRect);
  1413         iExtension->iSkinControlContext->SetBottomRect(aRect);
  1408         }
  1414         }
  1409     }
  1415     }
  1410 
  1416 
  1411 EXPORT_C void CFormattedCellListBoxData::SetSkinHighlightFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  1417 EXPORT_C void CFormattedCellListBoxData::SetSkinHighlightFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  1412     {
  1418     {
       
  1419     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1413     iExtension->iSkinHighlightFrameId = aFrameId;
  1420     iExtension->iSkinHighlightFrameId = aFrameId;
  1414     iExtension->iSkinHighlightFrameCenterId = aFrameCenterId;
  1421     iExtension->iSkinHighlightFrameCenterId = aFrameCenterId;
  1415     }
  1422     }
  1416     
  1423     
  1417 EXPORT_C void CFormattedCellListBoxData::SetSkinPopupFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  1424 EXPORT_C void CFormattedCellListBoxData::SetSkinPopupFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  1418     {
  1425     {
  1419     if (iExtension && iExtension->iPopupFrame)
  1426     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  1427     if ( iExtension->iPopupFrame)
  1420         {
  1428         {
  1421         iExtension->iPopupFrame->SetFrame(*aFrameId);
  1429         iExtension->iPopupFrame->SetFrame(*aFrameId);
  1422         iExtension->iPopupFrame->SetCenter(*aFrameCenterId);
  1430         iExtension->iPopupFrame->SetCenter(*aFrameCenterId);
  1423         }
  1431         }
  1424     else
  1432     else
  1436         }
  1444         }
  1437     }
  1445     }
  1438     
  1446     
  1439 EXPORT_C void CFormattedCellListBoxData::SetSkinPopupFramePosition(const TRect &aOuterRect, const TRect &aInnerRect)
  1447 EXPORT_C void CFormattedCellListBoxData::SetSkinPopupFramePosition(const TRect &aOuterRect, const TRect &aInnerRect)
  1440     {
  1448     {
  1441     if (iExtension && iExtension->iPopupFrame)
  1449     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  1450     if ( iExtension->iPopupFrame)
  1442         iExtension->iPopupFrame->SetFrameRects(aOuterRect, aInnerRect);
  1451         iExtension->iPopupFrame->SetFrameRects(aOuterRect, aInnerRect);
  1443     }
  1452     }
  1444 
  1453 
  1445 EXPORT_C void CFormattedCellListBoxData::UseLogicalToVisualConversion(
  1454 EXPORT_C void CFormattedCellListBoxData::UseLogicalToVisualConversion(
  1446     TBool aUseConversion )
  1455     TBool aUseConversion )
  1447     {
  1456     {
  1448     if (iExtension)
  1457     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1449     iExtension->iUseLogicalToVisualConversion = aUseConversion;
  1458     iExtension->iUseLogicalToVisualConversion = aUseConversion;
  1450     }
  1459     }
  1451 
  1460 
  1452 void CFormattedCellListBoxData::CreatePictographInterfaceL()
  1461 void CFormattedCellListBoxData::CreatePictographInterfaceL()
  1453     {
  1462     {
       
  1463     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1454     iExtension->CreatePictographInterfaceL();
  1464     iExtension->CreatePictographInterfaceL();
  1455     }
  1465     }
  1456 
  1466 
  1457 void CFormattedCellListBoxData::CreateMarqueeControlL()
  1467 void CFormattedCellListBoxData::CreateMarqueeControlL()
  1458     {
  1468     {
       
  1469     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1459     TCallBack callBack(CFormattedCellListBoxDataExtension::RedrawEvent, iExtension->iControl);
  1470     TCallBack callBack(CFormattedCellListBoxDataExtension::RedrawEvent, iExtension->iControl);
  1460     //iExtension->iMarquee = CAknMarqueeControl::NewL();
  1471     //iExtension->iMarquee = CAknMarqueeControl::NewL();
  1461     iExtension->CreateMarqueeControlL();
  1472     iExtension->CreateMarqueeControlL();
  1462     iExtension->iMarquee->SetRedrawCallBack(callBack);
  1473     iExtension->iMarquee->SetRedrawCallBack(callBack);
  1463     iExtension->i2ndLineMarquee->SetRedrawCallBack(callBack);
  1474     iExtension->i2ndLineMarquee->SetRedrawCallBack(callBack);
  1711     }
  1722     }
  1712 
  1723 
  1713 EXPORT_C void 
  1724 EXPORT_C void 
  1714 CFormattedCellListBoxData::SetSubCellAlignmentL(TInt aSubCellIndex, CGraphicsContext::TTextAlign aAlign)
  1725 CFormattedCellListBoxData::SetSubCellAlignmentL(TInt aSubCellIndex, CGraphicsContext::TTextAlign aAlign)
  1715     {
  1726     {
       
  1727     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1716     TInt index = 0;
  1728     TInt index = 0;
  1717     FindSubCellIndexOrAddL(index,aSubCellIndex);
  1729     FindSubCellIndexOrAddL(index,aSubCellIndex);
  1718     At(index).iAlign=aAlign;
  1730     At(index).iAlign=aAlign;
  1719 
  1731 
  1720     iExtension->SetSubCellLayoutAlignmentL( aSubCellIndex );
  1732     iExtension->SetSubCellLayoutAlignmentL( aSubCellIndex );
  1858     }
  1870     }
  1859 
  1871 
  1860 
  1872 
  1861 EXPORT_C TBool CFormattedCellListBoxData::RespectFocus() const
  1873 EXPORT_C TBool CFormattedCellListBoxData::RespectFocus() const
  1862     {
  1874     {
  1863     if (iExtension)
  1875     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1864         return iExtension->iRespectFocus;
  1876     return iExtension->iRespectFocus;
  1865     return EFalse;
       
  1866     }
  1877     }
  1867 
  1878 
  1868 EXPORT_C void CFormattedCellListBoxData::SetRespectFocus(TBool aBool)
  1879 EXPORT_C void CFormattedCellListBoxData::SetRespectFocus(TBool aBool)
  1869     {
  1880     {
  1870     if (iExtension)
  1881     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  1871         iExtension->iRespectFocus = aBool;
  1882     iExtension->iRespectFocus = aBool;
  1872     }
  1883     }
  1873 
  1884 
  1874 EXPORT_C CFont* 
  1885 EXPORT_C CFont* 
  1875 CFormattedCellListBoxData::Font(const TListItemProperties& /*aItemProperties*/,
  1886 CFormattedCellListBoxData::Font(const TListItemProperties& /*aItemProperties*/,
  1876                    TInt aSubCellIndex) const
  1887                    TInt aSubCellIndex) const
  2260     _AKNTRACE_FUNC_ENTER;
  2271     _AKNTRACE_FUNC_ENTER;
  2261     _AKNTRACE("DrawFormatted: aItemRect=(%d,%d,%d,%d)",
  2272     _AKNTRACE("DrawFormatted: aItemRect=(%d,%d,%d,%d)",
  2262             aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, 
  2273             aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, 
  2263             aItemRect.iBr.iY);
  2274             aItemRect.iBr.iY);
  2264     
  2275     
       
  2276     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  2265     CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  2277     CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  2266     if (!view->ViewRect().Intersects(aItemRect))
  2278     if (!view->ViewRect().Intersects(aItemRect))
  2267         {
  2279         {
  2268         // outside of the clipping rect -> don't process this item
  2280         // outside of the clipping rect -> don't process this item
  2269         return;
  2281         return;
  2328                                           const CGulIcon* aIcon,
  2340                                           const CGulIcon* aIcon,
  2329                                           TInt            aSubcell,
  2341                                           TInt            aSubcell,
  2330                                           TBool           aColorIcon,
  2342                                           TBool           aColorIcon,
  2331                                           const TRect&    aGraphicRect ) const
  2343                                           const TRect&    aGraphicRect ) const
  2332     {
  2344     {
       
  2345     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  2346     
  2333     // se also eikclbd.cpp ( sigh ).
  2347     // se also eikclbd.cpp ( sigh ).
  2334     CFbsBitmap* bitmap( aIcon->Bitmap() );
  2348     CFbsBitmap* bitmap( aIcon->Bitmap() );
  2335     CFbsBitmap* mask( aIcon->Mask() );
  2349     CFbsBitmap* mask( aIcon->Mask() );
  2336 
  2350 
  2337     // possibly colorskinnable icon. Check must be after SetSize()
  2351     // possibly colorskinnable icon. Check must be after SetSize()
  2391     _AKNTRACE_FUNC_ENTER;
  2405     _AKNTRACE_FUNC_ENTER;
  2392     _AKNTRACE("DrawFormattedSimple: aItemRect=(%d,%d,%d,%d)",
  2406     _AKNTRACE("DrawFormattedSimple: aItemRect=(%d,%d,%d,%d)",
  2393             aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, 
  2407             aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, 
  2394             aItemRect.iBr.iY);
  2408             aItemRect.iBr.iY);
  2395     
  2409     
       
  2410     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  2411     
  2396     TRect textRect(aItemRect);
  2412     TRect textRect(aItemRect);
  2397     const TColors *subcellColors = &aColors;
  2413     const TColors *subcellColors = &aColors;
  2398 
  2414 
  2399     TInt lastSubCell = Min( LastSubCell(), KMaxSubCellIndex );
  2415     TInt lastSubCell = Min( LastSubCell(), KMaxSubCellIndex );
  2400 
  2416 
  2437             {
  2453             {
  2438             // empty subcell, continue to draw next subcell
  2454             // empty subcell, continue to draw next subcell
  2439             ++ subcell;
  2455             ++ subcell;
  2440             continue;
  2456             continue;
  2441             }
  2457             }
  2442         if (!iExtension) break;
  2458 
  2443         if (iExtension->FindSLSubCellIndex(SCindex,subcell)!=0) break;
  2459         if (iExtension->FindSLSubCellIndex(SCindex,subcell)!=0) break;
  2444 
  2460 
  2445         if (UseSubCellColors(subcell))
  2461         if (UseSubCellColors(subcell))
  2446             {
  2462             {
  2447             subcellColors = &SubCellColors(subcell);
  2463             subcellColors = &SubCellColors(subcell);
  2928     _AKNTRACE_FUNC_EXIT;
  2944     _AKNTRACE_FUNC_EXIT;
  2929     }
  2945     }
  2930 
  2946 
  2931 void CFormattedCellListBoxData::DrawDefaultHighlight(CWindowGc &aGc, const TRect &aItemRect, TBool aHighlight) const
  2947 void CFormattedCellListBoxData::DrawDefaultHighlight(CWindowGc &aGc, const TRect &aItemRect, TBool aHighlight) const
  2932     {
  2948     {
  2933     _AKNTRACE_FUNC_ENTER;
  2949     _AKNTRACE_FUNC_ENTER;    
       
  2950     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  2951     
  2934     // When this flag set, draw pressed down state and don't use animation.
  2952     // When this flag set, draw pressed down state and don't use animation.
  2935     // There are several derived CListboxData in this file. All of them do  
  2953     // There are several derived CListboxData in this file. All of them do  
  2936     // this same thing.
  2954     // this same thing.
  2937     CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  2955     CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  2938     TBool pressedDown = view->ItemDrawer()->Flags() & CListItemDrawer::EPressedDownState;
  2956     TBool pressedDown = view->ItemDrawer()->Flags() & CListItemDrawer::EPressedDownState;
  3038     }
  3056     }
  3039 
  3057 
  3040 void CFormattedCellListBoxData::DrawPopupFrame(CWindowGc &aGc) const
  3058 void CFormattedCellListBoxData::DrawPopupFrame(CWindowGc &aGc) const
  3041     {
  3059     {
  3042     _AKNTRACE_FUNC_ENTER;
  3060     _AKNTRACE_FUNC_ENTER;
       
  3061     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3043     CCoeControl* control = Control();
  3062     CCoeControl* control = Control();
  3044 
  3063 
  3045     if ( control )
  3064     if ( control )
  3046         {
  3065         {
  3047         aGc.SetPenStyle( CGraphicsContext::ENullPen );
  3066         aGc.SetPenStyle( CGraphicsContext::ENullPen );
  3062 
  3081 
  3063 void CFormattedCellListBoxData::SetWordWrappedSubcellIndices(
  3082 void CFormattedCellListBoxData::SetWordWrappedSubcellIndices(
  3064     TInt aFirstIndex,
  3083     TInt aFirstIndex,
  3065     TInt aSecondIndex )
  3084     TInt aSecondIndex )
  3066     {
  3085     {
  3067     if ( iExtension ) 
  3086     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3068         {
  3087     iExtension->iFirstWordWrappedSubcellIndex = (TInt16)aFirstIndex;
  3069         iExtension->iFirstWordWrappedSubcellIndex = (TInt16)aFirstIndex;
  3088     iExtension->iSecondWordWrappedSubcellIndex = (TInt16)aSecondIndex;
  3070         iExtension->iSecondWordWrappedSubcellIndex = (TInt16)aSecondIndex;
       
  3071         }
       
  3072     }
  3089     }
  3073 
  3090 
  3074 EXPORT_C void CFormattedCellListBoxData::EnableMarqueeL(TBool aEnable)
  3091 EXPORT_C void CFormattedCellListBoxData::EnableMarqueeL(TBool aEnable)
  3075     {
  3092     {
       
  3093     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3076     // CreateMarqueeControlL does nothing if marquee already exists,
  3094     // CreateMarqueeControlL does nothing if marquee already exists,
  3077     // so let's just call it just in case.
  3095     // so let's just call it just in case.
  3078     CreateMarqueeControlL();
  3096     CreateMarqueeControlL();
  3079     iExtension->iMarquee->EnableMarquee(aEnable);
  3097     iExtension->iMarquee->EnableMarquee(aEnable);
  3080     iExtension->i2ndLineMarquee->EnableMarquee(aEnable);
  3098     iExtension->i2ndLineMarquee->EnableMarquee(aEnable);
  3082 
  3100 
  3083 // Two versions to eliminate compiler warnings.
  3101 // Two versions to eliminate compiler warnings.
  3084 #ifdef __WINS__
  3102 #ifdef __WINS__
  3085 EXPORT_C const TBool CFormattedCellListBoxData::IsMarqueeOn()
  3103 EXPORT_C const TBool CFormattedCellListBoxData::IsMarqueeOn()
  3086     {
  3104     {
       
  3105     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3087     return iExtension->IsMarqueeOn();
  3106     return iExtension->IsMarqueeOn();
  3088     }
  3107     }
  3089 #else
  3108 #else
  3090 EXPORT_C TBool CFormattedCellListBoxData::IsMarqueeOn()
  3109 EXPORT_C TBool CFormattedCellListBoxData::IsMarqueeOn()
  3091     {
  3110     {
       
  3111     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3092     return iExtension->IsMarqueeOn();
  3112     return iExtension->IsMarqueeOn();
  3093     }
  3113     }
  3094 #endif // __WINS__
  3114 #endif // __WINS__
  3095 
  3115 
  3096 
  3116 
  3097 void CFormattedCellListBoxData::FocusGained()
  3117 void CFormattedCellListBoxData::FocusGained()
  3098     {
  3118     {
       
  3119     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3099     iExtension->FocusGained();
  3120     iExtension->FocusGained();
  3100     }
  3121     }
  3101 
  3122 
  3102 void CFormattedCellListBoxData::FocusLost()
  3123 void CFormattedCellListBoxData::FocusLost()
  3103     {
  3124     {
       
  3125     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3104     iExtension->FocusLost();
  3126     iExtension->FocusLost();
  3105     }
  3127     }
  3106 
  3128 
  3107 void CFormattedCellListBoxData::HandleResourceChange( TInt aType )
  3129 void CFormattedCellListBoxData::HandleResourceChange( TInt aType )
  3108     {
  3130     {
  3109     _AKNTRACE_FUNC_ENTER;
  3131     _AKNTRACE_FUNC_ENTER;
       
  3132     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3110     // Animation is skin dependent, whenever skin changes animation changes
  3133     // Animation is skin dependent, whenever skin changes animation changes
  3111     // too.
  3134     // too.
  3112     if( KAknsMessageSkinChange == aType )
  3135     if( KAknsMessageSkinChange == aType )
  3113         {
  3136         {
  3114         iExtension->SkinChanged();
  3137         iExtension->SkinChanged();
  3138 // CFormattedCellListBoxData::HighlightAnim
  3161 // CFormattedCellListBoxData::HighlightAnim
  3139 // -----------------------------------------------------------------------------
  3162 // -----------------------------------------------------------------------------
  3140 //
  3163 //
  3141 EXPORT_C const CAknsEffectAnim* CFormattedCellListBoxData::HighlightAnim() const
  3164 EXPORT_C const CAknsEffectAnim* CFormattedCellListBoxData::HighlightAnim() const
  3142     {
  3165     {
  3143     if( iExtension )
  3166     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3144         return iExtension->iAnimation;
  3167     return iExtension->iAnimation;
  3145     return NULL;
       
  3146     }
  3168     }
  3147 
  3169 
  3148 // -----------------------------------------------------------------------------
  3170 // -----------------------------------------------------------------------------
  3149 // CFormattedCellListBoxData::AboutToDrawHighlightAnim
  3171 // CFormattedCellListBoxData::AboutToDrawHighlightAnim
  3150 // -----------------------------------------------------------------------------
  3172 // -----------------------------------------------------------------------------
  3151 //
  3173 //
  3152 EXPORT_C void CFormattedCellListBoxData::AboutToDrawHighlightAnim() const
  3174 EXPORT_C void CFormattedCellListBoxData::AboutToDrawHighlightAnim() const
  3153     {
  3175     {
  3154     if( !iExtension )
  3176     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3155         {
       
  3156         return;
       
  3157         }
       
  3158     if( !iExtension->iAnimation || !iExtension->iControl )
  3177     if( !iExtension->iAnimation || !iExtension->iControl )
  3159         {
  3178         {
  3160         return;
  3179         return;
  3161         }
  3180         }
  3162 
  3181 
  3181 // -----------------------------------------------------------------------------
  3200 // -----------------------------------------------------------------------------
  3182 //
  3201 //
  3183 EXPORT_C void CFormattedCellListBoxData::SetHighlightAnimBackgroundDrawer(
  3202 EXPORT_C void CFormattedCellListBoxData::SetHighlightAnimBackgroundDrawer(
  3184     MListBoxAnimBackgroundDrawer* aDrawer )
  3203     MListBoxAnimBackgroundDrawer* aDrawer )
  3185     {
  3204     {
  3186     if( iExtension )
  3205     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3187         {
  3206     iExtension->iHighlightBgDrawer = aDrawer;
  3188         iExtension->iHighlightBgDrawer = aDrawer;
       
  3189         }
       
  3190     }
  3207     }
  3191 
  3208 
  3192 // -----------------------------------------------------------------------------
  3209 // -----------------------------------------------------------------------------
  3193 // CFormattedCellListBoxData::SetItemCellSize
  3210 // CFormattedCellListBoxData::SetItemCellSize
  3194 // -----------------------------------------------------------------------------
  3211 // -----------------------------------------------------------------------------
  3195 //
  3212 //
  3196 EXPORT_C void CFormattedCellListBoxData::SetItemCellSize( const TSize& aSize )
  3213 EXPORT_C void CFormattedCellListBoxData::SetItemCellSize( const TSize& aSize )
  3197     {
  3214     {
  3198     if( iExtension )
  3215     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3199         {
  3216     if( iExtension->iAnimSize != aSize )
  3200         if( iExtension->iAnimSize != aSize )
  3217         {
  3201             {
  3218         iExtension->Play();
  3202             iExtension->Play();
  3219         }
  3203             }
  3220     iExtension->iAnimSize = aSize;
  3204         iExtension->iAnimSize = aSize;
       
  3205         }
       
  3206     }
  3221     }
  3207 
  3222 
  3208 // -----------------------------------------------------------------------------
  3223 // -----------------------------------------------------------------------------
  3209 // CFormattedCellListBoxData::HasHighlightAnim
  3224 // CFormattedCellListBoxData::HasHighlightAnim
  3210 // -----------------------------------------------------------------------------
  3225 // -----------------------------------------------------------------------------
  3211 //
  3226 //
  3212 EXPORT_C TBool CFormattedCellListBoxData::HasHighlightAnim() const
  3227 EXPORT_C TBool CFormattedCellListBoxData::HasHighlightAnim() const
  3213     {
  3228     {
  3214     if( !iExtension )
  3229     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3215         return EFalse;
  3230     return ( iExtension->iAnimation != NULL );
  3216     if( !iExtension->iAnimation )
       
  3217         return EFalse;
       
  3218     return ETrue;
       
  3219     }
  3231     }
  3220 
  3232 
  3221 // -----------------------------------------------------------------------------
  3233 // -----------------------------------------------------------------------------
  3222 // CFormattedCellListBoxData::DrawHighlightAnim
  3234 // CFormattedCellListBoxData::DrawHighlightAnim
  3223 // -----------------------------------------------------------------------------
  3235 // -----------------------------------------------------------------------------
  3224 //
  3236 //
  3225 EXPORT_C TBool CFormattedCellListBoxData::DrawHighlightAnim(
  3237 EXPORT_C TBool CFormattedCellListBoxData::DrawHighlightAnim(
  3226         CBitmapContext& aGc, const TRect& aRect ) const
  3238         CBitmapContext& aGc, const TRect& aRect ) const
  3227     {
  3239     {
  3228     if( !iExtension )
  3240     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3229         return EFalse;
       
  3230 
       
  3231     if( !iExtension->iAnimation )
  3241     if( !iExtension->iAnimation )
  3232         return EFalse;
  3242         return EFalse;
  3233 
  3243 
  3234     return iExtension->SyncAndDrawAnim( aGc, aRect );
  3244     return iExtension->SyncAndDrawAnim( aGc, aRect );
  3235     }
  3245     }
  3236 
  3246 
  3237 void CFormattedCellListBoxData::ResetMarquee()
  3247 void CFormattedCellListBoxData::ResetMarquee()
  3238     {
  3248     {
       
  3249     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3239     if (iExtension->iMarquee)
  3250     if (iExtension->iMarquee)
  3240         {
  3251         {
  3241         iExtension->iMarquee->Reset();
  3252         iExtension->iMarquee->Reset();
  3242         }
  3253         }
  3243     if (iExtension->i2ndLineMarquee)
  3254     if (iExtension->i2ndLineMarquee)
  3246         }
  3257         }
  3247     }
  3258     }
  3248 
  3259 
  3249 TInt CFormattedCellListBoxData::CurrentMarqueeItemIndex()
  3260 TInt CFormattedCellListBoxData::CurrentMarqueeItemIndex()
  3250     {
  3261     {
       
  3262     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3251     return iExtension->iCurrentItem;
  3263     return iExtension->iCurrentItem;
  3252     }
  3264     }
  3253 
  3265 
  3254 void CFormattedCellListBoxData::SetCurrentMarqueeItemIndex(TInt aIndex)
  3266 void CFormattedCellListBoxData::SetCurrentMarqueeItemIndex(TInt aIndex)
  3255     {
  3267     {
  3256     _AKNTRACE("CFormattedCellListBoxData::SetCurrentMarqueeItemIndex aIndex=%d",
  3268     _AKNTRACE("CFormattedCellListBoxData::SetCurrentMarqueeItemIndex aIndex=%d",
  3257             aIndex);
  3269             aIndex);
       
  3270     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3258     
  3271     
  3259     iExtension->iCurrentItem = aIndex;
  3272     iExtension->iCurrentItem = aIndex;
  3260     }
  3273     }
  3261 
  3274 
  3262 void CFormattedCellListBoxData::SetCurrentItemIndex(TInt aIndex)
  3275 void CFormattedCellListBoxData::SetCurrentItemIndex(TInt aIndex)
  3263     {
  3276     {
  3264     _AKNTRACE("CFormattedCellListBoxData::SetCurrentItemIndex aIndex=%d", aIndex);
  3277     _AKNTRACE("CFormattedCellListBoxData::SetCurrentItemIndex aIndex=%d", aIndex);
       
  3278     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3265     if( iExtension->iCurrentRow != aIndex )
  3279     if( iExtension->iCurrentRow != aIndex )
  3266         {
  3280         {
  3267         iExtension->iAnimFlags.Set( CFormattedCellListBoxDataExtension::EFlagUpdateBg );
  3281         iExtension->iAnimFlags.Set( CFormattedCellListBoxDataExtension::EFlagUpdateBg );
  3268         }
  3282         }
  3269     iExtension->iCurrentRow = aIndex;
  3283     iExtension->iCurrentRow = aIndex;
  3271 
  3285 
  3272 void CFormattedCellListBoxData::SetCurrentlyDrawnItemIndex( TInt aIndex )
  3286 void CFormattedCellListBoxData::SetCurrentlyDrawnItemIndex( TInt aIndex )
  3273     {
  3287     {
  3274     _AKNTRACE("CFormattedCellListBoxData::SetCurrentlyDrawnItemIndex aIndex=%d", 
  3288     _AKNTRACE("CFormattedCellListBoxData::SetCurrentlyDrawnItemIndex aIndex=%d", 
  3275             aIndex);
  3289             aIndex);
  3276     if ( iExtension )
  3290     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3277         {
  3291     iExtension->iCurrentlyDrawnItemIndex = aIndex;
  3278         iExtension->iCurrentlyDrawnItemIndex = aIndex;
       
  3279         }
       
  3280     }
  3292     }
  3281 
  3293 
  3282 EXPORT_C const CFont* 
  3294 EXPORT_C const CFont* 
  3283 CFormattedCellListBoxData::RowAndSubCellFont(TInt aRow,TInt aSubCellIndex) const
  3295 CFormattedCellListBoxData::RowAndSubCellFont(TInt aRow,TInt aSubCellIndex) const
  3284     {
  3296     {
  3285     if (!iExtension) return 0;
  3297     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3286     TInt index = 0;
  3298     TInt index = 0;
  3287     if (iExtension->FindRowAndSubCellIndex(index,aRow,aSubCellIndex)!=0)
  3299     if (iExtension->FindRowAndSubCellIndex(index,aRow,aSubCellIndex)!=0)
  3288         return 0;
  3300         return 0;
  3289     return(iExtension->At(index).iFont);
  3301     return(iExtension->At(index).iFont);
  3290     }
  3302     }
  3291 
  3303 
  3292 EXPORT_C void CFormattedCellListBoxData::SetSubCellFontForRowL(TInt aRowIndex,
  3304 EXPORT_C void CFormattedCellListBoxData::SetSubCellFontForRowL(TInt aRowIndex,
  3293                                                                TInt aSubCellIndex,
  3305                                                                TInt aSubCellIndex,
  3294                                                                const CFont* aFont)
  3306                                                                const CFont* aFont)
  3295     {
  3307     {
  3296     if (!iExtension) return;
  3308     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3297     TInt index = 0;
  3309     TInt index = 0;
  3298     iExtension->FindRowAndSubCellIndexOrAddL(index,aRowIndex,aSubCellIndex);
  3310     iExtension->FindRowAndSubCellIndexOrAddL(index,aRowIndex,aSubCellIndex);
  3299     iExtension->At(index).iFont=aFont;
  3311     iExtension->At(index).iFont=aFont;
  3300     }
  3312     }
  3301 
  3313 
  3303 * Enables / disables transparency effect, ie. does the listbox draw it's own background or not.
  3315 * Enables / disables transparency effect, ie. does the listbox draw it's own background or not.
  3304 * @param aDrawBackground  EFalse enables transparency
  3316 * @param aDrawBackground  EFalse enables transparency
  3305 */ 
  3317 */ 
  3306 EXPORT_C void CFormattedCellListBoxData::SetDrawBackground(const TBool aDrawBackground)
  3318 EXPORT_C void CFormattedCellListBoxData::SetDrawBackground(const TBool aDrawBackground)
  3307     {
  3319     {
       
  3320     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3308     iExtension->iDrawBackground = aDrawBackground;
  3321     iExtension->iDrawBackground = aDrawBackground;
  3309     if( !aDrawBackground )
  3322     if( !aDrawBackground )
  3310         {
  3323         {
  3311         iExtension->DeleteAnim();
  3324         iExtension->DeleteAnim();
  3312         }
  3325         }
  3315 /**
  3328 /**
  3316 * Is the listbox drawing the background itself or not (= "transparency")
  3329 * Is the listbox drawing the background itself or not (= "transparency")
  3317 */ 
  3330 */ 
  3318 TBool CFormattedCellListBoxData::IsBackgroundDrawingEnabled() const
  3331 TBool CFormattedCellListBoxData::IsBackgroundDrawingEnabled() const
  3319     {
  3332     {
       
  3333     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3320     return iExtension->iDrawBackground;
  3334     return iExtension->iDrawBackground;
  3321     }
  3335     }
  3322 
  3336 
  3323 
  3337 
  3324 /**
  3338 /**
  3325 * Enables / disables drawing background after scrollbar
  3339 * Enables / disables drawing background after scrollbar
  3326 * @param aDrawBackground  default ETrue
  3340 * @param aDrawBackground  default ETrue
  3327 */ 
  3341 */ 
  3328 void CFormattedCellListBoxData::SetDrawScrollbarBackground(const TBool aDrawBackground)
  3342 void CFormattedCellListBoxData::SetDrawScrollbarBackground(const TBool aDrawBackground)
  3329     {
  3343     {
       
  3344     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3330     iExtension->iDrawScrollbarBackground = aDrawBackground;
  3345     iExtension->iDrawScrollbarBackground = aDrawBackground;
  3331     }
  3346     }
  3332 
  3347 
  3333 /**
  3348 /**
  3334 * Is the listbox drawing the background after scrollbar or not
  3349 * Is the listbox drawing the background after scrollbar or not
  3335 */ 
  3350 */ 
  3336 TBool CFormattedCellListBoxData::IsScrollbarBackgroundDrawingEnabled() const
  3351 TBool CFormattedCellListBoxData::IsScrollbarBackgroundDrawingEnabled() const
  3337     {
  3352     {
       
  3353     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3338     return iExtension->iDrawScrollbarBackground;
  3354     return iExtension->iDrawScrollbarBackground;
  3339     }
  3355     }
  3340 
  3356 
  3341 
  3357 
  3342 EXPORT_C void CFormattedCellListBoxData::SetMarqueeParams(const TInt aLoops, const TInt aScrollAmount, 
  3358 EXPORT_C void CFormattedCellListBoxData::SetMarqueeParams(const TInt aLoops, const TInt aScrollAmount, 
  3343                                                           const TInt aScrollDelay, const TInt aInterval)
  3359                                                           const TInt aScrollDelay, const TInt aInterval)
  3344     {
  3360     {
       
  3361     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3345     if ( iExtension->iMarquee )
  3362     if ( iExtension->iMarquee )
  3346         {
  3363         {
  3347         iExtension->iMarquee->SetLoops( aLoops );
  3364         iExtension->iMarquee->SetLoops( aLoops );
  3348         iExtension->iMarquee->SetSpeedInPixels( aScrollAmount );
  3365         iExtension->iMarquee->SetSpeedInPixels( aScrollAmount );
  3349         iExtension->iMarquee->SetDelay( aScrollDelay );
  3366         iExtension->iMarquee->SetDelay( aScrollDelay );
  3359     }
  3376     }
  3360 
  3377 
  3361 
  3378 
  3362 EXPORT_C void CFormattedCellListBoxData::SetSubCellIconSize(TInt aIndex, TSize aSize)
  3379 EXPORT_C void CFormattedCellListBoxData::SetSubCellIconSize(TInt aIndex, TSize aSize)
  3363     {
  3380     {
  3364     if (iExtension && aIndex <= KMaxSubCellIndex && aIndex >= 0)
  3381     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  3382     if ( aIndex <= KMaxSubCellIndex && aIndex >= 0)
  3365         {
  3383         {
  3366         iExtension->iSubCellIconSize[aIndex] = aSize;
  3384         iExtension->iSubCellIconSize[aIndex] = aSize;
  3367         }
  3385         }
  3368     }
  3386     }
  3369 
  3387 
  3370 TSize CFormattedCellListBoxData::GetSubCellIconSize(TInt aIndex)
  3388 TSize CFormattedCellListBoxData::GetSubCellIconSize(TInt aIndex)
  3371     {
  3389     {
  3372     if (iExtension && aIndex <= KMaxSubCellIndex && aIndex >= 0)
  3390     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  3391     if ( aIndex <= KMaxSubCellIndex && aIndex >= 0)
  3373         {
  3392         {
  3374         return iExtension->iSubCellIconSize[aIndex];
  3393         return iExtension->iSubCellIconSize[aIndex];
  3375         }
  3394         }
  3376     return TSize(0,0);
  3395     return TSize(0,0);
  3377     }
  3396     }
  3436     }
  3455     }
  3437 
  3456 
  3438 // extended skin support
  3457 // extended skin support
  3439 void CFormattedCellListBoxData::SetESSTextColor( TAknsQsnTextColorsIndex aIndex )
  3458 void CFormattedCellListBoxData::SetESSTextColor( TAknsQsnTextColorsIndex aIndex )
  3440     {
  3459     {
       
  3460     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  3461     
  3441     TRgb color;
  3462     TRgb color;
  3442     
  3463     
  3443     TInt error = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
  3464     TInt error = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
  3444                                             color,
  3465                                             color,
  3445                                             KAknsIIDQsnTextColors,
  3466                                             KAknsIIDQsnTextColors,
  3452 
  3473 
  3453 
  3474 
  3454 // extended skin support
  3475 // extended skin support
  3455 void CFormattedCellListBoxData::SetESSHighlightedTextColor( TAknsQsnTextColorsIndex aIndex )
  3476 void CFormattedCellListBoxData::SetESSHighlightedTextColor( TAknsQsnTextColorsIndex aIndex )
  3456     {
  3477     {
       
  3478     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3457     TRgb color;
  3479     TRgb color;
  3458     
  3480     
  3459     TInt error = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
  3481     TInt error = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
  3460                                             color,
  3482                                             color,
  3461                                             KAknsIIDQsnTextColors,
  3483                                             KAknsIIDQsnTextColors,
  3468 
  3490 
  3469 
  3491 
  3470 void CFormattedCellListBoxData::SetGraphicSubCellL( TInt aSubCell,
  3492 void CFormattedCellListBoxData::SetGraphicSubCellL( TInt aSubCell,
  3471                                                     const TAknWindowLineLayout &aGraphicLayout )
  3493                                                     const TAknWindowLineLayout &aGraphicLayout )
  3472     {
  3494     {
  3473     if ( !iExtension ) return;
  3495     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3474     CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
  3496     CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
  3475     // this does happen with caknsetstyle, caknform(wide)style lists.
  3497     // this does happen with caknsetstyle, caknform(wide)style lists.
  3476     // eventually they'll get here again with list!=0, so this check is enough
  3498     // eventually they'll get here again with list!=0, so this check is enough
  3477     if ( !list ) return;  
  3499     if ( !list ) return;  
  3478     
  3500     
  3517     }
  3539     }
  3518 
  3540 
  3519 void CFormattedCellListBoxData::SetTextSubCellL( TInt aSubCell,
  3541 void CFormattedCellListBoxData::SetTextSubCellL( TInt aSubCell,
  3520                                                  const TAknTextLineLayout &aTextLayout )
  3542                                                  const TAknTextLineLayout &aTextLayout )
  3521     {
  3543     {
  3522     if (!iExtension) return;
  3544     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3523     CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
  3545     CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
  3524     // this does happen with caknsetstyle, caknform(wide)style lists.
  3546     // this does happen with caknsetstyle, caknform(wide)style lists.
  3525     // eventually they'll get here again with list!=0, so this check is enough
  3547     // eventually they'll get here again with list!=0, so this check is enough
  3526     if ( !list ) return;  
  3548     if ( !list ) return;  
  3527 
  3549 
  3570 
  3592 
  3571 void CFormattedCellListBoxData::SetConditionalSubCellL(TInt aSubCell,
  3593 void CFormattedCellListBoxData::SetConditionalSubCellL(TInt aSubCell,
  3572                                                        const TAknTextLineLayout &aTextLayout,
  3594                                                        const TAknTextLineLayout &aTextLayout,
  3573                                                        TInt aAffectedSubCell)  
  3595                                                        TInt aAffectedSubCell)  
  3574     {
  3596     {
       
  3597     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3575     // iConditionValue of affected subcell (=text subcell, which has different layouts)
  3598     // iConditionValue of affected subcell (=text subcell, which has different layouts)
  3576     // contains index of graphical subcell, which existence should be checked first.
  3599     // contains index of graphical subcell, which existence should be checked first.
  3577     // This graphical subcell has in iConditionValue index of graphical subcell,
  3600     // This graphical subcell has in iConditionValue index of graphical subcell,
  3578     // which existence should be checked second etc. Each graphical subcell can
  3601     // which existence should be checked second etc. Each graphical subcell can
  3579     // affect only to 1 text subcell (or none).
  3602     // affect only to 1 text subcell (or none).
  3580 
  3603 
  3581     // for compabitility - needed at least for text wrapping
  3604     // for compabitility - needed at least for text wrapping
  3582     SetNotAlwaysDrawnSubCellL( aSubCell, ETrue );
  3605     SetNotAlwaysDrawnSubCellL( aSubCell, ETrue );
  3583 
  3606 
  3584     if (!iExtension) return;
       
  3585 
       
  3586     TInt i = 0x01;
  3607     TInt i = 0x01;
  3587     i = i << aSubCell;
  3608     i = i << aSubCell;
  3588     iExtension->iConditionalCells = iExtension->iConditionalCells | i;
  3609     iExtension->iConditionalCells = iExtension->iConditionalCells | i;
  3589 
  3610 
  3590     TInt graphicalIndex = 0;
  3611     TInt graphicalIndex = 0;
  3637 // CFormattedCellListBoxData::UsesScalableLayoutData
  3658 // CFormattedCellListBoxData::UsesScalableLayoutData
  3638 // -----------------------------------------------------------------------------
  3659 // -----------------------------------------------------------------------------
  3639 //
  3660 //
  3640 TBool CFormattedCellListBoxData::UsesScalableLayoutData() const
  3661 TBool CFormattedCellListBoxData::UsesScalableLayoutData() const
  3641     {
  3662     {
  3642     if (iExtension)
  3663     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3643         return iExtension->iSimpleList;
  3664     return iExtension->iSimpleList;
  3644 
       
  3645     return EFalse;
       
  3646     }
  3665     }
  3647 void CFormattedCellListBoxData::UseScalableLayoutData( TBool aUse )
  3666 void CFormattedCellListBoxData::UseScalableLayoutData( TBool aUse )
  3648     {
  3667     {
  3649     if ( iExtension )
  3668     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3650         {
  3669     if ( !aUse && iExtension->iSimpleList )
  3651         if ( !aUse && iExtension->iSimpleList )
  3670         {
  3652             {
       
  3653 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  3671 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  3654             CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
  3672         CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
  3655             MAknListBoxTfxInternal* transApi =
  3673         MAknListBoxTfxInternal* transApi =
  3656                 CAknListLoader::TfxApiInternal( list->View()->ItemDrawer()->Gc() );
  3674             CAknListLoader::TfxApiInternal( list->View()->ItemDrawer()->Gc() );
  3657             if ( transApi )
  3675         if ( transApi )
  3658                 {
  3676             {
  3659                 transApi->SetPosition( MAknListBoxTfxInternal::EListTLMargin, TPoint( 0, 0 ) );
  3677             transApi->SetPosition( MAknListBoxTfxInternal::EListTLMargin, TPoint( 0, 0 ) );
  3660                 transApi->SetPosition( MAknListBoxTfxInternal::EListBRMargin, TPoint( 0, 0 ) );
  3678             transApi->SetPosition( MAknListBoxTfxInternal::EListBRMargin, TPoint( 0, 0 ) );
  3661                 }
  3679             }
  3662 #endif
  3680 #endif
  3663             }
  3681         }
  3664         iExtension->iSimpleList = aUse;
  3682     iExtension->iSimpleList = aUse;
  3665         }
       
  3666     }
  3683     }
  3667 
  3684 
  3668 EXPORT_C void CFormattedCellListBoxData::SetSubcellUnderlined( TBitFlags32 aUnderlinedCells )
  3685 EXPORT_C void CFormattedCellListBoxData::SetSubcellUnderlined( TBitFlags32 aUnderlinedCells )
  3669     {
  3686     {
  3670     if ( iExtension )
  3687     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3671         {
  3688     iExtension->iUnderlineFlagSet = ETrue;
  3672         iExtension->iUnderlineFlagSet = ETrue;
  3689     iExtension->iUnderlineFlags   = aUnderlinedCells;
  3673         iExtension->iUnderlineFlags   = aUnderlinedCells;
       
  3674         }
       
  3675     }
  3690     }
  3676 
  3691 
  3677 void CFormattedCellListBoxData::SetUnderlineStyle( TListItemProperties aProperties,
  3692 void CFormattedCellListBoxData::SetUnderlineStyle( TListItemProperties aProperties,
  3678                                                    CWindowGc& aGc,
  3693                                                    CWindowGc& aGc,
  3679                                                    TInt aSubCell ) const
  3694                                                    TInt aSubCell ) const
  3680     {
  3695     {
  3681     if ( !iExtension )
  3696     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3682         {
       
  3683         return;
       
  3684         }
       
  3685 
       
  3686     if ( !iExtension->iUnderlineFlagSet )
  3697     if ( !iExtension->iUnderlineFlagSet )
  3687         {
  3698         {
  3688         // underlining is already either on or off and
  3699         // underlining is already either on or off and
  3689         // hardcoded off turning will ensure old style
  3700         // hardcoded off turning will ensure old style
  3690         // behaviour
  3701         // behaviour
  3703         }
  3714         }
  3704     }
  3715     }
  3705 
  3716 
  3706 void CFormattedCellListBoxData::UseHighlightIconSwapping( TBool aUse )
  3717 void CFormattedCellListBoxData::UseHighlightIconSwapping( TBool aUse )
  3707     {
  3718     {
  3708     if ( iExtension )
  3719     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3709         {
  3720     iExtension->iUseHighligthIconSwapping = aUse;
  3710         iExtension->iUseHighligthIconSwapping = aUse;
       
  3711         }
       
  3712     }
  3721     }
  3713 
  3722 
  3714 TBool CFormattedCellListBoxData::UseHighlightIconSwapping() const
  3723 TBool CFormattedCellListBoxData::UseHighlightIconSwapping() const
  3715     {
  3724     {
  3716     if ( iExtension )
  3725     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3717         {
  3726     return iExtension->iUseHighligthIconSwapping;
  3718         return iExtension->iUseHighligthIconSwapping;
       
  3719         }
       
  3720     return EFalse;
       
  3721     }
  3727     }
  3722 
  3728 
  3723 // -----------------------------------------------------------------------------
  3729 // -----------------------------------------------------------------------------
  3724 // CFormattedCellListBoxData::SetStretchableGraphicSubCellL
  3730 // CFormattedCellListBoxData::SetStretchableGraphicSubCellL
  3725 // -----------------------------------------------------------------------------
  3731 // -----------------------------------------------------------------------------
  3793 // CFormattedCellListBoxData::ResetSLSubCellArray
  3799 // CFormattedCellListBoxData::ResetSLSubCellArray
  3794 // -----------------------------------------------------------------------------
  3800 // -----------------------------------------------------------------------------
  3795 //
  3801 //
  3796 void CFormattedCellListBoxData::ResetSLSubCellArray()
  3802 void CFormattedCellListBoxData::ResetSLSubCellArray()
  3797     {
  3803     {
  3798     if ( !iExtension )
  3804     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3799         {
       
  3800         return;
       
  3801         }
       
  3802 
       
  3803     iExtension->iMarginRect = TRect::EUninitialized;
  3805     iExtension->iMarginRect = TRect::EUninitialized;
  3804 
  3806 
  3805     UseScalableLayoutData( EFalse );
  3807     UseScalableLayoutData( EFalse );
  3806     iExtension->ResetSLSubCellArray();        
  3808     iExtension->ResetSLSubCellArray();        
  3807     // This function gets called always when size changes, so here is called
  3809     // This function gets called always when size changes, so here is called
  3815 // -----------------------------------------------------------------------------
  3817 // -----------------------------------------------------------------------------
  3816 //
  3818 //
  3817 TBool CFormattedCellListBoxData::StretchingEnabled() const
  3819 TBool CFormattedCellListBoxData::StretchingEnabled() const
  3818     {
  3820     {
  3819 #ifdef RD_LIST_STRETCH    
  3821 #ifdef RD_LIST_STRETCH    
  3820     if ( !iExtension )
  3822     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
  3821         {
       
  3822         return EFalse;
       
  3823         }
       
  3824         
       
  3825     return iExtension->iStretchingEnabled;
  3823     return iExtension->iStretchingEnabled;
  3826 #else
  3824 #else
  3827     return EFalse;
  3825     return EFalse;
  3828 #endif // #ifdef RD_LIST_STRETCH        
  3826 #endif // #ifdef RD_LIST_STRETCH        
  3829     }
  3827     }
  3833 // CFormattedCellListBoxData::EnableStretching
  3831 // CFormattedCellListBoxData::EnableStretching
  3834 // -----------------------------------------------------------------------------
  3832 // -----------------------------------------------------------------------------
  3835 //
  3833 //
  3836 void CFormattedCellListBoxData::EnableStretching( const TBool aEnabled )
  3834 void CFormattedCellListBoxData::EnableStretching( const TBool aEnabled )
  3837     {
  3835     {
  3838     if ( !iExtension )
  3836     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
  3839         {
       
  3840         return;
       
  3841         }
       
  3842         
       
  3843     iExtension->iStretchingEnabled = aEnabled;        
  3837     iExtension->iStretchingEnabled = aEnabled;        
  3844     }
  3838     }
  3845 
  3839 
  3846 // -----------------------------------------------------------------------------
  3840 // -----------------------------------------------------------------------------
  3847 // CFormattedCellListBoxData::HideSecondRow
  3841 // CFormattedCellListBoxData::HideSecondRow
  3848 // -----------------------------------------------------------------------------
  3842 // -----------------------------------------------------------------------------
  3849 //
  3843 //
  3850 void CFormattedCellListBoxData::HideSecondRow( const TBool aHide )
  3844 void CFormattedCellListBoxData::HideSecondRow( const TBool aHide )
  3851     {
  3845     {
  3852     if ( !iExtension )
  3846     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
  3853         {
       
  3854         return;
       
  3855         }
       
  3856         
       
  3857     iExtension->iHideSecondRow = aHide;        
  3847     iExtension->iHideSecondRow = aHide;        
  3858     }
  3848     }
  3859 #endif // RD_LIST_STRETCH
  3849 #endif // RD_LIST_STRETCH
  3860 
  3850 
  3861 // -----------------------------------------------------------------------------
  3851 // -----------------------------------------------------------------------------
  3862 // CFormattedCellListBoxData::SecondRowHidden
  3852 // CFormattedCellListBoxData::SecondRowHidden
  3863 // -----------------------------------------------------------------------------
  3853 // -----------------------------------------------------------------------------
  3864 //
  3854 //
  3865 TBool CFormattedCellListBoxData::SecondRowHidden() const
  3855 TBool CFormattedCellListBoxData::SecondRowHidden() const
  3866     {
  3856     {
  3867     if ( !iExtension )
  3857     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
  3868         {
       
  3869         return EFalse;
       
  3870         }
       
  3871         
       
  3872     return iExtension->iHideSecondRow;        
  3858     return iExtension->iHideSecondRow;        
  3873     }
  3859     }
  3874 
  3860 
  3875 // -----------------------------------------------------------------------------
  3861 // -----------------------------------------------------------------------------
  3876 // CFormattedCellListBoxData::ToggleDropShadows
  3862 // CFormattedCellListBoxData::ToggleDropShadows
  3877 // -----------------------------------------------------------------------------
  3863 // -----------------------------------------------------------------------------
  3878 //
  3864 //
  3879 void CFormattedCellListBoxData::ToggleDropShadows( const TBool aEnable )
  3865 void CFormattedCellListBoxData::ToggleDropShadows( const TBool aEnable )
  3880     {
  3866     {
  3881     if ( !iExtension )
  3867     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3882         {
       
  3883         return;
       
  3884         }
       
  3885     iExtension->iUseDropShadows = aEnable;
  3868     iExtension->iUseDropShadows = aEnable;
  3886     }
  3869     }
  3887 
  3870 
  3888 // -----------------------------------------------------------------------------
  3871 // -----------------------------------------------------------------------------
  3889 // CFormattedCellListBoxData::CheckIfSubCellsIntersect
  3872 // CFormattedCellListBoxData::CheckIfSubCellsIntersect
  3893     TAknTextLineLayout* aLayouts, 
  3876     TAknTextLineLayout* aLayouts, 
  3894     TBool* aResults, 
  3877     TBool* aResults, 
  3895     const TDesC& aText, 
  3878     const TDesC& aText, 
  3896     const TRect& aItemRect ) const
  3879     const TRect& aItemRect ) const
  3897     {
  3880     {
       
  3881     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  3898     TInt subCell = 0;
  3882     TInt subCell = 0;
  3899     TInt subCell2;
  3883     TInt subCell2;
  3900     TInt subCellIndex;
  3884     TInt subCellIndex;
  3901     TInt subCellIndex2;
  3885     TInt subCellIndex2;
  3902     TInt lastSubCell = Min( KMaxSubCellIndex, LastSubCell() );
  3886     TInt lastSubCell = Min( KMaxSubCellIndex, LastSubCell() );
  4005 // CFormattedCellListBoxData::SubCellsMightIntersect
  3989 // CFormattedCellListBoxData::SubCellsMightIntersect
  4006 // -----------------------------------------------------------------------------
  3990 // -----------------------------------------------------------------------------
  4007 //
  3991 //
  4008 void CFormattedCellListBoxData::SubCellsMightIntersect( const TBool aMightIntersect )
  3992 void CFormattedCellListBoxData::SubCellsMightIntersect( const TBool aMightIntersect )
  4009     {
  3993     {
       
  3994     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  4010     iExtension->iSubCellsMightIntersect = aMightIntersect;
  3995     iExtension->iSubCellsMightIntersect = aMightIntersect;
  4011     }
  3996     }
  4012 
  3997 
  4013 
  3998 
  4014 void CFormattedCellListBoxDataExtension::CreateColorBitmapsL( )
  3999 void CFormattedCellListBoxDataExtension::CreateColorBitmapsL( )
  4119                                              const TRect& aItemRect,
  4104                                              const TRect& aItemRect,
  4120                                              TBool aHighlight,
  4105                                              TBool aHighlight,
  4121                                              const TColors& aColors ) const
  4106                                              const TColors& aColors ) const
  4122     {
  4107     {
  4123     _AKNTRACE_FUNC_ENTER;
  4108     _AKNTRACE_FUNC_ENTER;
       
  4109     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  4124     
  4110     
  4125     TRect aRect(aItemRect);
  4111     TRect aRect(aItemRect);
  4126     const TColors *subcellColors = &aColors;
  4112     const TColors *subcellColors = &aColors;
  4127     
  4113     
  4128     TInt lastSubCell=LastSubCell();
  4114     TInt lastSubCell=LastSubCell();
  4348 
  4334 
  4349         if (aHighlight)
  4335         if (aHighlight)
  4350             {
  4336             {
  4351             aGc.SetPenColor(subcellColors->iHighlightedText);
  4337             aGc.SetPenColor(subcellColors->iHighlightedText);
  4352             aGc.SetBrushColor(subcellColors->iHighlightedBack); 
  4338             aGc.SetBrushColor(subcellColors->iHighlightedBack); 
  4353             if ( skinEnabled && iExtension )
  4339             if ( skinEnabled )
  4354                 {
  4340                 {
  4355                 if ( iExtension->iHighlightedTextColor != NULL )
  4341                 if ( iExtension->iHighlightedTextColor != NULL )
  4356                     {
  4342                     {
  4357                     aGc.SetPenColor( iExtension->iHighlightedTextColor );
  4343                     aGc.SetPenColor( iExtension->iHighlightedTextColor );
  4358                     }
  4344                     }
  4361         else
  4347         else
  4362             {
  4348             {
  4363             aGc.SetPenColor(subcellColors->iText);
  4349             aGc.SetPenColor(subcellColors->iText);
  4364             aGc.SetBrushColor(subcellColors->iBack);
  4350             aGc.SetBrushColor(subcellColors->iBack);
  4365             
  4351             
  4366             if ( skinEnabled && iExtension )
  4352             if ( skinEnabled )
  4367                 {
  4353                 {
  4368                 if ( iExtension->iTextColor != NULL )
  4354                 if ( iExtension->iTextColor != NULL )
  4369                     {
  4355                     {
  4370                     aGc.SetPenColor( iExtension->iTextColor );
  4356                     aGc.SetPenColor( iExtension->iTextColor );
  4371                     }
  4357                     }
  4379             {          
  4365             {          
  4380             // graphics or text column
  4366             // graphics or text column
  4381             CGraphicsContext::TTextAlign align=sc->iAlign;
  4367             CGraphicsContext::TTextAlign align=sc->iAlign;
  4382             if (!sc->iGraphics)
  4368             if (!sc->iGraphics)
  4383                 {
  4369                 {
  4384                 if ( !iExtension )
       
  4385                     {
       
  4386                     _AKNTRACE_FUNC_EXIT;
       
  4387                     return;
       
  4388                     }
       
  4389                 const CFont* rowAndCellFont=RowAndSubCellFont(iExtension->iCurrentlyDrawnItemIndex,subcell);
  4370                 const CFont* rowAndCellFont=RowAndSubCellFont(iExtension->iCurrentlyDrawnItemIndex,subcell);
  4390                 const CFont* cellFont=sc->iBaseFont;
  4371                 const CFont* cellFont=sc->iBaseFont;
  4391                 const CFont* tempFont=(cellFont) ? cellFont : font;
  4372                 const CFont* tempFont=(cellFont) ? cellFont : font;
  4392                 const CFont* usedFont=(rowAndCellFont) ? rowAndCellFont : tempFont;
  4373                 const CFont* usedFont=(rowAndCellFont) ? rowAndCellFont : tempFont;
  4393                 aGc.UseFont(usedFont);
  4374                 aGc.UseFont(usedFont);
  4537                 if (index>=0 && iIconArray)
  4518                 if (index>=0 && iIconArray)
  4538                     {
  4519                     {
  4539                     CGulIcon* icon=(*iIconArray)[index];
  4520                     CGulIcon* icon=(*iIconArray)[index];
  4540                     CFbsBitmap* bitmap=icon->Bitmap();
  4521                     CFbsBitmap* bitmap=icon->Bitmap();
  4541                     
  4522                     
  4542                     if ( iExtension )
  4523 
       
  4524                     TInt w, h;
       
  4525                     TSize sz = bitmap->SizeInPixels();
       
  4526 
       
  4527                     w = iExtension->iSubCellIconSize[subcell].iWidth;
       
  4528                     h = iExtension->iSubCellIconSize[subcell].iHeight;
       
  4529 
       
  4530                     if (h != 0 && w != 0 && !( sz.iWidth == w || sz.iHeight == h ) )
  4543                         {
  4531                         {
  4544                         TInt w, h;
  4532                         AknIconUtils::SetSize( bitmap,
  4545                         TSize sz = bitmap->SizeInPixels();
  4533                                                iExtension->iSubCellIconSize[subcell],
  4546                         
  4534                                                EAspectRatioPreservedAndUnusedSpaceRemoved );
  4547                         w = iExtension->iSubCellIconSize[subcell].iWidth;
       
  4548                         h = iExtension->iSubCellIconSize[subcell].iHeight;
       
  4549                         
       
  4550                         if (h != 0 && w != 0 && !( sz.iWidth == w || sz.iHeight == h ) )
       
  4551                             {
       
  4552                             AknIconUtils::SetSize( bitmap,
       
  4553                                                    iExtension->iSubCellIconSize[subcell],
       
  4554                                                    EAspectRatioPreservedAndUnusedSpaceRemoved );
       
  4555                             }
       
  4556                         else if ( sz.iWidth == 0 || sz.iHeight == 0 ) // check if size is set at all
       
  4557                             {
       
  4558                             // just in case fallback
       
  4559                             AknIconUtils::SetSize( bitmap,
       
  4560                                                    textRect.Size(),
       
  4561                                                    EAspectRatioPreservedAndUnusedSpaceRemoved );
       
  4562                             }
       
  4563                         }
  4535                         }
       
  4536                     else if ( sz.iWidth == 0 || sz.iHeight == 0 ) // check if size is set at all
       
  4537                         {
       
  4538                         // just in case fallback
       
  4539                         AknIconUtils::SetSize( bitmap,
       
  4540                                                textRect.Size(),
       
  4541                                                EAspectRatioPreservedAndUnusedSpaceRemoved );
       
  4542                         }
       
  4543 
  4564                     
  4544                     
  4565                     TSize size=bitmap->SizeInPixels();
  4545                     TSize size=bitmap->SizeInPixels();
  4566                     
  4546                     
  4567                     if (size.iWidth>textRect.Width())
  4547                     if (size.iWidth>textRect.Width())
  4568                         {
  4548                         {
  4623     _AKNTRACE_FUNC_EXIT;
  4603     _AKNTRACE_FUNC_EXIT;
  4624     }
  4604     }
  4625 
  4605 
  4626 void CFormattedCellListBoxData::SetClippedByWrap( TUint32 aClippedCells, TBool aUseClippedByWrap )
  4606 void CFormattedCellListBoxData::SetClippedByWrap( TUint32 aClippedCells, TBool aUseClippedByWrap )
  4627     {
  4607     {
  4628     if ( iExtension )
  4608     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  4629         {
  4609     iExtension->iClippedByWrap = aClippedCells;
  4630         iExtension->iClippedByWrap = aClippedCells;
  4610     iExtension->iUseClippedByWrap = aUseClippedByWrap;
  4631         iExtension->iUseClippedByWrap = aUseClippedByWrap;
       
  4632         }
       
  4633     }
  4611     }
  4634 
  4612 
  4635 EXPORT_C TUint32 CFormattedCellListBoxData::CurrentItemTextWasClipped() const
  4613 EXPORT_C TUint32 CFormattedCellListBoxData::CurrentItemTextWasClipped() const
  4636     {
  4614     {
  4637     return iExtension ? iExtension->iClippedSubcells : 0;
  4615     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  4616     return iExtension->iClippedSubcells;
  4638     }
  4617     }
  4639 
  4618 
  4640 
  4619 
  4641 
  4620 
  4642 TBool CFormattedCellListBoxData::KineticScrollingEnabled() const
  4621 TBool CFormattedCellListBoxData::KineticScrollingEnabled() const
  4643     {
  4622     {
  4644     if ( iExtension )
  4623     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
  4645         {
  4624     return iExtension->iKineticScrolling;
  4646         return iExtension->iKineticScrolling;       
       
  4647         }
       
  4648     return EFalse;
       
  4649     }
  4625     }
  4650     
  4626     
  4651     
  4627     
  4652 CEikListBox* CFormattedCellListBoxData::ListBox() const
  4628 CEikListBox* CFormattedCellListBoxData::ListBox() const
  4653     {
  4629     {
  4654     if ( iExtension && iExtension->iControl )
  4630     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
       
  4631     if ( iExtension->iControl )
  4655         {
  4632         {
  4656         return static_cast<CEikListBox*>( iExtension->iControl );
  4633         return static_cast<CEikListBox*>( iExtension->iControl );
  4657         }
  4634         }
  4658     return NULL;
  4635     return NULL;
  4659     }
  4636     }
  4660 void CFormattedCellListBoxData::InitSmileyL()
  4637 void CFormattedCellListBoxData::InitSmileyL()
  4661     {
  4638     {
  4662     __ASSERT_DEBUG( iExtension, Panic( EAknPanicObjectNotFullyConstructed ));
  4639     __ASSERT_DEBUG( iExtension, Panic( EAknPanicObjectNotFullyConstructed ));
  4663     if ( iExtension && !iExtension->iSmileyMan )
  4640     if ( !iExtension->iSmileyMan )
  4664         {
  4641         {
  4665         iExtension->iSmileyMan = CAknSmileyManager::NewL( iExtension );
  4642         iExtension->iSmileyMan = CAknSmileyManager::NewL( iExtension );
  4666         }
  4643         }
  4667     }
  4644     }
  4668 
  4645