uifw/eikctl/src/EIKCLBD.CPP
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
child 72 a5e7a4f63858
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
     1 /*
     1 /*
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    30 #include <AknBidiTextUtils.h>
    30 #include <AknBidiTextUtils.h>
    31 #include <skinlayout.cdl.h>
    31 #include <skinlayout.cdl.h>
    32 #include <layoutmetadata.cdl.h>
    32 #include <layoutmetadata.cdl.h>
    33 #include <aknlayoutscalable_avkon.cdl.h>
    33 #include <aknlayoutscalable_avkon.cdl.h>
    34 #include <aknphysics.h>
    34 #include <aknphysics.h>
       
    35 #include <AknIconArray.h>
       
    36 #include <avkon.mbg>
    35 
    37 
    36 
    38 
    37 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
    39 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
    38 #include <aknlistloadertfx.h>
    40 #include <aknlistloadertfx.h>
    39 #include <aknlistboxtfxinternal.h>
    41 #include <aknlistboxtfxinternal.h>
    49 
    51 
    50 // colored tick marks support
    52 // colored tick marks support
    51 const TInt KColorIconFlag = -1;
    53 const TInt KColorIconFlag = -1;
    52 const TInt KColorIconIdx  =  0;
    54 const TInt KColorIconIdx  =  0;
    53 
    55 
       
    56 // Number of icons in marking mode icon array
       
    57 const TInt KMarkingModeIconArraySize = 2;
    54 
    58 
    55 /**
    59 /**
    56 * About animation usage:
    60 * About animation usage:
    57 * All animation usage is implemented in this class. Animation is eye candy and
    61 * All animation usage is implemented in this class. Animation is eye candy and
    58 * low priority when it comes to resources -> on resource failures animation
    62 * low priority when it comes to resources -> on resource failures animation
   114     TBool SyncAndDrawAnim( CBitmapContext& aGc, const TRect& aRect );
   118     TBool SyncAndDrawAnim( CBitmapContext& aGc, const TRect& aRect );
   115     MAknsControlContext* SkinBackgroundContext() const;
   119     MAknsControlContext* SkinBackgroundContext() const;
   116     void DeleteAnim();
   120     void DeleteAnim();
   117     void FocusGained();
   121     void FocusGained();
   118     void FocusLost();
   122     void FocusLost();
   119     void SkinChanged();
   123     void SkinChangedL();
   120     void SetControl( CCoeControl* aControl );
   124     void SetControl( CCoeControl* aControl );
   121 
   125 
   122     // Implementation of MCoeForegroundObserver
   126     // Implementation of MCoeForegroundObserver
   123     void HandleGainingForeground();
   127     void HandleGainingForeground();
   124     void HandleLosingForeground();
   128     void HandleLosingForeground();
   139     
   143     
   140     TBool DrawPressedDownEffectL( MAknsSkinInstance* aInstance, 
   144     TBool DrawPressedDownEffectL( MAknsSkinInstance* aInstance, 
   141                                  CWindowGc& aGc, 
   145                                  CWindowGc& aGc, 
   142                                  const TRect& aOutRect, 
   146                                  const TRect& aOutRect, 
   143                                  const TRect& aInnerRect ) const;
   147                                  const TRect& aInnerRect ) const;
       
   148 
       
   149     void LoadMarkingIconsL();
       
   150 
   144 public: //for handling column alignment
   151 public: //for handling column alignment
   145     struct TColumnExt
   152     struct TColumnExt
   146         {
   153         {
   147         TInt    iColumn; // Must be first entry 
   154         TInt    iColumn; // Must be first entry 
   148         TBool   iLayoutAlign;//is layout alignment or Set by client 
   155         TBool   iLayoutAlign;//is layout alignment or Set by client 
   237 
   244 
   238    
   245    
   239     
   246     
   240     CArrayFix<TColumnExt>* iColumnExtArray; //for column alignment
   247     CArrayFix<TColumnExt>* iColumnExtArray; //for column alignment
   241     TRect iMarginRect;
   248     TRect iMarginRect;
       
   249     CAknIconArray* iMarkingIconArray;
   242     };
   250     };
   243 
   251 
   244 /**
   252 /**
   245 * High priority is well argumented because running the active object will
   253 * High priority is well argumented because running the active object will
   246 * result in animation deletion -> results in freeing resources.
   254 * result in animation deletion -> results in freeing resources.
   304     delete cenRep;
   312     delete cenRep;
   305 #endif // RD_LIST_STRETCH
   313 #endif // RD_LIST_STRETCH
   306 
   314 
   307     
   315     
   308     iKineticScrolling = CAknPhysics::FeatureEnabled();
   316     iKineticScrolling = CAknPhysics::FeatureEnabled();
       
   317     LoadMarkingIconsL();
   309     _AKNTRACE_FUNC_EXIT;
   318     _AKNTRACE_FUNC_EXIT;
   310     }
   319     }
   311 
   320 
   312 CColumnListBoxDataExtension::~CColumnListBoxDataExtension()
   321 CColumnListBoxDataExtension::~CColumnListBoxDataExtension()
   313     {
   322     {
   328     delete iRowAndSubCellArray;
   337     delete iRowAndSubCellArray;
   329     delete iSLSubCellArray;
   338     delete iSLSubCellArray;
   330     delete iColorBmp;
   339     delete iColorBmp;
   331     delete iHiliBmp;
   340     delete iHiliBmp;
   332     delete  iColumnExtArray;
   341     delete  iColumnExtArray;
       
   342 
       
   343     if ( iMarkingIconArray )
       
   344         {
       
   345         iMarkingIconArray->ResetAndDestroy();
       
   346         }
       
   347 
       
   348     delete iMarkingIconArray;
   333     }
   349     }
   334 
   350 
   335 MAknsControlContext* CColumnListBoxDataExtension::SkinBackgroundContext() const
   351 MAknsControlContext* CColumnListBoxDataExtension::SkinBackgroundContext() const
   336     {
   352     {
   337     if ( iSkinEnabled )
   353     if ( iSkinEnabled )
   518         {
   534         {
   519         NoAnimIfError( iAnimation->Pause() );
   535         NoAnimIfError( iAnimation->Pause() );
   520         }
   536         }
   521     }
   537     }
   522 
   538 
   523 // -----------------------------------------------------------------------------
   539 
   524 // CColumnListBoxDataExtension::SkinChanged
   540 // -----------------------------------------------------------------------------
   525 // -----------------------------------------------------------------------------
   541 // CColumnListBoxDataExtension::SkinChangedL
   526 //
   542 // -----------------------------------------------------------------------------
   527 void CColumnListBoxDataExtension::SkinChanged()
   543 //
       
   544 void CColumnListBoxDataExtension::SkinChangedL()
   528     {
   545     {
   529     DeleteAnim();
   546     DeleteAnim();
   530     TryCreateAnimation();
   547     TryCreateAnimation();
   531     CreateColorBitmapsL();
   548     CreateColorBitmapsL();
   532     }
   549     LoadMarkingIconsL();
       
   550     }
       
   551 
   533 
   552 
   534 // -----------------------------------------------------------------------------
   553 // -----------------------------------------------------------------------------
   535 // CColumnListBoxDataExtension::SetControl
   554 // CColumnListBoxDataExtension::SetControl
   536 // -----------------------------------------------------------------------------
   555 // -----------------------------------------------------------------------------
   537 //
   556 //
  1120                                      aInnerRect,
  1139                                      aInnerRect,
  1121                                      KAknsIIDQsnFrListPressed,
  1140                                      KAknsIIDQsnFrListPressed,
  1122                                      KAknsIIDQsnFrListCenterPressed );
  1141                                      KAknsIIDQsnFrListCenterPressed );
  1123     }
  1142     }
  1124 
  1143 
       
  1144 
       
  1145 // -----------------------------------------------------------------------------
       
  1146 // CColumnListBoxDataExtension::LoadMarkingIconsL
       
  1147 // -----------------------------------------------------------------------------
       
  1148 //
       
  1149 void CColumnListBoxDataExtension::LoadMarkingIconsL()
       
  1150     {
       
  1151     if ( !iMarkingIconArray )
       
  1152         {
       
  1153         iMarkingIconArray = new ( ELeave ) CAknIconArray( 
       
  1154                 KMarkingModeIconArraySize );
       
  1155         }
       
  1156     else
       
  1157         {
       
  1158         iMarkingIconArray->ResetAndDestroy();
       
  1159         }
       
  1160 
       
  1161     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
  1162     const TDesC& avkonIconFile = AknIconUtils::AvkonIconFileName();
       
  1163 
       
  1164     CGulIcon* icon = AknsUtils::CreateGulIconL( skin, 
       
  1165             KAknsIIDQgnPropCheckboxOn, 
       
  1166             avkonIconFile, 
       
  1167             EMbmAvkonQgn_prop_checkbox_on, 
       
  1168             EMbmAvkonQgn_prop_checkbox_on_mask );
       
  1169     
       
  1170     CleanupStack::PushL( icon );
       
  1171     iMarkingIconArray->AppendL( icon );
       
  1172     CleanupStack::Pop( icon );
       
  1173 
       
  1174     icon = AknsUtils::CreateGulIconL( skin, 
       
  1175             KAknsIIDQgnPropCheckboxOff, 
       
  1176             avkonIconFile, 
       
  1177             EMbmAvkonQgn_prop_checkbox_off, 
       
  1178             EMbmAvkonQgn_prop_checkbox_off_mask );
       
  1179 
       
  1180     CleanupStack::PushL( icon );
       
  1181     iMarkingIconArray->AppendL( icon );
       
  1182     CleanupStack::Pop( icon );
       
  1183     }
       
  1184 
       
  1185 
  1125 EXPORT_C CCoeControl *CColumnListBoxData::Control() const 
  1186 EXPORT_C CCoeControl *CColumnListBoxData::Control() const 
  1126     {
  1187     {
       
  1188 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1127     return iExtension->iControl;
  1189     return iExtension->iControl;
  1128     }
  1190     }
  1129 
  1191 
  1130 EXPORT_C void CColumnListBoxData::SetControl(CCoeControl *aControl)
  1192 EXPORT_C void CColumnListBoxData::SetControl(CCoeControl *aControl)
  1131     {
  1193     {
       
  1194 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1132     iExtension->SetControl( aControl );
  1195     iExtension->SetControl( aControl );
  1133     }
  1196     }
  1134 
  1197 
  1135 
  1198 
  1136 EXPORT_C MAknsControlContext* CColumnListBoxData::SkinBackgroundContext() const
  1199 EXPORT_C MAknsControlContext* CColumnListBoxData::SkinBackgroundContext() const
  1137     {
  1200     {
       
  1201 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1138     if (iExtension->iSkinEnabled)
  1202     if (iExtension->iSkinEnabled)
  1139         {
  1203         {
  1140         return iExtension->iSkinControlContext;
  1204         return iExtension->iSkinControlContext;
  1141         }
  1205         }
  1142         
  1206         
  1143     return NULL;
  1207     return NULL;
  1144     }
  1208     }
  1145 
  1209 
  1146 void CColumnListBoxData::SetSkinBackgroundContext(CAknsListBoxBackgroundControlContext *aContext)
  1210 void CColumnListBoxData::SetSkinBackgroundContext(CAknsListBoxBackgroundControlContext *aContext)
  1147     {
  1211     {
       
  1212 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1148     delete iExtension->iSkinControlContext;
  1213     delete iExtension->iSkinControlContext;
  1149     iExtension->iSkinControlContext = aContext;
  1214     iExtension->iSkinControlContext = aContext;
  1150     }
  1215     }
  1151 
  1216 
  1152 void CColumnListBoxData::CreatePictographInterfaceL()
  1217 void CColumnListBoxData::CreatePictographInterfaceL()
  1153     {
  1218     {
       
  1219 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1154     if ( !iExtension->iPictoInterface )
  1220     if ( !iExtension->iPictoInterface )
  1155         {
  1221         {
  1156         iExtension->iPictoInterface = CAknPictographInterface::NewL(
  1222         iExtension->iPictoInterface = CAknPictographInterface::NewL(
  1157             *iExtension->iControl, *iExtension );
  1223             *iExtension->iControl, *iExtension );
  1158         }
  1224         }
  1159     }
  1225     }
  1160 
  1226 
  1161 EXPORT_C void CColumnListBoxData::SetSkinHighlightFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  1227 EXPORT_C void CColumnListBoxData::SetSkinHighlightFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
  1162     {
  1228     {
       
  1229 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1163     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1230     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1164     iExtension->iSkinHighlightFrameId = aFrameId;
  1231     iExtension->iSkinHighlightFrameId = aFrameId;
  1165     iExtension->iSkinHighlightFrameCenterId = aFrameCenterId;
  1232     iExtension->iSkinHighlightFrameCenterId = aFrameCenterId;
  1166     }
  1233     }
  1167 
  1234 
  1168 EXPORT_C void CColumnListBoxData::SetSkinEnabledL(TBool aEnabled)
  1235 EXPORT_C void CColumnListBoxData::SetSkinEnabledL(TBool aEnabled)
  1169     {
  1236     {
       
  1237 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1170     CListBoxData::SetSkinEnabledL(aEnabled);
  1238     CListBoxData::SetSkinEnabledL(aEnabled);
  1171     iExtension->iSkinEnabled = aEnabled;
  1239     iExtension->iSkinEnabled = aEnabled;
  1172     }
  1240     }
  1173 
  1241 
  1174 EXPORT_C void CColumnListBoxData::SetSkinStyle(const TAknsItemID *aId, const TRect &aTileRect)
  1242 EXPORT_C void CColumnListBoxData::SetSkinStyle(const TAknsItemID *aId, const TRect &aTileRect)
  1175     {
  1243     {
       
  1244 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1176     if (iExtension->iSkinControlContext)
  1245     if (iExtension->iSkinControlContext)
  1177         {
  1246         {
  1178         iExtension->iSkinControlContext->SetTiledBitmap(*aId);
  1247         iExtension->iSkinControlContext->SetTiledBitmap(*aId);
  1179         iExtension->iSkinControlContext->SetTiledRect(aTileRect);
  1248         iExtension->iSkinControlContext->SetTiledRect(aTileRect);
  1180         }
  1249         }
  1181     }
  1250     }
  1182 
  1251 
  1183 EXPORT_C void CColumnListBoxData::SetListEndSkinStyle(const TAknsItemID *aId, const TRect &aTileRect)
  1252 EXPORT_C void CColumnListBoxData::SetListEndSkinStyle(const TAknsItemID *aId, const TRect &aTileRect)
  1184     {
  1253     {
       
  1254 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1185     if (iExtension->iSkinControlContext)
  1255     if (iExtension->iSkinControlContext)
  1186         {
  1256         {
  1187         iExtension->iSkinControlContext->SetBottomBitmap(*aId);
  1257         iExtension->iSkinControlContext->SetBottomBitmap(*aId);
  1188         iExtension->iSkinControlContext->SetBottomRect(aTileRect);
  1258         iExtension->iSkinControlContext->SetBottomRect(aTileRect);
  1189         }
  1259         }
  1190     }
  1260     }
  1191 
  1261 
  1192 void CColumnListBoxData::CreateMarqueeControlL()
  1262 void CColumnListBoxData::CreateMarqueeControlL()
  1193     {
  1263     {
       
  1264 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1194     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1265     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1195     if ( !iExtension->iMarquee )
  1266     if ( !iExtension->iMarquee )
  1196         {
  1267         {
  1197         iExtension->iMarquee = CAknMarqueeControl::NewL();
  1268         iExtension->iMarquee = CAknMarqueeControl::NewL();
  1198         }
  1269         }
  1208     iExtension->i2ndLineMarquee->SetRedrawCallBack(callBack);
  1279     iExtension->i2ndLineMarquee->SetRedrawCallBack(callBack);
  1209     }
  1280     }
  1210 
  1281 
  1211 void CColumnListBoxData::ResetMarquee()
  1282 void CColumnListBoxData::ResetMarquee()
  1212     {
  1283     {
       
  1284 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1213     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1285     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1214     if (iExtension->iMarquee)
  1286     if (iExtension->iMarquee)
  1215         {
  1287         {
  1216         iExtension->iMarquee->Reset();
  1288         iExtension->iMarquee->Reset();
  1217         }
  1289         }
  1221         }
  1293         }
  1222     }
  1294     }
  1223 
  1295 
  1224 TInt CColumnListBoxData::CurrentMarqueeItemIndex()
  1296 TInt CColumnListBoxData::CurrentMarqueeItemIndex()
  1225     {
  1297     {
       
  1298 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1226     return iExtension->iCurrentItem;
  1299     return iExtension->iCurrentItem;
  1227     }
  1300     }
  1228 
  1301 
  1229 void CColumnListBoxData::SetCurrentMarqueeItemIndex(TInt aIndex)
  1302 void CColumnListBoxData::SetCurrentMarqueeItemIndex(TInt aIndex)
  1230     {
  1303     {
       
  1304 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1231     iExtension->iCurrentItem = aIndex;
  1305     iExtension->iCurrentItem = aIndex;
  1232     }
  1306     }
  1233 
  1307 
  1234 //
  1308 //
  1235 // Enables or disables marquee.
  1309 // Enables or disables marquee.
  1236 //
  1310 //
  1237 EXPORT_C void CColumnListBoxData::EnableMarqueeL(TBool aEnable)
  1311 EXPORT_C void CColumnListBoxData::EnableMarqueeL(TBool aEnable)
  1238     {
  1312     {
       
  1313 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1239     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1314     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1240     // CreateMarqueeControlL does nothing if marquee already exists,
  1315     // CreateMarqueeControlL does nothing if marquee already exists,
  1241     // so let's just call it just in case.
  1316     // so let's just call it just in case.
  1242     CreateMarqueeControlL();
  1317     CreateMarqueeControlL();
  1243     iExtension->iMarquee->EnableMarquee(aEnable);
  1318     iExtension->iMarquee->EnableMarquee(aEnable);
  1244     iExtension->i2ndLineMarquee->EnableMarquee(aEnable);
  1319     iExtension->i2ndLineMarquee->EnableMarquee(aEnable);
  1245     }
  1320     }
  1246 
  1321 
  1247 EXPORT_C void CColumnListBoxData::SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition)
  1322 EXPORT_C void CColumnListBoxData::SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition)
  1248     {
  1323     {
  1249     if (iExtension)
  1324 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1250         iExtension->iSeparatorLinePosition = aPosition;
  1325     iExtension->iSeparatorLinePosition = aPosition;
  1251     }
  1326     }
  1252 EXPORT_C TAknSeparatorLinePosition CColumnListBoxData::SeparatorLinePosition() const
  1327 EXPORT_C TAknSeparatorLinePosition CColumnListBoxData::SeparatorLinePosition() const
  1253     {
  1328     {
  1254     if (iExtension)
  1329 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1255         return iExtension->iSeparatorLinePosition;
  1330     return iExtension->iSeparatorLinePosition;
  1256     else
       
  1257         return ENoLine;
       
  1258     }
  1331     }
  1259 EXPORT_C CAknLayoutData *CColumnListBoxData::LayoutData() const
  1332 EXPORT_C CAknLayoutData *CColumnListBoxData::LayoutData() const
  1260     {
  1333     {
  1261     return NULL;
  1334     return NULL;
  1262     }
  1335     }
  1309 EXPORT_C CColumnListBoxData::~CColumnListBoxData()
  1382 EXPORT_C CColumnListBoxData::~CColumnListBoxData()
  1310 //
  1383 //
  1311 //    D'tor
  1384 //    D'tor
  1312 //
  1385 //
  1313     {
  1386     {
       
  1387 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1314     delete iColumnArray;
  1388     delete iColumnArray;
  1315     if (IconArray())
  1389     if (IconArray())
  1316         {
  1390         {
  1317         IconArray()->ResetAndDestroy();
  1391         IconArray()->ResetAndDestroy();
  1318         if (iExtension)
  1392         delete iExtension->iIconArray;
  1319             delete iExtension->iIconArray;
       
  1320         }
  1393         }
  1321     delete iExtension;
  1394     delete iExtension;
  1322     }
  1395     }
  1323 
  1396 
  1324 EXPORT_C void CColumnListBoxData::ConstructLD()
  1397 EXPORT_C void CColumnListBoxData::ConstructLD()
  1391 EXPORT_C void CColumnListBoxData::SetColumnWidthPixelL(TInt aColumn,TInt aWidth)
  1464 EXPORT_C void CColumnListBoxData::SetColumnWidthPixelL(TInt aColumn,TInt aWidth)
  1392 //
  1465 //
  1393 //    Set a columns width
  1466 //    Set a columns width
  1394 //
  1467 //
  1395     {
  1468     {
       
  1469 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1396     TInt index;
  1470     TInt index;
  1397     FindColumnIndexOrAddL(index,aColumn);
  1471     FindColumnIndexOrAddL(index,aColumn);
  1398     At(index).iWidth=aWidth;
  1472     At(index).iWidth=aWidth;
  1399     if ( iExtension && iExtension->iUseLayoutData )
  1473     if ( iExtension->iUseLayoutData )
  1400         {
  1474         {
  1401         iExtension->iUseLayoutData = EFalse;
  1475         iExtension->iUseLayoutData = EFalse;
  1402         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1476         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1403 #ifdef RD_UI_TRANSITION_EFFECTS_LIST 
  1477 #ifdef RD_UI_TRANSITION_EFFECTS_LIST 
  1404         MAknListBoxTfxInternal* transApi =
  1478         MAknListBoxTfxInternal* transApi =
  1465 EXPORT_C void CColumnListBoxData::SetColumnBaselinePosL(TInt aColumn,TInt aPos)
  1539 EXPORT_C void CColumnListBoxData::SetColumnBaselinePosL(TInt aColumn,TInt aPos)
  1466 //
  1540 //
  1467 //  Set a columns baseline position
  1541 //  Set a columns baseline position
  1468 //
  1542 //
  1469     {
  1543     {
       
  1544 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1470     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1545     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1471     TInt index;
  1546     TInt index;
  1472     FindColumnIndexOrAddL(index,aColumn);
  1547     FindColumnIndexOrAddL(index,aColumn);
  1473     At(index).iBaseline=aPos;
  1548     At(index).iBaseline=aPos;
  1474     
  1549     
  1475     // can not be nicely supported by new drawing system
  1550     // can not be nicely supported by new drawing system
  1476     // --> revert to Symbian style drawing
  1551     // --> revert to Symbian style drawing
  1477     if ( iExtension && iExtension->iUseLayoutData )
  1552     if ( iExtension->iUseLayoutData )
  1478         {
  1553         {
  1479         iExtension->iUseLayoutData = EFalse;
  1554         iExtension->iUseLayoutData = EFalse;
  1480 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  1555 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  1481         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1556         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1482         MAknListBoxTfxInternal* transApi =
  1557         MAknListBoxTfxInternal* transApi =
  1507 EXPORT_C void CColumnListBoxData::SetColumnMarginsL(TInt aColumn,TMargins aMargins)
  1582 EXPORT_C void CColumnListBoxData::SetColumnMarginsL(TInt aColumn,TMargins aMargins)
  1508 //
  1583 //
  1509 //  Set a columns vertical cap
  1584 //  Set a columns vertical cap
  1510 //
  1585 //
  1511     {
  1586     {
       
  1587 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1512     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1588     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1513     TInt index;
  1589     TInt index;
  1514     FindColumnIndexOrAddL(index,aColumn);
  1590     FindColumnIndexOrAddL(index,aColumn);
  1515     At(index).iMargins=aMargins;
  1591     At(index).iMargins=aMargins;
  1516 
  1592 
  1517     // can not be nicely supported by new drawing system
  1593     // can not be nicely supported by new drawing system
  1518     // --> revert to Symbian style drawing
  1594     // --> revert to Symbian style drawing
  1519     if ( iExtension && iExtension->iUseLayoutData )
  1595     if ( iExtension->iUseLayoutData )
  1520         {
  1596         {
  1521         iExtension->iUseLayoutData = EFalse;
  1597         iExtension->iUseLayoutData = EFalse;
  1522 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  1598 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  1523         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1599         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1524         MAknListBoxTfxInternal* transApi =
  1600         MAknListBoxTfxInternal* transApi =
  1626 EXPORT_C void CColumnListBoxData::SetColumnAlignmentL(TInt aColumn,CGraphicsContext::TTextAlign aAlign)
  1702 EXPORT_C void CColumnListBoxData::SetColumnAlignmentL(TInt aColumn,CGraphicsContext::TTextAlign aAlign)
  1627 //
  1703 //
  1628 //    Set a columns alignment
  1704 //    Set a columns alignment
  1629 //
  1705 //
  1630     {
  1706     {
       
  1707 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1631     TInt index;
  1708     TInt index;
  1632     FindColumnIndexOrAddL(index,aColumn);
  1709     FindColumnIndexOrAddL(index,aColumn);
  1633     At(index).iAlign=aAlign;
  1710     At(index).iAlign=aAlign;
  1634     iExtension->SetColumnLayoutAlignmentL( aColumn);  
  1711     iExtension->SetColumnLayoutAlignmentL( aColumn);  
  1635     }
  1712     }
  1726 EXPORT_C CArrayPtr<CGulIcon>* CColumnListBoxData::IconArray() const
  1803 EXPORT_C CArrayPtr<CGulIcon>* CColumnListBoxData::IconArray() const
  1727 //
  1804 //
  1728 //    Return the list of icons
  1805 //    Return the list of icons
  1729 //
  1806 //
  1730     {
  1807     {
  1731     if (iExtension)
  1808 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1732         return iExtension->iIconArray;
  1809     return iExtension->iIconArray;
  1733     else
       
  1734         return 0;
       
  1735     }
  1810     }
  1736 
  1811 
  1737 EXPORT_C void CColumnListBoxData::SetIconArray(CArrayPtr<CGulIcon>* aArray)
  1812 EXPORT_C void CColumnListBoxData::SetIconArray(CArrayPtr<CGulIcon>* aArray)
  1738 //
  1813 //
  1739 //    Passes ownership of the icon list aArray (assumes any previous list has been deleted by the caller)
  1814 //    Passes ownership of the icon list aArray (assumes any previous list has been deleted by the caller)
  1740 //
  1815 //
  1741     {
  1816     {
       
  1817 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1742     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1818     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1743     if (iExtension)
  1819     iExtension->iIconArray=aArray; 
  1744         iExtension->iIconArray=aArray;
       
  1745     else
       
  1746         {
       
  1747         aArray->ResetAndDestroy();
       
  1748         delete aArray;
       
  1749         }    
       
  1750     }
  1820     }
  1751 
  1821 
  1752 EXPORT_C CFont* CColumnListBoxData::Font(const TListItemProperties& /*aItemProperties*/, TInt aColumn) const
  1822 EXPORT_C CFont* CColumnListBoxData::Font(const TListItemProperties& /*aItemProperties*/, TInt aColumn) const
  1753     {
  1823     {
  1754     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1824     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  1776 #endif
  1846 #endif
  1777     }
  1847     }
  1778 
  1848 
  1779 void CColumnListBoxData::DrawHighLight( CWindowGc& aGc, const TRect& aRect, TBool aHighlight, MAknsSkinInstance* aSkin ) const
  1849 void CColumnListBoxData::DrawHighLight( CWindowGc& aGc, const TRect& aRect, TBool aHighlight, MAknsSkinInstance* aSkin ) const
  1780     {
  1850     {
       
  1851 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1781     // SERIES60 Highlight drawing.
  1852     // SERIES60 Highlight drawing.
  1782     if( aHighlight )
  1853     if( aHighlight )
  1783         {
  1854         {
  1784         // same as CFormattedCellListBoxData::DrawDefaultHighlight
  1855         // same as CFormattedCellListBoxData::DrawDefaultHighlight
  1785         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1856         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  1941                                      const TDesC* aText,
  2012                                      const TDesC* aText,
  1942                                      const TRect& aRect,
  2013                                      const TRect& aRect,
  1943                                      TBool aHighlight,
  2014                                      TBool aHighlight,
  1944                                      const TColors& aColors ) const
  2015                                      const TColors& aColors ) const
  1945     {
  2016     {
       
  2017 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  1946     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );    
  2018     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );    
       
  2019     
       
  2020     __ASSERT_DEBUG( iExtension->iControl, Panic( EEikPanicNullPointer ));
       
  2021     
       
  2022     CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
       
  2023     if ( listbox && !listbox->View()->ViewRect().Intersects( aRect ) )
       
  2024         {
       
  2025         // outside of the clipping rect -> don't process this item
       
  2026         return;
       
  2027         }
  1947 
  2028 
  1948     TInt lastColumn = Min( LastColumn(), KMaxColumn );
  2029     TInt lastColumn = Min( LastColumn(), KMaxColumn );
  1949     TInt column=0;
  2030     TInt column=0;
  1950     TPtrC text;
  2031     TPtrC text;
  1951     TPtrC tempText;
  2032     TPtrC tempText;
  1952 
  2033 
  1953     TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText;
  2034     TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText;
  1954 
  2035     
  1955     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
  2036     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
  1956     MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
  2037     MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
  1957     if (!cc)
  2038     if ( !cc )
  1958         {
  2039         {
  1959         cc = SkinBackgroundContext();
  2040         cc = SkinBackgroundContext();
  1960         }
  2041         }
  1961 
  2042 
  1962     TAknTextLineLayout textLines[KMaxColumn];
  2043     TAknTextLineLayout textLines[KMaxColumn];
  1963     TBool rectClipped[KMaxColumn];
  2044     TBool rectClipped[KMaxColumn];
  1964     
  2045     
  1965     Mem::FillZ( &rectClipped[0], KMaxColumn * sizeof( TBool ) );
  2046     Mem::FillZ( &rectClipped[0], KMaxColumn * sizeof( TBool ) );
  1966     
       
  1967     if ( iExtension->iSubCellsMightIntersect )
       
  1968         {
       
  1969         CheckIfSubCellsIntersect( &textLines[0], &rectClipped[0], *aText, aRect );
       
  1970         }
       
  1971 
       
  1972     CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
       
  1973 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  2047 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  1974     MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
  2048     MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
  1975 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  2049 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  1976 
  2050 
  1977     if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
  2051     if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
  2000             {
  2074             {
  2001             transApi->StopDrawing();
  2075             transApi->StopDrawing();
  2002             }
  2076             }
  2003 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  2077 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  2004         }
  2078         }
  2005 
  2079     if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
  2006     DrawHighLight( aGc, aRect, aHighlight, skin );
  2080         {
  2007     
  2081         AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
       
  2082         }
       
  2083     
       
  2084     DrawHighLight( aGc, aRect, aHighlight, skin );    
       
  2085     TRect itemRect( aRect );
       
  2086     DrawMarkingModeIcons( aItemProperties, aGc, itemRect );
       
  2087     if ( iExtension->iSubCellsMightIntersect )
       
  2088         {
       
  2089         CheckIfSubCellsIntersect( &textLines[0], &rectClipped[0], *aText, itemRect );
       
  2090         }
  2008     // The column draw loop
  2091     // The column draw loop
  2009     column = 0;
  2092     column = 0;
  2010     TInt subCellIndex = 0;
  2093     TInt subCellIndex = 0;
  2011 
       
  2012     if ( !iExtension ) { return; }
       
  2013     
  2094     
  2014 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
  2095 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
  2015     if ( transApi )
  2096     if ( transApi )
  2016         {
  2097         {
  2017         transApi->StartDrawing( MAknListBoxTfxInternal::EListItem );
  2098         transApi->StartDrawing( MAknListBoxTfxInternal::EListItem );
  2018         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  2099         CListBoxView* view = listbox->View();
  2019         aGc.SetClippingRect( view->ViewRect() );
  2100         aGc.SetClippingRect( view->ViewRect() );
  2020         }
  2101         }
  2021 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  2102 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  2022     
  2103     
  2023     for( column = 0; column <= lastColumn; column++ )
  2104     for( column = 0; column <= lastColumn; column++ )
  2024         {
  2105         {
  2025         TextUtils::ColumnText( text, column, aText );
  2106         TextUtils::ColumnText( text, column, aText );
  2026         if ( text == KNullDesC ) { continue; }
  2107         if ( text == KNullDesC ) { continue; }
  2027 
  2108 
  2028         if ( iExtension->FindSLSubCellIndex( subCellIndex, column )!=0 ) { continue; }
  2109         if ( iExtension->FindSLSubCellIndex( subCellIndex, column )!=0 ) 
       
  2110             { 
       
  2111             continue; 
       
  2112             }
  2029         
  2113         
  2030         CGraphicsContext::TTextAlign align=ColumnAlignment(column);
  2114         CGraphicsContext::TTextAlign align=ColumnAlignment(column);
  2031         TBool isLayoutAlignment = iExtension->ColumnLayoutAlignment(column);
  2115         TBool isLayoutAlignment = iExtension->ColumnLayoutAlignment(column);
  2032         
  2116         
  2033         if ( iExtension->AtSL(subCellIndex).iSubCellType == CColumnListBoxDataExtension::EEikSLText )
  2117         if ( iExtension->AtSL(subCellIndex).iSubCellType == CColumnListBoxDataExtension::EEikSLText )
  2034             {
  2118             {
  2035             aGc.SetBrushStyle(CGraphicsContext::ENullBrush);
  2119             aGc.SetBrushStyle(CGraphicsContext::ENullBrush);
  2036             
  2120             
  2037             TRgb textColor( aTextColor );
  2121             TRgb textColor( aTextColor );
  2038             
  2122             
  2039             if (aHighlight)
  2123             if ( aHighlight )
  2040                 {
  2124                 {
  2041                 textColor = aColors.iHighlightedText;
  2125                 textColor = aColors.iHighlightedText;
  2042                 aGc.SetBrushColor(aColors.iHighlightedBack);    
  2126                 aGc.SetBrushColor(aColors.iHighlightedBack);    
  2043                 }
  2127                 }
  2044             if (AknsUtils::AvkonSkinEnabled())
  2128             if ( AknsUtils::AvkonSkinEnabled() )
  2045                 {
  2129                 {
  2046                 if (iExtension->iTextColor != NULL)
  2130                 CListBoxView* view = listbox->View();
  2047                     {
  2131                 TBool useOverrideColor = view->ItemDrawer()->Flags() & CListItemDrawer::EUseOverrideSkinTextColor;
  2048                     textColor = iExtension->iTextColor;
  2132                 if ( !useOverrideColor )
  2049                     }
  2133                    {                 
  2050                 
  2134                    if ( iExtension->iTextColor != NULL )
  2051                 if (aHighlight && iExtension->iHighlightedTextColor != NULL)
  2135                        {
  2052                     {
  2136                        textColor = iExtension->iTextColor;
  2053                     textColor = iExtension->iHighlightedTextColor;
  2137                        }
  2054                     }
  2138                    if ( aHighlight && iExtension->iHighlightedTextColor != NULL )
       
  2139                        {
       
  2140                        textColor = iExtension->iHighlightedTextColor;
       
  2141                        }
       
  2142                    }
  2055                 }
  2143                 }
  2056                 
  2144                 
  2057             const CFont* rowAndColFont=RowAndColumnFont(iExtension->iCurrentRow,column);
  2145             const CFont* rowAndColFont=RowAndColumnFont(iExtension->iCurrentRow,column);
  2058             const CFont* colFont=Font(aItemProperties, column);
  2146             const CFont* colFont=Font(aItemProperties, column);
  2059             const CFont* tempFont=(colFont) ? colFont : NULL;
  2147             const CFont* tempFont=(colFont) ? colFont : NULL;
  2068             else
  2156             else
  2069                 {
  2157                 {
  2070                 // check if there are icons affecting this text layout
  2158                 // check if there are icons affecting this text layout
  2071                 TInt gSC = iExtension->AtSL(subCellIndex).iConditionValue; // graphical subcell which might affect this text subcell
  2159                 TInt gSC = iExtension->AtSL(subCellIndex).iConditionValue; // graphical subcell which might affect this text subcell
  2072                 
  2160                 
  2073                 if (gSC > -1)
  2161                 if ( gSC > -1 )
  2074                     {
  2162                     {
  2075                     TInt tempIndex;
  2163                     TInt tempIndex;
  2076                     while (gSC > -1) // when gSC == -1, we have found our graphical subcell
  2164                     while (gSC > -1) // when gSC == -1, we have found our graphical subcell
  2077                         {
  2165                         {
  2078                         if (iExtension->FindSLSubCellIndex(tempIndex,gSC)!=0) break;
  2166                         if (iExtension->FindSLSubCellIndex(tempIndex,gSC)!=0) break;
  2084                             }
  2172                             }
  2085                         gSC = iExtension->AtSL(tempIndex).iConditionValue;
  2173                         gSC = iExtension->AtSL(tempIndex).iConditionValue;
  2086                         }
  2174                         }
  2087                     }
  2175                     }
  2088                     
  2176                     
  2089                 if (gSC == -1) // no affecting icons -> use default layout
  2177                 if ( gSC == -1 ) // no affecting icons -> use default layout
  2090                     {
  2178                     {
  2091                     textLineLayout = iExtension->AtSL(subCellIndex).iTextLayout;
  2179                     textLineLayout = iExtension->AtSL(subCellIndex).iTextLayout;
  2092                     }
  2180                     }
  2093                 }
  2181                 }
  2094             
  2182             
  2095   
  2183   
  2096             if( !isLayoutAlignment )
  2184             if( !isLayoutAlignment )
  2097                 { 
  2185                 { 
  2098                 switch(align) 
  2186                 switch( align ) 
  2099                     {
  2187                     {
  2100                     case CGraphicsContext::ELeft : 
  2188                     case CGraphicsContext::ELeft : 
  2101                         {
  2189                         {
  2102                         textLineLayout.iJ = ELayoutAlignLeft;    
  2190                         textLineLayout.iJ = ELayoutAlignLeft;    
  2103                         }
  2191                         }
  2115                     default:  break;
  2203                     default:  break;
  2116                     };
  2204                     };
  2117                 }
  2205                 }
  2118             
  2206             
  2119             TAknLayoutText textLayout;
  2207             TAknLayoutText textLayout;
  2120             textLayout.LayoutText( aRect, textLineLayout, usedFont );
  2208             textLayout.LayoutText( itemRect, textLineLayout, usedFont );
  2121             // *2 == leave some room for marquee
  2209             // *2 == leave some room for marquee
  2122             const TInt maxlen( KMaxColumnDataLength * 2 ); 
  2210             const TInt maxlen( KMaxColumnDataLength * 2 ); 
  2123             TBuf<maxlen> convBuf = text.Left(maxlen);
  2211             TBuf<maxlen> convBuf = text.Left(maxlen);
  2124 
  2212 
  2125             // Note that this potentially modifies the text so its lenght in pixels
  2213             // Note that this potentially modifies the text so its lenght in pixels
  2151                 {
  2239                 {
  2152                 iExtension->iClippedColumns |= ( 1 << column );
  2240                 iExtension->iClippedColumns |= ( 1 << column );
  2153                 }
  2241                 }
  2154 
  2242 
  2155             TBool marqueeDisabled(EFalse);
  2243             TBool marqueeDisabled(EFalse);
  2156             if (listbox != NULL && 
  2244             if ( listbox != NULL && 
  2157                 listbox->View() != NULL && 
  2245                  listbox->View() != NULL && 
  2158                 listbox->View()->ItemDrawer() != NULL)
  2246                  listbox->View()->ItemDrawer() != NULL)
  2159                 {
  2247                 {
  2160                 marqueeDisabled = listbox->View()->ItemDrawer()->Flags() & CListItemDrawer::EDisableMarquee;
  2248                 marqueeDisabled = listbox->View()->ItemDrawer()->Flags() & CListItemDrawer::EDisableMarquee;
  2161                 }
  2249                 }
  2162             
  2250             
  2163             if ( iExtension->IsMarqueeOn() && doesNotFit && !marqueeDisabled )
  2251             if ( iExtension->IsMarqueeOn() && doesNotFit && !marqueeDisabled )
  2164                 {
  2252                 {
  2165                 iExtension->iMarquee->UseLogicalToVisualConversion( bidiConv );
  2253                 iExtension->iMarquee->UseLogicalToVisualConversion( bidiConv );
  2166                 
  2254                 
  2167                 if ( iExtension->iMarquee->DrawText( aGc, aRect, textLineLayout, convBuf, usedFont, textColor ) )
  2255                 if ( iExtension->iMarquee->DrawText( aGc, itemRect, textLineLayout, convBuf, usedFont, textColor ) )
  2168                     {
  2256                     {
  2169                     // all the loops have been executed
  2257                     // all the loops have been executed
  2170                     textLayout.DrawText( aGc, convBuf, bidiConv, textColor );
  2258                     textLayout.DrawText( aGc, convBuf, bidiConv, textColor );
  2171                     }
  2259                     }
  2172                 }
  2260                 }
  2241             if ( !IconArray() )
  2329             if ( !IconArray() )
  2242                 {
  2330                 {
  2243                 continue;
  2331                 continue;
  2244                 }
  2332                 }
  2245 
  2333 
  2246             if (aHighlight && (index > 0xffff))
  2334             if ( aHighlight && (index > 0xffff) )
  2247                 {
  2335                 {
  2248                 index = index >> 16; // we have different icon for highlight
  2336                 index = index >> 16; // we have different icon for highlight
  2249                 }
  2337                 }
  2250 
  2338 
  2251              index = index & 0xffff; // mask off possible highlight icon
  2339              index = index & 0xffff; // mask off possible highlight icon
  2252             __ASSERT_DEBUG((index>=0 && index<IconArray()->Count()),Panic(EEikPanicColumnListInvalidBitmapIndex));
  2340             __ASSERT_DEBUG((index>=0 && index<IconArray()->Count()),Panic(EEikPanicColumnListInvalidBitmapIndex));
  2253             
  2341             
  2254             TAknWindowLineLayout graphicLayout = iExtension->AtSL(subCellIndex).iGraphicLayout;
  2342             TAknWindowLineLayout graphicLayout = iExtension->AtSL(subCellIndex).iGraphicLayout;
  2255             TAknLayoutRect graphicRect; 
  2343             TAknLayoutRect graphicRect; 
  2256             
  2344             
  2257             graphicRect.LayoutRect(aRect,graphicLayout);
  2345             graphicRect.LayoutRect( itemRect,graphicLayout );
  2258             TSize graphicSize( graphicRect.Rect().Size() );
  2346             TSize graphicSize( graphicRect.Rect().Size() );
  2259             
  2347             
  2260             if (index>=0 && IconArray())
  2348             if ( index>=0 && IconArray() )
  2261                 {
  2349                 {
  2262                 CGulIcon* icon=(*IconArray())[index];
  2350                 CGulIcon* icon=(*IconArray())[index];
  2263                 CFbsBitmap* bitmap=icon->Bitmap();
  2351                 CFbsBitmap* bitmap=icon->Bitmap();
  2264                 // Sometimes we get fake bitmap...
  2352                 // Sometimes we get fake bitmap...
  2265                 if ( bitmap )
  2353                 if ( bitmap )
  2266                     {
  2354                     {
  2267                     TSize size( bitmap->SizeInPixels() );
  2355                     TSize size( bitmap->SizeInPixels() );
  2268                     
  2356                     
  2269                     if (size.iWidth != graphicSize.iWidth &&
  2357                     if ( size.iWidth != graphicSize.iWidth &&
  2270                         size.iHeight != graphicSize.iHeight )
  2358                          size.iHeight != graphicSize.iHeight )
  2271                         {
  2359                         {
  2272                         AknIconUtils::SetSize( bitmap,
  2360                         AknIconUtils::SetSize( bitmap,
  2273                                                graphicSize,
  2361                                                graphicSize,
  2274                                                EAspectRatioPreservedAndUnusedSpaceRemoved );
  2362                                                EAspectRatioPreservedAndUnusedSpaceRemoved );
  2275                         }
  2363                         }
  2295                                const TDesC* aText,
  2383                                const TDesC* aText,
  2296                                const TRect& aRect,
  2384                                const TRect& aRect,
  2297                                TBool aHighlight,
  2385                                TBool aHighlight,
  2298                                const TColors& aColors ) const
  2386                                const TColors& aColors ) const
  2299     {
  2387     {
       
  2388 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2300     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); 
  2389     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); 
  2301 
  2390 
  2302     if ( aHighlight )
  2391     if ( aHighlight )
  2303         {
  2392         {
  2304         iExtension->iClippedColumns = 0;
  2393         iExtension->iClippedColumns = 0;
  2328             aGc.DiscardFont();
  2417             aGc.DiscardFont();
  2329             }
  2418             }
  2330         return;
  2419         return;
  2331         }
  2420         }
  2332 
  2421 
       
  2422     CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
       
  2423     TRect itemRect( aRect );
       
  2424     
  2333     TInt extraVerticalSpace=(aRect.Height()-font->HeightInPixels());
  2425     TInt extraVerticalSpace=(aRect.Height()-font->HeightInPixels());
  2334     TInt baseLineOffset=extraVerticalSpace/2+font->AscentInPixels();
  2426     TInt baseLineOffset=extraVerticalSpace/2+font->AscentInPixels();
  2335     TRect textRect( aRect );
  2427     // SERIES60 Background drawing.
       
  2428     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
       
  2429     MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
       
  2430     if (!cc)
       
  2431         {
       
  2432         cc = SkinBackgroundContext();
       
  2433         }
       
  2434 
       
  2435 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
  2436 
       
  2437     MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
       
  2438 
       
  2439 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
  2440 
       
  2441     if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
       
  2442         {
       
  2443 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
  2444         if ( transApi )
       
  2445             {
       
  2446             transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
       
  2447             }
       
  2448 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
  2449 
       
  2450         aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
       
  2451         aGc.SetPenStyle(CGraphicsContext::ESolidPen);
       
  2452 
       
  2453         if ( listbox )
       
  2454             {
       
  2455             AknsDrawUtils::Background( skin, cc, listbox, aGc, aRect );
       
  2456             }
       
  2457         else
       
  2458             {
       
  2459             aGc.Clear(aRect);
       
  2460             }
       
  2461 
       
  2462 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
       
  2463         if ( transApi )
       
  2464             {
       
  2465             transApi->StopDrawing();
       
  2466             }
       
  2467 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
  2468         }
       
  2469     if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
       
  2470         {
       
  2471         AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
       
  2472         }
       
  2473     DrawHighLight( aGc, aRect, aHighlight, skin );        
       
  2474     DrawMarkingModeIcons( aItemProperties, aGc, itemRect );
       
  2475     TRect textRect( itemRect );
       
  2476     textRect.iBr.iX = itemRect.iTl.iX;    
  2336     TRect textMRect; // textrect with margins.
  2477     TRect textMRect; // textrect with margins.
  2337     textRect.iBr.iX=aRect.iTl.iX;
       
  2338     TInt column=0;
  2478     TInt column=0;
  2339     TPtrC text;
  2479     TPtrC text;
  2340 
  2480 
  2341     TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText;
  2481     TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText;
  2342 
  2482 
  2343     // Turned the drawing to multipass algorithm, because optionalcolumns drawing will
  2483     // Turned the drawing to multipass algorithm, because optionalcolumns drawing will
  2344     // be too difficult to do without - and this is cleaner solution.
  2484     // be too difficult to do without - and this is cleaner solution.
  2345     
  2485     
  2346     // pass 1, figures out x-coordinates for columns.
  2486     // pass 1, figures out x-coordinates for columns.
  2347     TInt x = aRect.iTl.iX;
  2487     TInt x = itemRect.iTl.iX;
  2348     TBool mirror = AknLayoutUtils::LayoutMirrored();
  2488     TBool mirror = AknLayoutUtils::LayoutMirrored();
  2349     if (mirror)
  2489     if (mirror)
  2350         {
  2490         {
  2351         x = aRect.iBr.iX;
  2491         x = itemRect.iBr.iX;
  2352         }
  2492         }
  2353     TInt maxx = x;
  2493     TInt maxx = x;
  2354     while(column <= lastColumn)
  2494     while(column <= lastColumn)
  2355         {
  2495         {
  2356         // order of instructions is important here, do not change.
  2496         // order of instructions is important here, do not change.
  2411         column++;
  2551         column++;
  2412         }
  2552         }
  2413 
  2553 
  2414     // pass 3 drawing
  2554     // pass 3 drawing
  2415 
  2555 
  2416     // SERIES60 Background drawing.
  2556 
  2417     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
       
  2418     MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
       
  2419     if (!cc)
       
  2420         {
       
  2421         cc = SkinBackgroundContext();
       
  2422         }
       
  2423 
       
  2424     // aRect is list item's rect, width of which is smaller than width of the list
       
  2425     // with a scroll bar. List needs to draw under scroll bar anyway, so we need to
       
  2426     // modify given rect here.
       
  2427     TRect r(aRect);
       
  2428     
       
  2429     CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
       
  2430 
       
  2431 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
  2432 
       
  2433     MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
       
  2434 
       
  2435 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
  2436 
       
  2437     if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
       
  2438         {
       
  2439 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
  2440         if ( transApi )
       
  2441             {
       
  2442             transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
       
  2443             }
       
  2444 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
  2445 
       
  2446         aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
       
  2447         aGc.SetPenStyle(CGraphicsContext::ESolidPen);
       
  2448 
       
  2449         if ( listbox )
       
  2450             {
       
  2451             AknsDrawUtils::Background( skin, cc, listbox, aGc, aRect );
       
  2452             }
       
  2453         else
       
  2454             {
       
  2455             aGc.Clear(aRect);
       
  2456             }
       
  2457 
       
  2458 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
       
  2459         if ( transApi )
       
  2460             {
       
  2461             transApi->StopDrawing();
       
  2462             }
       
  2463 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
  2464         }
       
  2465     
       
  2466  // LISTBOX LINES NEED TO BE DRAWN HERE.
       
  2467     DrawHighLight( aGc, aRect, aHighlight, skin );
       
  2468 
  2557 
  2469 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  2558 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  2470     if ( transApi )
  2559     if ( transApi )
  2471         {
  2560         {
  2472         transApi->StartDrawing( MAknListBoxTfxInternal::EListItem );
  2561         transApi->StartDrawing( MAknListBoxTfxInternal::EListItem );
  2473         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  2562         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  2474         aGc.SetClippingRect( view->ViewRect() );
  2563         aGc.SetClippingRect( view->ViewRect() );
  2475         }
  2564         }
  2476 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  2565 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  2477 
       
  2478     // The column draw loop
  2566     // The column draw loop
  2479     column = 0;
  2567     column = 0;
  2480     FOREVER
  2568     FOREVER
  2481         {
  2569         {
  2482         if (column > lastColumn) break;
  2570         if (column > lastColumn) break;
  2525                 if (aHighlight)
  2613                 if (aHighlight)
  2526                     {
  2614                     {
  2527                     aGc.SetPenColor(aColors.iHighlightedText);
  2615                     aGc.SetPenColor(aColors.iHighlightedText);
  2528                     aGc.SetBrushColor(aColors.iHighlightedBack);    
  2616                     aGc.SetBrushColor(aColors.iHighlightedBack);    
  2529                     }
  2617                     }
  2530 
  2618                 CListBoxView* view = listbox->View();
  2531                 if (AknsUtils::AvkonSkinEnabled() && iExtension)
  2619                 TBool useOverrideColor = view->ItemDrawer()->Flags() & CListItemDrawer::EUseOverrideSkinTextColor;
       
  2620                 if ( AknsUtils::AvkonSkinEnabled() && !useOverrideColor )
  2532                     {
  2621                     {
  2533                     if (iExtension->iTextColor != NULL)
  2622                     if ( iExtension->iTextColor != NULL )
  2534                         {
  2623                         {
  2535                         aGc.SetPenColor(iExtension->iTextColor);
  2624                         aGc.SetPenColor(iExtension->iTextColor);
  2536                         }
  2625                         }
  2537 
  2626                     if ( aHighlight && iExtension->iHighlightedTextColor != NULL )
  2538                     if (aHighlight && iExtension->iHighlightedTextColor != NULL)
       
  2539                         {
  2627                         {
  2540                         aGc.SetPenColor(iExtension->iHighlightedTextColor);
  2628                         aGc.SetPenColor(iExtension->iHighlightedTextColor);
  2541                         }
  2629                         }
  2542                     }
  2630                     }
  2543 
  2631 
  2659                     bmpRect.iTl=textMRect.iTl;
  2747                     bmpRect.iTl=textMRect.iTl;
  2660                     if (index>=0 && IconArray())
  2748                     if (index>=0 && IconArray())
  2661                         {
  2749                         {
  2662                         CGulIcon* icon=(*IconArray())[index];
  2750                         CGulIcon* icon=(*IconArray())[index];
  2663                         
  2751                         
  2664                         if ( iExtension
  2752                         if ( iExtension->iSubCellIconSize[column] != TSize(0,0) )
  2665                              && iExtension->iSubCellIconSize[column] != TSize(0,0) )
       
  2666                             {
  2753                             {
  2667                             TSize wanted( iExtension->iSubCellIconSize[column] );
  2754                             TSize wanted( iExtension->iSubCellIconSize[column] );
  2668                             TSize got( icon->Bitmap()->SizeInPixels() );
  2755                             TSize got( icon->Bitmap()->SizeInPixels() );
  2669                             
  2756                             
  2670                             // correct w or h is enough
  2757                             // correct w or h is enough
  2733         transApi->StopDrawing();
  2820         transApi->StopDrawing();
  2734         }
  2821         }
  2735 #endif //RD_UI_TRANSITION_EFFECTS_LIST
  2822 #endif //RD_UI_TRANSITION_EFFECTS_LIST
  2736     }
  2823     }
  2737 
  2824 
       
  2825 // -----------------------------------------------------------------------------
       
  2826 // CColumnListBoxData::DrawMarkingModeIcons
       
  2827 // -----------------------------------------------------------------------------
       
  2828 //
       
  2829 void CColumnListBoxData::DrawMarkingModeIcons( 
       
  2830                 const TListItemProperties& aProperties,
       
  2831                 CWindowGc& aGc,
       
  2832                 TRect& aItemRect ) const
       
  2833     {
       
  2834     CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
       
  2835     TRect textRect( aItemRect );
       
  2836     
       
  2837     if ( listbox->View() && listbox->View()->ItemDrawer() )
       
  2838         {
       
  2839         if ( listbox->View()->ItemDrawer()->Flags() 
       
  2840                 & CListItemDrawer::EMarkingModeEnabled &&
       
  2841                 !aProperties.IsSelectionHidden() &&
       
  2842                 iExtension->iMarkingIconArray &&
       
  2843                 iExtension->iMarkingIconArray->Count() == 
       
  2844                         KMarkingModeIconArraySize )          
       
  2845             {
       
  2846             if ( AknLayoutUtils::LayoutMirrored() )
       
  2847                 {
       
  2848                 textRect.iBr.iX -= 
       
  2849                     AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 
       
  2850                         0 ).LayoutLine().ir;
       
  2851                 }
       
  2852             else
       
  2853                 {
       
  2854                 textRect.iTl.iX += 
       
  2855                     AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 
       
  2856                         0 ).LayoutLine().il;
       
  2857                 }            
       
  2858             TAknLayoutRect layoutRect;
       
  2859             layoutRect.LayoutRect( aItemRect, 
       
  2860                 AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
       
  2861             
       
  2862             // unchecked icon
       
  2863             CGulIcon* icon = (*iExtension->iMarkingIconArray)[1];
       
  2864             
       
  2865             if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) )
       
  2866                 {
       
  2867                 icon = (*iExtension->iMarkingIconArray)[0];
       
  2868                 }
       
  2869             CFbsBitmap* bitmap = icon->Bitmap();
       
  2870             
       
  2871             if ( bitmap )
       
  2872                 {
       
  2873                 TSize size( bitmap->SizeInPixels() ); // set size if not already
       
  2874                 TSize targetSize( layoutRect.Rect().Size() );
       
  2875                 
       
  2876                 if ( size.iWidth != targetSize.iWidth &&
       
  2877                      size.iHeight != targetSize.iHeight )
       
  2878                     {
       
  2879                     AknIconUtils::SetSize(
       
  2880                         bitmap,
       
  2881                         targetSize,
       
  2882                         EAspectRatioPreservedAndUnusedSpaceRemoved ); 
       
  2883                     }
       
  2884 
       
  2885                 aGc.BitBltMasked( layoutRect.Rect().iTl,
       
  2886                                   bitmap,
       
  2887                                   TRect( layoutRect.Rect().Size() ),
       
  2888                                   icon->Mask(),
       
  2889                                   EFalse );
       
  2890                 }   
       
  2891             aItemRect = textRect;
       
  2892             }
       
  2893         }
       
  2894     }
  2738 
  2895 
  2739 void CColumnListBoxData::AddColumnL(TInt aColumn)
  2896 void CColumnListBoxData::AddColumnL(TInt aColumn)
  2740 //
  2897 //
  2741 //    Add a column's worth of data
  2898 //    Add a column's worth of data
  2742 //
  2899 //
  2859 
  3016 
  2860 EXPORT_C void CColumnListBoxData::SetColumnFontForRowL(TInt aRow,
  3017 EXPORT_C void CColumnListBoxData::SetColumnFontForRowL(TInt aRow,
  2861                                                        TInt aColumn,
  3018                                                        TInt aColumn,
  2862                                                        const CFont* aFont)
  3019                                                        const CFont* aFont)
  2863     {
  3020     {
       
  3021 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2864     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3022     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  2865     if (!iExtension) return;
       
  2866     TInt index = 0;
  3023     TInt index = 0;
  2867     iExtension->FindRowAndColumnIndexOrAddL(index,aRow,aColumn);
  3024     iExtension->FindRowAndColumnIndexOrAddL(index,aRow,aColumn);
  2868     iExtension->At(index).iFont=aFont;
  3025     iExtension->At(index).iFont=aFont;
  2869     }
  3026     }
  2870 
  3027 
  2871 EXPORT_C const CFont* 
  3028 EXPORT_C const CFont* 
  2872 CColumnListBoxData::RowAndColumnFont(TInt aRow,TInt aColumn) const
  3029 CColumnListBoxData::RowAndColumnFont(TInt aRow,TInt aColumn) const
  2873     {
  3030     {
  2874     if (!iExtension) return 0;
  3031 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2875     TInt index = 0;
  3032     TInt index = 0;
  2876     if (iExtension->FindRowAndColumnIndex(index,aRow,aColumn)!=0)
  3033     if (iExtension->FindRowAndColumnIndex(index,aRow,aColumn)!=0)
  2877         return 0;
  3034         return 0;
  2878     return(iExtension->At(index).iFont);
  3035     return(iExtension->At(index).iFont);
  2879     }
  3036     }
  2880 
  3037 
  2881 void CColumnListBoxData::SetCurrentItemIndex(TInt aIndex)
  3038 void CColumnListBoxData::SetCurrentItemIndex(TInt aIndex)
  2882     {
  3039     {
       
  3040 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2883     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3041     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  2884     if( iExtension->iCurrentRow != aIndex )
  3042     if( iExtension->iCurrentRow != aIndex )
  2885         {
  3043         {
  2886         iExtension->iAnimFlags.Set( CColumnListBoxDataExtension::EFlagUpdateBg );
  3044         iExtension->iAnimFlags.Set( CColumnListBoxDataExtension::EFlagUpdateBg );
  2887         }
  3045         }
  2904     const CGraphicsContext::TTextAlign aAlign,
  3062     const CGraphicsContext::TTextAlign aAlign,
  2905     const CFont& aFont,
  3063     const CFont& aFont,
  2906     const TBool aHighlight,
  3064     const TBool aHighlight,
  2907     const TBool aIsTextClipped ) const
  3065     const TBool aIsTextClipped ) const
  2908     {
  3066     {
       
  3067 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2909     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3068     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  2910     TBool marqueeDisabled =
  3069     TBool marqueeDisabled =
  2911         static_cast<CEikListBox*>(
  3070         static_cast<CEikListBox*>(
  2912             Control() )->View()->ItemDrawer()->Flags() & CListItemDrawer::EDisableMarquee;
  3071             Control() )->View()->ItemDrawer()->Flags() & CListItemDrawer::EDisableMarquee;
  2913 
  3072 
  2931     }
  3090     }
  2932 
  3091 
  2933 
  3092 
  2934 EXPORT_C void CColumnListBoxData::SetMarqueeParams(const TInt aLoops, const TInt aScrollAmount, const TInt aScrollDelay)
  3093 EXPORT_C void CColumnListBoxData::SetMarqueeParams(const TInt aLoops, const TInt aScrollAmount, const TInt aScrollDelay)
  2935     {
  3094     {
       
  3095 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2936     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3096     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  2937     if ( iExtension->iMarquee )
  3097     if ( iExtension->iMarquee )
  2938         {
  3098         {
  2939         iExtension->iMarquee->SetLoops( aLoops );
  3099         iExtension->iMarquee->SetLoops( aLoops );
  2940         iExtension->iMarquee->SetSpeedInPixels( aScrollAmount );
  3100         iExtension->iMarquee->SetSpeedInPixels( aScrollAmount );
  2949     }
  3109     }
  2950     
  3110     
  2951 EXPORT_C void CColumnListBoxData::SetMarqueeParams(const TInt aLoops, const TInt aScrollAmount, 
  3111 EXPORT_C void CColumnListBoxData::SetMarqueeParams(const TInt aLoops, const TInt aScrollAmount, 
  2952                                                    const TInt aScrollDelay, const TInt aInterval)
  3112                                                    const TInt aScrollDelay, const TInt aInterval)
  2953     {
  3113     {
       
  3114 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2954     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3115     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  2955     if ( iExtension->iMarquee )
  3116     if ( iExtension->iMarquee )
  2956         {
  3117         {
  2957         iExtension->iMarquee->SetInterval( aInterval );
  3118         iExtension->iMarquee->SetInterval( aInterval );
  2958         iExtension->i2ndLineMarquee->SetInterval( aInterval );
  3119         iExtension->i2ndLineMarquee->SetInterval( aInterval );
  2962 
  3123 
  2963 
  3124 
  2964 EXPORT_C
  3125 EXPORT_C
  2965 void CColumnListBoxData::SetSubCellIconSize(TInt aIndex, TSize aSize)
  3126 void CColumnListBoxData::SetSubCellIconSize(TInt aIndex, TSize aSize)
  2966     {
  3127     {
       
  3128 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2967     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3129     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  2968     if (iExtension && aIndex < 6 && aIndex >= 0)
  3130     if ( aIndex < 6 && aIndex >= 0 )
  2969         {
  3131         {
  2970         iExtension->iSubCellIconSize[aIndex] = aSize;
  3132         iExtension->iSubCellIconSize[aIndex] = aSize;
  2971         }
  3133         }
  2972     }
  3134     }
  2973 
  3135 
  2974 TSize CColumnListBoxData::GetSubCellIconSize(TInt aIndex)
  3136 TSize CColumnListBoxData::GetSubCellIconSize(TInt aIndex)
  2975     {
  3137     {
  2976     if (iExtension && aIndex < 6 && aIndex >= 0)
  3138 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
       
  3139     if ( aIndex < 6 && aIndex >= 0 )
  2977         {
  3140         {
  2978         return iExtension->iSubCellIconSize[aIndex];
  3141         return iExtension->iSubCellIconSize[aIndex];
  2979         }
  3142         }
  2980     return TSize(0,0);
  3143     return TSize(0,0);
  2981     }
  3144     }
  2984 // CColumnListBoxData::HighlightAnim
  3147 // CColumnListBoxData::HighlightAnim
  2985 // -----------------------------------------------------------------------------
  3148 // -----------------------------------------------------------------------------
  2986 //
  3149 //
  2987 EXPORT_C const CAknsEffectAnim* CColumnListBoxData::HighlightAnim() const
  3150 EXPORT_C const CAknsEffectAnim* CColumnListBoxData::HighlightAnim() const
  2988     {
  3151     {
  2989     if( iExtension )
  3152 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  2990         return iExtension->iAnimation;
  3153     return iExtension->iAnimation;
  2991     return NULL;
       
  2992     }
  3154     }
  2993 
  3155 
  2994 // -----------------------------------------------------------------------------
  3156 // -----------------------------------------------------------------------------
  2995 // AboutToDrawHighlightAnim
  3157 // AboutToDrawHighlightAnim
  2996 // -----------------------------------------------------------------------------
  3158 // -----------------------------------------------------------------------------
  2997 //
  3159 //
  2998 EXPORT_C void CColumnListBoxData::AboutToDrawHighlightAnim() const
  3160 EXPORT_C void CColumnListBoxData::AboutToDrawHighlightAnim() const
  2999     {
  3161     {
  3000     if( !iExtension )
  3162 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3001         {
       
  3002         return;
       
  3003         }
       
  3004     if( !iExtension->iAnimation || !iExtension->iControl )
  3163     if( !iExtension->iAnimation || !iExtension->iControl )
  3005         {
  3164         {
  3006         return;
  3165         return;
  3007         }
  3166         }
  3008 
  3167 
  3027 // -----------------------------------------------------------------------------
  3186 // -----------------------------------------------------------------------------
  3028 //
  3187 //
  3029 EXPORT_C void CColumnListBoxData::SetHighlightAnimBackgroundDrawer(
  3188 EXPORT_C void CColumnListBoxData::SetHighlightAnimBackgroundDrawer(
  3030     MColumnListBoxAnimBackgroundDrawer* aDrawer )
  3189     MColumnListBoxAnimBackgroundDrawer* aDrawer )
  3031     {
  3190     {
       
  3191 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3032     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3192     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3033     if( iExtension )
  3193     iExtension->iHighlightBgDrawer = aDrawer;
  3034         {
       
  3035         iExtension->iHighlightBgDrawer = aDrawer;
       
  3036         }
       
  3037     }
  3194     }
  3038 
  3195 
  3039 // -----------------------------------------------------------------------------
  3196 // -----------------------------------------------------------------------------
  3040 // CColumnListBoxData::SetItemCellSize
  3197 // CColumnListBoxData::SetItemCellSize
  3041 // -----------------------------------------------------------------------------
  3198 // -----------------------------------------------------------------------------
  3042 //
  3199 //
  3043 EXPORT_C void CColumnListBoxData::SetItemCellSize( const TSize& aSizeInPixels )
  3200 EXPORT_C void CColumnListBoxData::SetItemCellSize( const TSize& aSizeInPixels )
  3044     {
  3201     {
       
  3202 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3045     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3203     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3046     if( iExtension )
  3204  
  3047         {
  3205     if( iExtension->iAnimSize != aSizeInPixels )
  3048         if( iExtension->iAnimSize != aSizeInPixels )
  3206         {
  3049             {
  3207         iExtension->Play();
  3050             iExtension->Play();
  3208         }
  3051             }
  3209     iExtension->iAnimSize = aSizeInPixels;
  3052         iExtension->iAnimSize = aSizeInPixels;
       
  3053         }
       
  3054     }
  3210     }
  3055 
  3211 
  3056 // -----------------------------------------------------------------------------
  3212 // -----------------------------------------------------------------------------
  3057 // CColumnListBoxData::HasHighlightAnim
  3213 // CColumnListBoxData::HasHighlightAnim
  3058 // -----------------------------------------------------------------------------
  3214 // -----------------------------------------------------------------------------
  3059 //
  3215 //
  3060 EXPORT_C TBool CColumnListBoxData::HasHighlightAnim() const
  3216 EXPORT_C TBool CColumnListBoxData::HasHighlightAnim() const
  3061     {
  3217     {
  3062     if( !iExtension )
  3218 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3063         return EFalse;
       
  3064     if( !iExtension->iAnimation )
  3219     if( !iExtension->iAnimation )
  3065         return EFalse;
  3220         return EFalse;
  3066     return ETrue;
  3221     return ETrue;
  3067     }
  3222     }
  3068 
  3223 
  3071 // -----------------------------------------------------------------------------
  3226 // -----------------------------------------------------------------------------
  3072 //
  3227 //
  3073 EXPORT_C TBool CColumnListBoxData::DrawHighlightAnim(
  3228 EXPORT_C TBool CColumnListBoxData::DrawHighlightAnim(
  3074         CBitmapContext& aGc, const TRect& aRect ) const
  3229         CBitmapContext& aGc, const TRect& aRect ) const
  3075     {
  3230     {
  3076     if( !iExtension )
  3231 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3077         return EFalse;
       
  3078 
       
  3079     if( !iExtension->iAnimation )
  3232     if( !iExtension->iAnimation )
  3080         return EFalse;
  3233         return EFalse;
  3081 
  3234 
  3082     return iExtension->SyncAndDrawAnim( aGc, aRect );
  3235     return iExtension->SyncAndDrawAnim( aGc, aRect );
  3083     }
  3236     }
  3086 // CColumnListBoxData::FocusGained
  3239 // CColumnListBoxData::FocusGained
  3087 // -----------------------------------------------------------------------------
  3240 // -----------------------------------------------------------------------------
  3088 //
  3241 //
  3089 void CColumnListBoxData::FocusGained()
  3242 void CColumnListBoxData::FocusGained()
  3090     {
  3243     {
       
  3244 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3091     iExtension->FocusGained();
  3245     iExtension->FocusGained();
  3092     }
  3246     }
  3093 
  3247 
  3094 // -----------------------------------------------------------------------------
  3248 // -----------------------------------------------------------------------------
  3095 // CColumnListBoxData::FocusLost
  3249 // CColumnListBoxData::FocusLost
  3096 // -----------------------------------------------------------------------------
  3250 // -----------------------------------------------------------------------------
  3097 //
  3251 //
  3098 void CColumnListBoxData::FocusLost()
  3252 void CColumnListBoxData::FocusLost()
  3099     {
  3253     {
       
  3254 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3100     iExtension->FocusLost();
  3255     iExtension->FocusLost();
  3101     }
  3256     }
  3102 
  3257 
  3103 void CColumnListBoxData::HandleResourceChange( TInt aType )
  3258 void CColumnListBoxData::HandleResourceChange( TInt aType )
  3104     {
  3259     {
       
  3260 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3105     _AKNTRACE( "[%s][%s] aType = %d", "CColumnListBoxData", __FUNCTION__, aType  );
  3261     _AKNTRACE( "[%s][%s] aType = %d", "CColumnListBoxData", __FUNCTION__, aType  );
  3106     // Animation is skin dependent, whenever skin changes animation changes
  3262     // Animation is skin dependent, whenever skin changes animation changes
  3107     // too.
  3263     // too.
  3108     if( KAknsMessageSkinChange == aType )
  3264     if( KAknsMessageSkinChange == aType )
  3109         {
  3265         {
  3110         iExtension->SkinChanged();
  3266         TRAP_IGNORE( iExtension->SkinChangedL() );
  3111         }
  3267         }
  3112     else if(aType == KEikDynamicLayoutVariantSwitch)
  3268     else if(aType == KEikDynamicLayoutVariantSwitch)
  3113         {
  3269         {
  3114         // What is under highlight may have changed -> we need to update
  3270         // What is under highlight may have changed -> we need to update
  3115         // highlight background to animation.
  3271         // highlight background to animation.
  3157         }
  3313         }
  3158     }
  3314     }
  3159 
  3315 
  3160 void CColumnListBoxData::SetESSTextColor(TRgb aTextColor)
  3316 void CColumnListBoxData::SetESSTextColor(TRgb aTextColor)
  3161     {
  3317     {
  3162     if (iExtension)
  3318 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3163         iExtension->iTextColor = aTextColor;
  3319     iExtension->iTextColor = aTextColor;
  3164     }
  3320     }
  3165 
  3321 
  3166 void CColumnListBoxData::SetESSHighlightedTextColor(TRgb aHighlightedTextColor)
  3322 void CColumnListBoxData::SetESSHighlightedTextColor(TRgb aHighlightedTextColor)
  3167     {
  3323     {
  3168     if (iExtension)
  3324 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3169         iExtension->iHighlightedTextColor = aHighlightedTextColor;
  3325     iExtension->iHighlightedTextColor = aHighlightedTextColor;
  3170     }
  3326     }
  3171 
  3327 
  3172 EXPORT_C void CColumnListBoxData::SetColumnUnderlined( TBitFlags32 aUnderlinedColumns )
  3328 EXPORT_C void CColumnListBoxData::SetColumnUnderlined( TBitFlags32 aUnderlinedColumns )
  3173     {
  3329     {
  3174     if ( iExtension )
  3330 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3175         {
  3331     iExtension->iUnderlineFlagSet = ETrue;
  3176         iExtension->iUnderlineFlagSet = ETrue;
  3332     iExtension->iUnderlineFlags   = aUnderlinedColumns;
  3177         iExtension->iUnderlineFlags   = aUnderlinedColumns;
       
  3178         }
       
  3179     }
  3333     }
  3180 
  3334 
  3181 void CColumnListBoxData::SetUnderlineStyle( TListItemProperties aProperties,
  3335 void CColumnListBoxData::SetUnderlineStyle( TListItemProperties aProperties,
  3182                                             CWindowGc& aGc,
  3336                                             CWindowGc& aGc,
  3183                                             TInt aColumn ) const
  3337                                             TInt aColumn ) const
  3184     {
  3338     {
  3185     if ( !iExtension )
  3339 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3186         {
       
  3187         return;
       
  3188         }
       
  3189 
       
  3190     if ( !iExtension->iUnderlineFlagSet )
  3340     if ( !iExtension->iUnderlineFlagSet )
  3191         {
  3341         {
  3192         // underlining is already either on or off and
  3342         // underlining is already either on or off and
  3193         // hardcoded off turning will ensure old style
  3343         // hardcoded off turning will ensure old style
  3194         // behaviour
  3344         // behaviour
  3211 // CColumnListBoxData::ResetSLSubCellArray
  3361 // CColumnListBoxData::ResetSLSubCellArray
  3212 // -----------------------------------------------------------------------------
  3362 // -----------------------------------------------------------------------------
  3213 //
  3363 //
  3214 EXPORT_C void CColumnListBoxData::ResetSLSubCellArray()
  3364 EXPORT_C void CColumnListBoxData::ResetSLSubCellArray()
  3215     {
  3365     {
  3216     if ( !iExtension )
  3366 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3217         {
       
  3218         return;
       
  3219         }
       
  3220 
       
  3221     iExtension->iMarginRect = TRect::EUninitialized;
  3367     iExtension->iMarginRect = TRect::EUninitialized;
  3222     if ( iExtension && iExtension->iUseLayoutData )
  3368     if ( iExtension->iUseLayoutData )
  3223         {
  3369         {
  3224         iExtension->iUseLayoutData = EFalse;
  3370         iExtension->iUseLayoutData = EFalse;
  3225 #ifdef RD_UI_TRANSITION_EFFECTS_LIST 
  3371 #ifdef RD_UI_TRANSITION_EFFECTS_LIST 
  3226         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  3372         CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
  3227         MAknListBoxTfxInternal* transApi =
  3373         MAknListBoxTfxInternal* transApi =
  3245 // -----------------------------------------------------------------------------
  3391 // -----------------------------------------------------------------------------
  3246 //
  3392 //
  3247 EXPORT_C void CColumnListBoxData::SetGraphicSubCellL(TInt aSubCell,
  3393 EXPORT_C void CColumnListBoxData::SetGraphicSubCellL(TInt aSubCell,
  3248                                                    const TAknWindowLineLayout &aGraphicLayout)       
  3394                                                    const TAknWindowLineLayout &aGraphicLayout)       
  3249     {
  3395     {
       
  3396 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3250     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3397     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3251     if (!iExtension) return;
       
  3252     TInt index = 0;
  3398     TInt index = 0;
  3253     iExtension->FindSLSubCellIndexOrAddL(index,aSubCell);
  3399     iExtension->FindSLSubCellIndexOrAddL(index,aSubCell);
  3254     iExtension->AtSL(index).iTextLayout=NULL;
  3400     iExtension->AtSL(index).iTextLayout=NULL;
  3255     iExtension->AtSL(index).iGraphicLayout=aGraphicLayout;
  3401     iExtension->AtSL(index).iGraphicLayout=aGraphicLayout;
  3256     iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLGraphic;
  3402     iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLGraphic;
  3294 // -----------------------------------------------------------------------------
  3440 // -----------------------------------------------------------------------------
  3295 //
  3441 //
  3296 EXPORT_C void CColumnListBoxData::SetTextSubCellL(TInt aSubCell,
  3442 EXPORT_C void CColumnListBoxData::SetTextSubCellL(TInt aSubCell,
  3297                                                 const TAknTextLineLayout &aTextLayout)
  3443                                                 const TAknTextLineLayout &aTextLayout)
  3298     {
  3444     {
       
  3445 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3299     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3446     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3300     if (!iExtension) return;
       
  3301     TInt index = 0;
  3447     TInt index = 0;
  3302     iExtension->FindSLSubCellIndexOrAddL(index,aSubCell);
  3448     iExtension->FindSLSubCellIndexOrAddL(index,aSubCell);
  3303     iExtension->AtSL(index).iTextLayout=aTextLayout;
  3449     iExtension->AtSL(index).iTextLayout=aTextLayout;
  3304     iExtension->AtSL(index).iGraphicLayout=NULL;
  3450     iExtension->AtSL(index).iGraphicLayout=NULL;
  3305     iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLText;
  3451     iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLText;
  3344 //
  3490 //
  3345 EXPORT_C void CColumnListBoxData::SetConditionalSubCellL(TInt aSubCell,
  3491 EXPORT_C void CColumnListBoxData::SetConditionalSubCellL(TInt aSubCell,
  3346                                                          const TAknTextLineLayout &aTextLayout,
  3492                                                          const TAknTextLineLayout &aTextLayout,
  3347                                                          TInt aAffectedSubCell)  
  3493                                                          TInt aAffectedSubCell)  
  3348     {
  3494     {
       
  3495 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3349     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3496     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3350     // iConditionValue of affected subcell (=text subcell, which has different layouts)
  3497     // iConditionValue of affected subcell (=text subcell, which has different layouts)
  3351     // contains index of graphical subcell, which existence should be checked first.
  3498     // contains index of graphical subcell, which existence should be checked first.
  3352     // This graphical subcell has in iConditionValue index of graphical subcell,
  3499     // This graphical subcell has in iConditionValue index of graphical subcell,
  3353     // which existence should be checked second etc. Each graphical subcell can
  3500     // which existence should be checked second etc. Each graphical subcell can
  3354     // affect only to 1 text subcell (or none).
  3501     // affect only to 1 text subcell (or none).
  3355 
  3502 
  3356     // for compabitility - needed at least for text wrapping
  3503     // for compabitility - needed at least for text wrapping
  3357     SetOptionalColumnL( aSubCell, ETrue );
  3504     SetOptionalColumnL( aSubCell, ETrue );
  3358     if (!iExtension) return;
       
  3359 
  3505 
  3360     TInt i = 0x01;
  3506     TInt i = 0x01;
  3361     i = i << aSubCell;
  3507     i = i << aSubCell;
  3362     iExtension->iConditionalCells = iExtension->iConditionalCells | i;
  3508     iExtension->iConditionalCells = iExtension->iConditionalCells | i;
  3363 
  3509 
  3480 // CColumnListBoxData::UsesScalableLayoutData
  3626 // CColumnListBoxData::UsesScalableLayoutData
  3481 // -----------------------------------------------------------------------------
  3627 // -----------------------------------------------------------------------------
  3482 //
  3628 //
  3483 TBool CColumnListBoxData::UsesScalableLayoutData() const
  3629 TBool CColumnListBoxData::UsesScalableLayoutData() const
  3484     {
  3630     {
  3485     if (iExtension)
  3631 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3486         return iExtension->iUseLayoutData;
  3632     return iExtension->iUseLayoutData;
  3487 
       
  3488     return EFalse;
       
  3489     }
  3633     }
  3490 
  3634 
  3491 // -----------------------------------------------------------------------------
  3635 // -----------------------------------------------------------------------------
  3492 // CColumnListBoxData::EnableStretching
  3636 // CColumnListBoxData::EnableStretching
  3493 // -----------------------------------------------------------------------------
  3637 // -----------------------------------------------------------------------------
  3494 //
  3638 //
  3495 void CColumnListBoxData::EnableStretching( const TBool aEnabled )
  3639 void CColumnListBoxData::EnableStretching( const TBool aEnabled )
  3496     {
  3640     {
  3497     if ( !iExtension )
  3641 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3498         {
       
  3499         return;
       
  3500         }
       
  3501         
       
  3502     iExtension->iStretchingEnabled = aEnabled;        
  3642     iExtension->iStretchingEnabled = aEnabled;        
  3503     }
  3643     }
  3504 
  3644 
  3505 #ifdef RD_LIST_STRETCH
  3645 #ifdef RD_LIST_STRETCH
  3506 // -----------------------------------------------------------------------------
  3646 // -----------------------------------------------------------------------------
  3507 // CColumnListBoxData::StretchingEnabled
  3647 // CColumnListBoxData::StretchingEnabled
  3508 // -----------------------------------------------------------------------------
  3648 // -----------------------------------------------------------------------------
  3509 //
  3649 //
  3510 EXPORT_C TBool CColumnListBoxData::StretchingEnabled() const
  3650 EXPORT_C TBool CColumnListBoxData::StretchingEnabled() const
  3511     {
  3651     {
  3512     if ( !iExtension )
  3652 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );      
  3513         {
       
  3514         return EFalse;
       
  3515         }
       
  3516         
       
  3517     return iExtension->iStretchingEnabled;        
  3653     return iExtension->iStretchingEnabled;        
  3518     }
  3654     }
  3519 
  3655 
  3520 #else
  3656 #else
  3521 // -----------------------------------------------------------------------------
  3657 // -----------------------------------------------------------------------------
  3537     TAknTextLineLayout* aLayouts, 
  3673     TAknTextLineLayout* aLayouts, 
  3538     TBool* aResults, 
  3674     TBool* aResults, 
  3539     const TDesC& aText, 
  3675     const TDesC& aText, 
  3540     const TRect& aItemRect ) const
  3676     const TRect& aItemRect ) const
  3541     {
  3677     {
       
  3678 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3542     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3679     _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ );
  3543 
  3680 
  3544     TInt column = 0;
  3681     TInt column = 0;
  3545     TInt column2;
  3682     TInt column2;
  3546     TInt subCellIndex;
  3683     TInt subCellIndex;
  3651 // CColumnListBoxData::SubCellsMightIntersect
  3788 // CColumnListBoxData::SubCellsMightIntersect
  3652 // -----------------------------------------------------------------------------
  3789 // -----------------------------------------------------------------------------
  3653 //
  3790 //
  3654 EXPORT_C void CColumnListBoxData::SubCellsMightIntersect( const TBool aMightIntersect )
  3791 EXPORT_C void CColumnListBoxData::SubCellsMightIntersect( const TBool aMightIntersect )
  3655     {
  3792     {
       
  3793 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3656     iExtension->iSubCellsMightIntersect = aMightIntersect;
  3794     iExtension->iSubCellsMightIntersect = aMightIntersect;
  3657     }
  3795     }
  3658     
  3796     
  3659 void CColumnListBoxDataExtension::CreateColorBitmapsL()
  3797 void CColumnListBoxDataExtension::CreateColorBitmapsL()
  3660     {
  3798     {
  3751     }
  3889     }
  3752 
  3890 
  3753 
  3891 
  3754 EXPORT_C TUint32 CColumnListBoxData::CurrentItemTextWasClipped() const
  3892 EXPORT_C TUint32 CColumnListBoxData::CurrentItemTextWasClipped() const
  3755     {
  3893     {
  3756     return iExtension ? iExtension->iClippedColumns : 0;
  3894 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
       
  3895     return iExtension->iClippedColumns;
  3757     }
  3896     }
  3758 
  3897 
  3759 TBool CColumnListBoxData::KineticScrollingEnabled() const
  3898 TBool CColumnListBoxData::KineticScrollingEnabled() const
  3760     {
  3899     {
  3761     if ( iExtension )
  3900 	__ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) );
  3762         {
  3901     return iExtension->iKineticScrolling;       
  3763         return iExtension->iKineticScrolling;       
       
  3764         }
       
  3765     return EFalse;
       
  3766     }
  3902     }
  3767 
  3903 
  3768 
  3904 
  3769 // End of File
  3905 // End of File