camerauis/cameraapp/generic/common/src/CamCaptureSetupListItemDrawer.cpp
branchRCL_3
changeset 16 d486e5e3cc9a
parent 12 8c55c525d5d7
child 18 51dda465e618
equal deleted inserted replaced
12:8c55c525d5d7 16:d486e5e3cc9a
    52 #endif //RD_UI_TRANSITION_EFFECTS_LIST
    52 #endif //RD_UI_TRANSITION_EFFECTS_LIST
    53 
    53 
    54 // CONSTANTS
    54 // CONSTANTS
    55 static const TInt KRadioButtonSelectedIconIndex = 0;
    55 static const TInt KRadioButtonSelectedIconIndex = 0;
    56 static const TInt KRadioButtonUnselectedIconIndex = 1;
    56 static const TInt KRadioButtonUnselectedIconIndex = 1;
    57 //ME:START
       
    58 const TUint32 KToolbarExtensionBgColor = 0x00000000;
    57 const TUint32 KToolbarExtensionBgColor = 0x00000000;
    59 const TInt KToolBarExtensionBgAlpha = 0x7F;
    58 const TInt KToolBarExtensionBgAlpha = 0x7F;
    60 //ME:END
       
    61 
    59 
    62 
    60 
    63 // ================= MEMBER FUNCTIONS =======================
    61 // ================= MEMBER FUNCTIONS =======================
    64 
    62 
    65 // -----------------------------------------------------------------------------
    63 // -----------------------------------------------------------------------------
    66 // CCamCaptureSetupListItemDrawer::NewL
    64 // CCamCaptureSetupListItemDrawer::NewL
    67 // Two-phased constructor.
    65 // Two-phased constructor.
    68 // -----------------------------------------------------------------------------
    66 // -----------------------------------------------------------------------------
    69 //
    67 //
    70 //ME:START
       
    71 CCamCaptureSetupListItemDrawer* 
    68 CCamCaptureSetupListItemDrawer* 
    72 CCamCaptureSetupListItemDrawer::NewL( MCamListboxModel& aListBoxModel, TBool aFullySkinned )
    69 CCamCaptureSetupListItemDrawer::NewL( MCamListboxModel& aListBoxModel, TBool aFullySkinned )
    73     {
    70     {
    74     CCamCaptureSetupListItemDrawer* self = new( ELeave ) 
    71     CCamCaptureSetupListItemDrawer* self = new( ELeave ) 
    75                     CCamCaptureSetupListItemDrawer( aListBoxModel, aFullySkinned );               
    72                     CCamCaptureSetupListItemDrawer( aListBoxModel, aFullySkinned );               
    76 //ME:END
       
    77     CleanupStack::PushL( self );
    73     CleanupStack::PushL( self );
    78     self->ConstructL();
    74     self->ConstructL();
    79     CleanupStack::Pop( self );
    75     CleanupStack::Pop( self );
    80     return self;
    76     return self;
    81     }
    77     }
   224         {
   220         {
   225         transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
   221         transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
   226         }
   222         }
   227 #endif // RD_UI_TRANSITION_EFFECTS_LIST
   223 #endif // RD_UI_TRANSITION_EFFECTS_LIST
   228     // Draw unhighlighted rectangle that encapsulates the item text and bitmap.
   224     // Draw unhighlighted rectangle that encapsulates the item text and bitmap.
   229     
       
   230     //ME:START
       
   231     PRINT1( _L("Camera <> CCamCaptureSetupListItemDrawer::DrawActualItem iFullySkinned=%d"), iFullySkinned );
   225     PRINT1( _L("Camera <> CCamCaptureSetupListItemDrawer::DrawActualItem iFullySkinned=%d"), iFullySkinned );
   232 
   226 
   233     if( iFullySkinned )
   227     if( iFullySkinned )
   234         {
   228         {
   235         DrawItemRect( aActualItemRect );       
   229         DrawItemRect( aActualItemRect );       
   236         }
   230         }
   237     else
   231     else
   238         {
   232         {
   239         DrawTransparentItemRect( aActualItemRect );               
   233         DrawTransparentItemRect( aActualItemRect );               
   240         }	
   234         }	
   241     //ME:END
       
   242 	
       
   243 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
   235 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
   244    	if ( transApi )
   236    	if ( transApi )
   245    	    {
   237    	    {
   246         transApi->StopDrawing();
   238         transApi->StopDrawing();
   247         }
   239         }
   470 	        iRadioButtonIconArray->At(index)->Mask() );           
   462 	        iRadioButtonIconArray->At(index)->Mask() );           
   471 
   463 
   472     }
   464     }
   473 
   465 
   474 
   466 
   475 //ME:START
       
   476 // ---------------------------------------------------------
   467 // ---------------------------------------------------------
   477 // CCamCaptureSetupListItemDrawer::DrawItemRect
   468 // CCamCaptureSetupListItemDrawer::DrawItemRect
   478 // Draws a rectangle for an item.
   469 // Draws a rectangle for an item.
   479 // ---------------------------------------------------------
   470 // ---------------------------------------------------------
   480 //
   471 //
   485         const CCoeControl* control = iParentControl;
   476         const CCoeControl* control = iParentControl;
   486         
   477         
   487         if ( control )
   478         if ( control )
   488             {
   479             {
   489             iGc->SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   480             iGc->SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
       
   481             iGc->SetPenSize( TSize( 1, 1 ) );
       
   482             iGc->SetPenStyle( CGraphicsContext::EDottedPen );
   490             iGc->SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );
   483             iGc->SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );
   491             iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
   484             iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
   492             iGc->DrawRect( aActualItemRect );            
   485             iGc->DrawRect( aActualItemRect );            
   493             // Reset the brush after use (otherwise anything drawn
       
   494             // after the viewfinder will also show viewfinder frames)    
       
   495             iGc->SetDrawMode( CGraphicsContext::EDrawModePEN );
       
   496             TSize penSize( 1, 1 );
       
   497             iGc->SetPenSize( penSize );
       
   498             iGc->SetPenStyle( CGraphicsContext::EDottedPen );
       
   499             iGc->SetPenColor( KRgbWhite );
       
   500             iGc->SetBrushStyle( CGraphicsContext::ENullBrush );
       
   501             iGc->DrawRect( aActualItemRect );                    
       
   502             }
   486             }
   503         }
   487         }
   504 //ME:END
       
   505 
       
   506 // ---------------------------------------------------------
   488 // ---------------------------------------------------------
   507 // CCamCaptureSetupListItemDrawer::DrawItemRect
   489 // CCamCaptureSetupListItemDrawer::DrawItemRect
   508 // Draws a rectangle for an item.
   490 // Draws a rectangle for an item.
   509 // ---------------------------------------------------------
   491 // ---------------------------------------------------------
   510 //
   492 //