phoneuis/easydialing/inc/easydialinglistboxdata.h
branchRCL_3
changeset 39 b8d67d6176f5
parent 19 544e34b3255a
child 58 40a3f856b14d
equal deleted inserted replaced
34:b68fcd923911 39:b8d67d6176f5
    60     
    60     
    61         };
    61         };
    62     
    62     
    63     
    63     
    64     /**
    64     /**
    65     * Constructor.
       
    66     */
       
    67     CEasyDialingListBoxData();
       
    68        
       
    69     /**
       
    70      * Destructor
    65      * Destructor
    71      */
    66      */
    72     ~CEasyDialingListBoxData();
    67     ~CEasyDialingListBoxData();
    73        
    68        
    74     /**
    69     /**
    75     * Second phase constructor of the class.
    70     * Two phased constructor of the class.
    76     * @return   Pointer to the instance. 
    71     * @return   Pointer to the instance. 
    77     */
    72     */
    78     static CEasyDialingListBoxData* NewL();
    73     static CEasyDialingListBoxData* NewL( CCoeEnv& aCoeEnv );
    79      
    74      
    80     /**
    75     /**
    81     * Draws selected item.
    76     * Draws selected item.
    82     */
    77     */
    83     void DrawData(
    78     void DrawData(
    98     /**
    93     /**
    99     * Sets the contact data manager. Must be set before using the listbox.
    94     * Sets the contact data manager. Must be set before using the listbox.
   100     * @param    aContactDataManager Contact data manager.
    95     * @param    aContactDataManager Contact data manager.
   101     */
    96     */
   102     void SetContactDataManager( CEasyDialingContactDataManager* aContactDataManager );
    97     void SetContactDataManager( CEasyDialingContactDataManager* aContactDataManager );
   103 
    98     
   104     /**
    99     /**
   105     * Sets a pointer to listbox class. Called from listbox constructor.
   100     * Sets a pointer to listbox class. Called from listbox constructor.
   106     * @param    aControl    Pointer to easy dialing listbox cotrol.
   101     * @param    aControl    Pointer to easy dialing listbox cotrol.
   107     */
   102     */
   108     void SetEDLBXControl( CEasyDialingListBox* aControl );
   103     void SetEDLBXControl( CEasyDialingListBox* aControl );
   112      */
   107      */
   113     void HandleItemSizeChange();
   108     void HandleItemSizeChange();
   114     
   109     
   115 protected:
   110 protected:
   116         
   111         
       
   112     /**
       
   113     * C++ Constructor
       
   114     */
       
   115     CEasyDialingListBoxData( CCoeEnv& aCoeEnv );
       
   116     
       
   117     /**
       
   118      * Second phase constructor 
       
   119      */
   117     void ConstructLD();
   120     void ConstructLD();
   118    
   121    
   119 private:
   122 private:
   120     
   123     
   121     /**
   124     /**
   148         CWindowGc& aGc,
   151         CWindowGc& aGc,
   149         const TDesC* aText,
   152         const TDesC* aText,
   150         const TRect& aItemRect,
   153         const TRect& aItemRect,
   151         TBool aHighlight,
   154         TBool aHighlight,
   152         const TExtendedColors& aColors ) const;
   155         const TExtendedColors& aColors ) const;
   153 
   156     
   154     /**
   157     /**
   155      * Draws the Contact Thumbnail Icon if any else draws the dummy contact thumbnail.
   158      * Draws the Contact Thumbnail Icon if any else draws the dummy contact thumbnail.
   156      * @param   aGc Graphics context.
   159      * @param   aGc Graphics context.
   157      * @param   aBoundingBox    Rectangle containing bounds for contact thumbnail.
   160      * @param   aBoundingBox    Rectangle containing bounds for contact thumbnail.
   158      * @param   aDescId Descriptor containing contact id.
   161      * @param   aDescId Descriptor containing contact id.
   172     /**
   175     /**
   173      * Draws the Favourite Icon. Takes the name rect as a parameter. Name rect
   176      * Draws the Favourite Icon. Takes the name rect as a parameter. Name rect
   174      * must be unmirrored, because the mirroring is done as the last thing
   177      * must be unmirrored, because the mirroring is done as the last thing
   175      * before drawing.
   178      * before drawing.
   176      * @param   aGc Graphics context.
   179      * @param   aGc Graphics context.
   177      * @param   aNameRectUnMirrored Name rect, where fav star is contained
   180      * @param   aNameRectUnMirrored Name rect, after which the icon is drawn
   178      * @param   aEffectiveRect The whole listbox item rect. Used for mirroring.
   181      * @param   aEffectiveRect The whole listbox item rect. Used for mirroring.
   179      */
   182      */
   180     void DrawFavouriteIcon(
   183     void DrawFavouriteIcon(
   181             CWindowGc& aGc, 
   184             CWindowGc& aGc, 
   182             TRect aNameRectUnMirrored,
   185             TRect aNameRectUnMirrored,
   183             TRect aEffectiveRect) const;
   186             TRect aEffectiveRect) const;
   184     
   187     
   185 private:
   188 private:
       
   189     
       
   190     /** Control environment */
       
   191     CCoeEnv& iCoeEnv;
   186     
   192     
   187     /** Font to be used showing contact name. Not owned. */
   193     /** Font to be used showing contact name. Not owned. */
   188     CFont* iContactNameFont;
   194     CFont* iContactNameFont;
   189     
   195     
   190     /** Font to be used showing company name. Not owned. */ 
   196     /** Font to be used showing company name. Not owned. */ 
   196     /** Action Menu LeftPointing Arrow for mirrored layout. Owned. */
   202     /** Action Menu LeftPointing Arrow for mirrored layout. Owned. */
   197     CGulIcon* iArrowPointingRight;
   203     CGulIcon* iArrowPointingRight;
   198     
   204     
   199     /** Action Menu RightPointing Arrow. Owned. */
   205     /** Action Menu RightPointing Arrow. Owned. */
   200     CGulIcon* iArrowPointingLeft;
   206     CGulIcon* iArrowPointingLeft;
   201 
   207     
   202     /** Action icon color bitmap. Owned. */
   208     /** Action icon color bitmap. Owned. */
   203     CFbsBitmap* iColorBitmap;
   209     CFbsBitmap* iColorBitmap;
   204 
   210     
   205     /** Default image for contacts with no own thumbnail. Owned. */
   211     /** Default image for contacts with no own thumbnail. Owned. */
   206     CGulIcon* iDummyThumbnail;
   212     CGulIcon* iDummyThumbnail;
   207     
   213     
   208     /** Favourite icon. Owned. */
   214     /** Favourite icon. Owned. */
   209     CGulIcon* iFavouriteIcon;
   215     CGulIcon* iFavouriteIcon;