emailcontacts/contactactionmenu/src/cfsccontactactionmenulistboxitemdrawer.cpp
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Implementation of the class 
       
    15 *                CFscContactActionMenuListBoxItemDrawer.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCUDES
       
    21 #include "emailtrace.h"
       
    22 #include <e32std.h>
       
    23 #include <AknUtils.h>
       
    24 #include <AknsUtils.h>
       
    25 
       
    26 #include "cfsccontactactionmenulistboxitemdrawer.h"
       
    27 
       
    28 // ======== LOCAL FUNCTIONS ========
       
    29 
       
    30 // ======== MEMBER FUNCTIONS ========
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // CFscContactActionMenuListBoxItemDrawer::
       
    34 //      CFscContactActionMenuListBoxItemDrawer
       
    35 // ---------------------------------------------------------------------------
       
    36 //
       
    37 CFscContactActionMenuListBoxItemDrawer::
       
    38     CFscContactActionMenuListBoxItemDrawer(
       
    39     MTextListBoxModel* aTextListBoxModel, 
       
    40     const CFont* aFont, 
       
    41     CColumnListBoxData* aColumnData )
       
    42     : CColumnListBoxItemDrawer( aTextListBoxModel, aFont, aColumnData )
       
    43     {
       
    44     }
       
    45 
       
    46 // ---------------------------------------------------------------------------
       
    47 // CFscContactActionMenuListBoxItemDrawer::
       
    48 //      ~CFscContactActionMenuListBoxItemDrawer
       
    49 // ---------------------------------------------------------------------------
       
    50 //
       
    51 CFscContactActionMenuListBoxItemDrawer::
       
    52     ~CFscContactActionMenuListBoxItemDrawer()
       
    53     {
       
    54     }
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // CFscContactActionMenuListBoxItemDrawer::DrawItemText
       
    58 // ---------------------------------------------------------------------------
       
    59 //
       
    60 void CFscContactActionMenuListBoxItemDrawer::DrawItemText(
       
    61     TInt aItemIndex, 
       
    62     const TRect& aItemTextRect, 
       
    63     TBool aItemIsCurrent, 
       
    64     TBool aViewIsEmphasized, 
       
    65     TBool aItemIsSelected ) const
       
    66     {
       
    67     FUNC_LOG;
       
    68     
       
    69     // Disable AVKON skining.
       
    70     // Skinning needs to be disabled during draw operation because otherwise 
       
    71     // listbox's implementation would use SSE text colors instead of set
       
    72     // FS colors.
       
    73     
       
    74     TBool skinEnabled = AknsUtils::AvkonSkinEnabled(); 
       
    75     //<cmail>
       
    76     //TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( EFalse ) ); 
       
    77     //</cmail>
       
    78 
       
    79     CColumnListBoxItemDrawer::DrawItemText(
       
    80         aItemIndex, aItemTextRect, aItemIsCurrent, aViewIsEmphasized, 
       
    81         aItemIsSelected );
       
    82     TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( skinEnabled ) );     
       
    83     
       
    84     }
       
    85