emailcontacts/remotecontactlookup/engine/inc/cpbkxrclresultinfolistbox.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
       
     2 * Copyright (c) 2007 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:  Definition of the class CPbkxRclResultInfoBox.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBKXRCLRESULTINFOLISTBOX_H
       
    20 #define CPBKXRCLRESULTINFOLISTBOX_H
       
    21 
       
    22 #include <aknlists.h>
       
    23 #include <eikfrlb.h>
       
    24 
       
    25 ////////////////////////////////////////////////////////////////////////////
       
    26 // CPbkxRclResultInfoListBox
       
    27 ////////////////////////////////////////////////////////////////////////////
       
    28 
       
    29 /**
       
    30 * Listbox for result info dialog.
       
    31 */
       
    32 class CPbkxRclResultInfoListBox : public CAknDoubleStyleListBox
       
    33     {
       
    34 public: // constructor and destructor
       
    35 
       
    36     /**
       
    37     * Constructor.
       
    38     */
       
    39     CPbkxRclResultInfoListBox();
       
    40 
       
    41     /**
       
    42     * Destructor.
       
    43     */
       
    44     virtual ~CPbkxRclResultInfoListBox();
       
    45 
       
    46 protected: // methods from base classes
       
    47 
       
    48     /**
       
    49     * Creates item drawer for the listbox.
       
    50     */
       
    51     virtual void CreateItemDrawerL();
       
    52 
       
    53     };
       
    54 
       
    55 ////////////////////////////////////////////////////////////////////////////
       
    56 // CPbkxRclResultInfoItemDrawer
       
    57 ////////////////////////////////////////////////////////////////////////////
       
    58 
       
    59 /**
       
    60 * Item drawer for result info listbox.
       
    61 */
       
    62 class CPbkxRclResultInfoItemDrawer : public CFormattedCellListBoxItemDrawer
       
    63     {
       
    64 public: // constructor and destructor
       
    65 
       
    66     /**
       
    67     * Constructor.
       
    68     *
       
    69     * @param aTextListBoxModel Listbox model.
       
    70     * @param aFont Used font.
       
    71     * @param aFormattedCellData Data class.
       
    72     */
       
    73     CPbkxRclResultInfoItemDrawer(
       
    74         MTextListBoxModel* aTextListBoxModel, 
       
    75         const CFont* aFont, 
       
    76         CFormattedCellListBoxData* aFormattedCellData );
       
    77 
       
    78     /**
       
    79     * Destructor.
       
    80     */
       
    81     virtual ~CPbkxRclResultInfoItemDrawer();
       
    82     
       
    83 public: // new methods
       
    84 
       
    85     /**
       
    86     * Sets color used in highlighted text.
       
    87     *
       
    88     * @param aColor Color.
       
    89     */
       
    90     void SetHighlightColor( TRgb aColor );
       
    91 
       
    92     /**
       
    93     * Sets color used in normal text.
       
    94     *
       
    95     * @param aColor Color.
       
    96     */
       
    97     void SetColor( TRgb aColor );
       
    98 
       
    99     /**
       
   100     * Reset color settings.
       
   101     *
       
   102     * @param aHighlightColor ETrue if highlight is reset, EFalse for normal.
       
   103     */
       
   104     void ResetColors( TBool aHighlightColor = EFalse );
       
   105 
       
   106 public: // from base classes
       
   107 
       
   108     /**
       
   109     * Draws item text.
       
   110     *
       
   111     * @param aItemIndex Item index.
       
   112     * @param aItemTextRect Rect for text.
       
   113     * @param aItemIsCurrent
       
   114     * @param aViewIsEmphasized
       
   115     * @param aItemIsSelected
       
   116     */
       
   117     virtual void DrawItemText(
       
   118         TInt aItemIndex,
       
   119         const TRect& aItemTextRect,
       
   120         TBool aItemIsCurrent,
       
   121         TBool aViewIsEmphasized, 
       
   122         TBool aItemIsSelected ) const;
       
   123     
       
   124 private: // data
       
   125 
       
   126     enum TColors
       
   127         {
       
   128         EColorSet = 0x1,
       
   129         EHighlighColorSet = 0x2
       
   130         };
       
   131 
       
   132     // Color used in normal text.
       
   133     TRgb iColor;
       
   134     
       
   135     // Color used in highlighted text.
       
   136     TRgb iHighlightColor;
       
   137 
       
   138     // Flag indicating that colors are set.
       
   139     TInt iColorsSet;
       
   140 
       
   141     };
       
   142 
       
   143 #endif
       
   144