camerauis/cameraapp/generic/common/src/CamCaptureSetupListItemDrawer.cpp
changeset 0 1ddebce53859
child 2 e8773a61782d
equal deleted inserted replaced
-1:000000000000 0:1ddebce53859
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  A drawer class for the capture setup list box items*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <eikappui.h>	// For CCoeAppUiBase
       
    21 #include <eikapp.h>		// For CEikApplication
       
    22 #include <AknUtils.h>
       
    23 #include <AknsSkinInstance.h>
       
    24 #include <AknsUtils.h>
       
    25 #include <barsread.h>
       
    26 #include <AknIconArray.h>
       
    27 #include <gulicon.h>
       
    28 #include <AknsFrameBackgroundControlContext.h>
       
    29 #include <AknsDrawUtils.h>
       
    30 #include <aknenv.h>
       
    31 #include <aknlayoutscalable_avkon.cdl.h> // list_highlight_pane_g1_cp1
       
    32 
       
    33 #include <cameraapp.mbg>
       
    34 #ifndef CAMERAAPP_PLUGIN_BUILD
       
    35   #include <cameraapp.rsg>
       
    36   #include <vgacamsettings.rsg>
       
    37 #else
       
    38   #include <gscamerapluginrsc.rsg>
       
    39 #endif //CAMERAAPP_PLUGIN_BUILD
       
    40 
       
    41 
       
    42 #include "CamCaptureSetupListItemDrawer.h"
       
    43 #include "CamCaptureSetupListBoxModel.h"
       
    44 #include "CamUtility.h"
       
    45 #include "camlogging.h"
       
    46 
       
    47 #include <aknlayoutscalable_apps.cdl.h>
       
    48 
       
    49 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
    50 #include <aknlistloadertfx.h>
       
    51 #include <aknlistboxtfxinternal.h>
       
    52 #endif //RD_UI_TRANSITION_EFFECTS_LIST
       
    53 
       
    54 // CONSTANTS
       
    55 static const TInt KRadioButtonSelectedIconIndex = 0;
       
    56 static const TInt KRadioButtonUnselectedIconIndex = 1;
       
    57 
       
    58 
       
    59 // ================= MEMBER FUNCTIONS =======================
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CCamCaptureSetupListItemDrawer::NewL
       
    63 // Two-phased constructor.
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 CCamCaptureSetupListItemDrawer* 
       
    67 CCamCaptureSetupListItemDrawer::NewL( MCamListboxModel& aListBoxModel )
       
    68     {
       
    69     CCamCaptureSetupListItemDrawer* self = new( ELeave ) 
       
    70                     CCamCaptureSetupListItemDrawer( aListBoxModel );               
       
    71     CleanupStack::PushL( self );
       
    72     self->ConstructL();
       
    73     CleanupStack::Pop( self );
       
    74     return self;
       
    75     }
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // CCamCaptureSetupListItemDrawer Destructor
       
    79 //
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 CCamCaptureSetupListItemDrawer::~CCamCaptureSetupListItemDrawer()
       
    83     {
       
    84     PRINT( _L("Camera => ~CCamCaptureSetupListItemDrawer") );
       
    85     if ( iRadioButtonIconArray )
       
    86         {
       
    87         delete iRadioButtonIconArray;
       
    88         iRadioButtonIconArray = NULL;
       
    89         }
       
    90     PRINT( _L("Camera <= ~CCamCaptureSetupListItemDrawer") );
       
    91     }
       
    92 
       
    93 // -----------------------------------------------------------------------------
       
    94 // CCamCaptureSetupListItemDrawer::CCamCaptureSetupListItemDrawer
       
    95 // C++ constructor
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 CCamCaptureSetupListItemDrawer
       
    99 ::CCamCaptureSetupListItemDrawer( MCamListboxModel& aListBoxModel )
       
   100   : iModel( aListBoxModel )
       
   101     {
       
   102 	}
       
   103 
       
   104 // ---------------------------------------------------------------------------
       
   105 // CCamCaptureSetupListItemDrawer::ConstructL
       
   106 // 2nd phase construction
       
   107 // ---------------------------------------------------------------------------
       
   108 //
       
   109 void CCamCaptureSetupListItemDrawer::ConstructL()
       
   110 	{    
       
   111 
       
   112 
       
   113     iCaptureSetupItemHeight = iModel.ListItemLayoutData().Rect().Height();
       
   114     
       
   115 
       
   116 	const TInt KIconArrayGranularity = 4;
       
   117 	iRadioButtonIconArray = 
       
   118                           new( ELeave ) CAknIconArray( KIconArrayGranularity );
       
   119     TResourceReader reader;
       
   120     
       
   121     CCoeEnv::Static()->CreateResourceReaderLC(reader, R_AVKON_SETTING_PAGE_RADIOBUTTON_ICONS);
       
   122 
       
   123     reader.ReadInt16(); //not needed, simple or complex
       
   124 
       
   125     HBufC* bmpFile = reader.ReadHBufCL();
       
   126     TInt count = reader.ReadInt16(); // count
       
   127    
       
   128     TInt32 bmpSelected = reader.ReadInt32();
       
   129     TInt32 bmpSelectedM = reader.ReadInt32();
       
   130     TInt32 bmp = reader.ReadInt32();
       
   131     TInt32 bmpM = reader.ReadInt32();
       
   132     CleanupStack::PopAndDestroy(); // reader
       
   133 
       
   134     CleanupStack::PushL(bmpFile);
       
   135 
       
   136     // create normally colored icons
       
   137     CreateIconAndAddToArrayL( iRadioButtonIconArray,
       
   138                               KAknsIIDQgnIndiRadiobuttOn,
       
   139                               EAknsCIQsnIconColorsCG14,
       
   140                               *bmpFile,
       
   141                               bmpSelected,
       
   142                               bmpSelectedM );
       
   143 
       
   144     CreateIconAndAddToArrayL( iRadioButtonIconArray,
       
   145                               KAknsIIDQgnIndiRadiobuttOff,
       
   146                               EAknsCIQsnIconColorsCG14,
       
   147                               *bmpFile,
       
   148                               bmp,
       
   149                               bmpM );
       
   150 
       
   151     // create highlight colored icons
       
   152     CreateIconAndAddToArrayL( iRadioButtonIconArray,
       
   153                               KAknsIIDQgnIndiRadiobuttOn,
       
   154                               EAknsCIQsnIconColorsCG18,
       
   155                               *bmpFile,
       
   156                               bmpSelected,
       
   157                               bmpSelectedM );
       
   158 
       
   159     CreateIconAndAddToArrayL( iRadioButtonIconArray,
       
   160                               KAknsIIDQgnIndiRadiobuttOff,
       
   161                               EAknsCIQsnIconColorsCG18,
       
   162                               *bmpFile,
       
   163                               bmp,
       
   164                               bmpM );
       
   165     
       
   166     const TSize radioButtonRectSize = 
       
   167         TSize( iModel.RadioButtonLayoutData().Rect().Width(),
       
   168                iModel.RadioButtonLayoutData().Rect().Height() );
       
   169     AknIconUtils::SetSize( 
       
   170         iRadioButtonIconArray->At( KRadioButtonSelectedIconIndex )->Bitmap(), 
       
   171                                    radioButtonRectSize );
       
   172     AknIconUtils::SetSize( 
       
   173         iRadioButtonIconArray->At( KRadioButtonUnselectedIconIndex )->Bitmap(), 
       
   174                                    radioButtonRectSize );
       
   175 
       
   176     
       
   177 	ReadLayout(); 
       
   178 	
       
   179     CleanupStack::PopAndDestroy(); // bmpfile
       
   180 
       
   181 	}
       
   182 
       
   183 // ---------------------------------------------------------------------------
       
   184 // CCamCaptureSetupListItemDrawer::MinimumCellSize
       
   185 // Calculate the minimum size of a cell
       
   186 // ---------------------------------------------------------------------------
       
   187 //
       
   188 TSize 
       
   189 CCamCaptureSetupListItemDrawer::MinimumCellSize() const
       
   190   {
       
   191   PRINT( _L("Camera => CCamCaptureSetupListItemDrawer::MinimumCellSize") );
       
   192 
       
   193   TSize cellSize;
       
   194   cellSize.iWidth = iModel.ListItemLayoutData().Rect().Width();
       
   195   cellSize.iHeight = iModel.ListItemLayoutData().Rect().Height();
       
   196 
       
   197 
       
   198   PRINT2( _L("Camera => CCamCaptureSetupListItemDrawer::MinimumCellSize, return (%d x %d)"), cellSize.iWidth, cellSize.iHeight );
       
   199   return cellSize;
       
   200   }
       
   201 
       
   202 // ---------------------------------------------------------------------------
       
   203 // CCamCaptureSetupListItemDrawer::DrawActualItem
       
   204 // Draw the highlight, bitmap, radio button and item text.
       
   205 // ---------------------------------------------------------------------------
       
   206 //
       
   207 void CCamCaptureSetupListItemDrawer::DrawActualItem( TInt aItemIndex, 
       
   208                                                     const TRect& aActualItemRect,
       
   209                                                     TBool aItemIsCurrent,
       
   210                                                     TBool /*aViewIsEmphasized*/,
       
   211                                                     TBool /*aViewIsDimmed*/,
       
   212                                                     TBool aItemIsSelected ) const
       
   213     { 
       
   214 	
       
   215 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
   216     MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc );
       
   217     if ( transApi )
       
   218         {
       
   219         transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
       
   220         }
       
   221 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
   222     // Draw unhighlighted rectangle that encapsulates the item text and bitmap.
       
   223 	DrawItemRect( aActualItemRect );       
       
   224 
       
   225 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
       
   226    	if ( transApi )
       
   227    	    {
       
   228         transApi->StopDrawing();
       
   229         }
       
   230 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
   231     // If this item is currently selected, draw highlight        
       
   232 	if ( aItemIsCurrent )
       
   233 		{
       
   234 		DrawHighlight( aActualItemRect );
       
   235 		}
       
   236 
       
   237 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
       
   238    	if ( transApi )
       
   239    	    {
       
   240         transApi->StartDrawing( MAknListBoxTfxInternal::EListItem );
       
   241         }
       
   242 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
   243     // Determine drawing colour for text and radio buttons, from current skin
       
   244     // ...text colour index if this item is not selected.
       
   245     TRgb color;
       
   246     TAknsQsnTextColorsIndex index = EAknsCIQsnTextColorsCG7;
       
   247     // ...text colour index if this item is selected.
       
   248     if( Flags() & CListItemDrawer::ESingleClickDisabledHighlight )
       
   249         {
       
   250         aItemIsSelected = aItemIsCurrent;
       
   251         aItemIsCurrent = EFalse;
       
   252         }
       
   253 
       
   254     if ( aItemIsCurrent )
       
   255 		{
       
   256         index = EAknsCIQsnTextColorsCG10; // highlighted text colour
       
   257         }
       
   258 
       
   259     // ...get colour from current skin for text colour index
       
   260 	MAknsSkinInstance *skin = AknsUtils::SkinInstance();	   
       
   261     AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, index );
       
   262 
       
   263     // ...make sure text/bitmap background colour does not overwrite skin background colour
       
   264 	iGc->SetBrushStyle( CGraphicsContext::ENullBrush );
       
   265 	
       
   266 	if ( !iModel.ShootingModeListBox() )
       
   267         {
       
   268 
       
   269         // Draw text
       
   270         // ...Create a text layout object for drawing the text
       
   271         // ...inside of the list item's rectangle
       
   272         TAknLayoutText layoutText;
       
   273         layoutText.LayoutText( aActualItemRect, iTxtLayout );  
       
   274         // ...Pass the text to be drawn, into the text layout object
       
   275         // ...and draw it.    
       
   276         layoutText.DrawText( *iGc, iModel.ItemText( aItemIndex ), 
       
   277                              ETrue, color );
       
   278         // Draw the bitmap.
       
   279         // ...Create a rect layout object for drawing the bitmap
       
   280         // ...inside of the list item's rectangle.
       
   281         TAknLayoutRect layoutRect;
       
   282         layoutRect.LayoutRect( aActualItemRect, iBmpLayout );
       
   283         // ...Pass the bitmap to be drawn, into the rect layout object
       
   284         // ...and draw it.
       
   285         CFbsBitmap* bitmap = iModel.Bitmap( aItemIndex );
       
   286         // if the item has a bitmap
       
   287         if ( bitmap )
       
   288             {
       
   289             CFbsBitmap* bitmapMask = iModel.BitmapMask( aItemIndex );
       
   290             layoutRect.DrawImage( *iGc, bitmap, bitmapMask );
       
   291             }        
       
   292 
       
   293 
       
   294         DrawRadioButton( aActualItemRect, aItemIsSelected, color );
       
   295         }
       
   296     else 
       
   297         {
       
   298         // draw without radiobuttons
       
   299         
       
   300         // Draw text
       
   301         // ...Create a text layout object for drawing the text
       
   302         // ...inside of the list item's rectangle
       
   303         TAknLayoutText layoutText;
       
   304         layoutText.LayoutText( aActualItemRect, iTxtWithRbLayout );
       
   305         // ...Pass the text to be drawn, into the text layout object
       
   306         // ...and draw it.    
       
   307         layoutText.DrawText( *iGc, iModel.ItemText( aItemIndex ), ETrue, color );
       
   308 
       
   309         // Draw the bitmap.
       
   310         // ...Create a rect layout object for drawing the bitmap
       
   311         // ...inside of the list item's rectangle.
       
   312         TAknLayoutRect layoutRect;
       
   313         layoutRect.LayoutRect( aActualItemRect, iBmpWithRbLayout );
       
   314         // ...Pass the bitmap to be drawn, into the rect layout object
       
   315         // ...and draw it.
       
   316         CFbsBitmap* bitmap = iModel.Bitmap( aItemIndex );
       
   317         // if the item has a bitmap
       
   318         if ( bitmap )
       
   319             {
       
   320             CFbsBitmap* bitmapMask = iModel.BitmapMask( aItemIndex );
       
   321             layoutRect.DrawImage( *iGc, bitmap, bitmapMask );
       
   322             }        
       
   323 
       
   324         
       
   325         }
       
   326 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
   327     if ( transApi )
       
   328         {
       
   329         transApi->StopDrawing();
       
   330         }
       
   331 #endif //RD_UI_TRANSITION_EFFECTS_LIST
       
   332     }
       
   333 
       
   334 // ---------------------------------------------------------------------------
       
   335 // CCamCaptureSetupListItemDrawer::DrawHighlight
       
   336 // Draw the highlight as a bitmap before any other part of the item
       
   337 // ---------------------------------------------------------------------------
       
   338 //
       
   339 void CCamCaptureSetupListItemDrawer::DrawHighlight( const TRect& aActualItemRect ) const
       
   340     {
       
   341     if( Flags() & CListItemDrawer::ESingleClickDisabledHighlight )
       
   342         {
       
   343         return;
       
   344         }
       
   345 
       
   346 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
   347         MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc );
       
   348 	   	if ( transApi )
       
   349 	   	    {
       
   350             transApi->BeginRedraw( MAknListBoxTfxInternal::EListHighlight, aActualItemRect );
       
   351             transApi->StartDrawing( MAknListBoxTfxInternal::EListHighlight );
       
   352 	   	    }
       
   353 #endif //RD_UI_TRANSITION_EFFECTS_LIST    	
       
   354     TAknLayoutRect highlightRectLayout;
       
   355     highlightRectLayout.LayoutRect( aActualItemRect, iHighlightLayout );
       
   356     //highlightRectLayout.DrawOutLineRect(*iGc);
       
   357     TRect highlightRect( highlightRectLayout.Rect() );
       
   358 
       
   359 
       
   360        
       
   361     
       
   362     // Draw highlight using the same highlight that is used for the Avkon settings list radio controls.
       
   363 	MAknsSkinInstance *skin = AknsUtils::SkinInstance();	
       
   364     //TBool highlightDrawn = EFalse;
       
   365 
       
   366     TAknLayoutRect innerHighlightLayRect;
       
   367     innerHighlightLayRect.LayoutRect( highlightRect, 
       
   368                        AknLayoutScalable_Avkon::list_highlight_pane_g1_cp1() ); 
       
   369 
       
   370 	//highlightDrawn = 
       
   371     if ( Flags()&EPressedDownState )
       
   372         {
       
   373         // This handles the darker pressed down highlights
       
   374         AknsDrawUtils::DrawFrame( skin, 
       
   375             *iGc, 
       
   376             highlightRect, 
       
   377             innerHighlightLayRect.Rect(), 
       
   378             KAknsIIDQsnFrListPressed,
       
   379             KAknsIIDQsnFrListCenterPressed );
       
   380         }
       
   381     else
       
   382         {
       
   383         AknsDrawUtils::DrawFrame( skin, 
       
   384             *iGc, 
       
   385             highlightRect, 
       
   386             innerHighlightLayRect.Rect(), 
       
   387             KAknsIIDQsnFrList, //KAknsIIDQsnFrSetOptFoc other option?
       
   388             KAknsIIDDefault );
       
   389                 
       
   390         }
       
   391 
       
   392 	//(void)highlightDrawn; // avoid compiler warning
       
   393 	/*
       
   394     // if the highlight has not be drawn
       
   395 	if ( !highlightDrawn )
       
   396 		{
       
   397 		TAknLayoutRect highlightshadow;
       
   398 		TAknLayoutRect highlight;
       
   399 		highlightshadow.LayoutRect( highlightRect, 
       
   400             AKN_LAYOUT_WINDOW_List_pane_highlight_graphics__various__Line_1( highlightRect ) );
       
   401 		highlight.LayoutRect( highlightRect, 
       
   402             AKN_LAYOUT_WINDOW_List_pane_highlight_graphics__various__Line_2( highlightRect ) );
       
   403 		highlightshadow.DrawRect( *iGc );
       
   404 		highlight.DrawRect( *iGc );
       
   405 		}
       
   406 		*/
       
   407 #ifdef RD_UI_TRANSITION_EFFECTS_LIST    
       
   408         if ( transApi )
       
   409             {
       
   410             transApi->StopDrawing();
       
   411             transApi->EndRedraw( MAknListBoxTfxInternal::EListHighlight );
       
   412             }
       
   413 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
   414     }
       
   415 
       
   416 // ---------------------------------------------------------------------------
       
   417 // CCamCaptureSetupListItemDrawer::DrawRadioButton
       
   418 // Draw the radio button
       
   419 // ---------------------------------------------------------------------------
       
   420 //
       
   421 void CCamCaptureSetupListItemDrawer::DrawRadioButton( const TRect& aActualItemRect, 
       
   422                                                       TBool aItemIsSelected, const TRgb& /*aColor*/ ) const
       
   423     {
       
   424     PRINT( _L("Camera => CCamCaptureSetupListItemDrawer::DrawRadioButton"))
       
   425 
       
   426     TAknLayoutRect layoutRect;
       
   427     layoutRect.LayoutRect( aActualItemRect, AknLayoutScalable_Apps::cset_list_set_pane_g1( 0 ) );
       
   428 
       
   429     // Pass the bitmap to be drawn into the rect layout object, and draw it
       
   430 	TInt index;
       
   431 	if (aItemIsSelected)
       
   432 		{
       
   433 		index = KRadioButtonSelectedIconIndex;
       
   434 		}
       
   435 	else
       
   436 		{
       
   437 		index = KRadioButtonUnselectedIconIndex;
       
   438 		}
       
   439 
       
   440 	layoutRect.DrawImage( *iGc,
       
   441 	        iRadioButtonIconArray->At(index)->Bitmap(),
       
   442 	        iRadioButtonIconArray->At(index)->Mask() );           
       
   443 
       
   444     }
       
   445 
       
   446 
       
   447 // ---------------------------------------------------------
       
   448 // CCamCaptureSetupListItemDrawer::DrawItemRect
       
   449 // Draws a rectangle for an item.
       
   450 // ---------------------------------------------------------
       
   451 //
       
   452 void CCamCaptureSetupListItemDrawer::DrawItemRect( 
       
   453     const TRect& aActualItemRect ) // the rectangular area to be drawn
       
   454     const
       
   455     {
       
   456     
       
   457     /*
       
   458     iGc->SetBrushColor( AKN_LAF_COLOR_STATIC(0) );
       
   459 	iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
       
   460 	iGc->SetPenStyle( CGraphicsContext::ENullPen );	
       
   461     iGc->DrawRect( aActualItemRect );
       
   462     
       
   463   */
       
   464 
       
   465     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
   466     const CCoeControl* control = iParentControl;
       
   467     MAknsControlContext* cc = AknsDrawUtils::ControlContext( control );
       
   468     
       
   469     TBool bgDrawn( EFalse );
       
   470 	if ( control )
       
   471 		{
       
   472             bgDrawn = AknsDrawUtils::Background(
       
   473                 skin, cc, control, *iGc, aActualItemRect,
       
   474                 KAknsDrawParamNoClearUnderImage | 
       
   475                 KAknsDrawParamBottomLevelRGBOnly );
       
   476 		}
       
   477             
       
   478 	 if ( !bgDrawn )
       
   479         {
       
   480         iGc->Clear( aActualItemRect );
       
   481         }
       
   482     
       
   483 
       
   484     /*
       
   485     // Draw background to be the same colour as that for the Avkon settings list radio controls.
       
   486     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
   487 //    AknsDrawUtils::DrawCachedImage(skin, *iGc, aActualItemRect, KAknsIIDQsnFrSetOpt);	  
       
   488     AknsDrawUtils::DrawCachedImage(skin, *iGc, aActualItemRect, KAknsIIDQsnBgScreenMp);	  
       
   489 */
       
   490 
       
   491     }
       
   492 
       
   493 // ---------------------------------------------------------
       
   494 // CCamCaptureSetupListItemDrawer::SetControl
       
   495 // Sets the parent control of the listbox
       
   496 // ---------------------------------------------------------
       
   497 //
       
   498 void CCamCaptureSetupListItemDrawer::SetParentControl( 
       
   499     const CCoeControl* aControl )
       
   500     {
       
   501     iParentControl = aControl;
       
   502     }
       
   503 
       
   504 // ---------------------------------------------------------
       
   505 // CCamCaptureSetupListItemDrawer::ReadLayout
       
   506 // ---------------------------------------------------------
       
   507 //
       
   508 void CCamCaptureSetupListItemDrawer::ReadLayout()  
       
   509     {
       
   510     if ( CamUtility::IsNhdDevice() ) 
       
   511         {
       
   512         iTxtLayout = AknLayoutScalable_Apps::cset_list_set_pane_t1( 0 );
       
   513         iBmpLayout = AknLayoutScalable_Apps::cset_list_set_pane_g3( 0 );
       
   514         iTxtWithRbLayout = AknLayoutScalable_Apps::cset_list_set_pane_t1( 1 );
       
   515         iBmpWithRbLayout = AknLayoutScalable_Apps::cset_list_set_pane_g3( 1 );
       
   516         iHighlightLayout = 
       
   517                        AknLayoutScalable_Apps::list_highlight_pane_cp021( 0 ); 
       
   518         }
       
   519     else
       
   520         {
       
   521         iTxtLayout = AknLayoutScalable_Apps::cset_list_set_pane_t1_copy1( 0 );
       
   522         iBmpLayout = AknLayoutScalable_Apps::cset_list_set_pane_g3_copy1( 0 );
       
   523         iTxtWithRbLayout = 
       
   524                      AknLayoutScalable_Apps::cset_list_set_pane_t1_copy1( 1 );
       
   525         iBmpWithRbLayout = 
       
   526                      AknLayoutScalable_Apps::cset_list_set_pane_g3_copy1( 1 );
       
   527         iHighlightLayout = 
       
   528                  AknLayoutScalable_Apps::list_highlight_pane_cp021_copy1( 0 );
       
   529         }
       
   530     }
       
   531  
       
   532 void CCamCaptureSetupListItemDrawer::CreateIconAndAddToArrayL(
       
   533     CArrayPtr<CGulIcon>*& aIconArray,
       
   534     const TAknsItemID& aId,
       
   535     const TInt aColorIndex,
       
   536     const TDesC& aBmpFile,
       
   537     const TInt32 aBmp,
       
   538     const TInt32 aBmpM )
       
   539     {
       
   540     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
   541 
       
   542     CFbsBitmap* bitmap = 0;
       
   543     CFbsBitmap* mask = 0;
       
   544 
       
   545     AknsUtils::CreateColorIconLC( skin,
       
   546                                   aId,
       
   547                                   KAknsIIDQsnIconColors,
       
   548                                   aColorIndex,
       
   549                                   bitmap,
       
   550                                   mask,
       
   551                                   aBmpFile,
       
   552                                   aBmp,
       
   553                                   aBmpM,
       
   554                                   KRgbBlack );
       
   555 
       
   556     CGulIcon* gulicon = CGulIcon::NewL( bitmap, mask ); // ownership passed
       
   557     CleanupStack::PushL( gulicon );
       
   558     
       
   559     aIconArray->AppendL( gulicon );
       
   560     CleanupStack::Pop( 3 ); // mask, bitmap, gulicon
       
   561     }
       
   562 
       
   563 //End of file
       
   564 
       
   565