imstutils/imconversationview/imcvuiapp/inc/cimcvuiappskinvariant.h
branchRCL_3
changeset 29 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
28:3104fc151679 29:9a48e301e94b
       
     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:  skin variation  class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CIMCVUIAPPSKINVARIANT_H
       
    21 #define CIMCVUIAPPSKINVARIANT_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "mimcvuiappskinvariant.h"
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CCoeControl;
       
    30 class CAknsBasicBackgroundControlContext;
       
    31 class CGulIcon;
       
    32 class TAknsItemID;
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Active implementation of skin feature.
       
    37 *  See base class MCASkinVariant.h for comments.
       
    38 *  @imcvuiapp.exe
       
    39 *  @since 5.0
       
    40 */
       
    41 
       
    42 class CIMCVUiAppSkinVariant : public CBase, 
       
    43 							  public MIMCVUiAppSkinVariant
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46 
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         */
       
    50         static CIMCVUiAppSkinVariant* NewL(  );
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CIMCVUiAppSkinVariant();
       
    56 
       
    57       public: // Functions from base classes MIMCVUiAppSkinVariant
       
    58 
       
    59                 
       
    60         /**
       
    61         * Clears listbox background.
       
    62         * @since 5.0
       
    63         * @param aGc, graphics context to draw to.
       
    64 		* @param aUsedPortionOfViewRect, rect to draw to.
       
    65 		* @param aContext, skin control context.
       
    66         */
       
    67 		void ClearChatListBoxBackGround( CWindowGc& aGc, 
       
    68 		                                 const TRect& aUsedPortionOfViewRect,
       
    69 										 MAknsControlContext* aContext );
       
    70 		
       
    71 		/**
       
    72         * Returns main pane background control context.
       
    73         * @since 5.0
       
    74         * @return MAknsControlContext, skin control context.
       
    75         */								 
       
    76 		MAknsControlContext* MainPaneBackgroundContext() const;
       
    77 		
       
    78 		/**
       
    79 		* Update layout for skinvariant
       
    80 		* @return None
       
    81 		*/
       
    82 		void UpdateLayout();
       
    83 		
       
    84 		/**
       
    85         * Draws skinned version of the message editor.
       
    86         * @since 5.0
       
    87         * @param aGc, graphics context.
       
    88 		* @param aParentRect, rects needed for drawing
       
    89 		* @param aEditorRect
       
    90 		* @param aOutlineRect
       
    91         * @return TBool, whether skins were drawn or not.
       
    92         */
       
    93 		TBool DrawSkinnedEditor( const CCoeControl* aControl, 
       
    94                                  CWindowGc& aGc, 
       
    95                                  TRect& aParentRect, 
       
    96                                  TRect& aEditorRect, 
       
    97                                  TRect& aOutlineRect );
       
    98 		 /**
       
    99         * Loads skinned/normal IM application bitmaps.
       
   100         * @since 1.2s
       
   101         * @param aBitmapId, bitmap id
       
   102         * @param aMaskId, bitmap mask's id
       
   103         * @param aFullPath, bitmap path
       
   104         * @param aOverrideBrand, if true, bitmap is got from skins, not through
       
   105         *               brand bitmaps (if brand is active)
       
   106         * @param aCustomColor  If provided, will change the color of the bitmap
       
   107         *                      to this color.
       
   108         * @return CGulIcon, created icon, user of this method gets the ownership
       
   109         */
       
   110         CGulIcon* LoadBitmapL( TInt aBitmapId, TInt aMaskId,
       
   111                                        const TDesC& aFullPath,
       
   112                                        TBool aOverrideBrand = EFalse,
       
   113                                        TRgb* aCustomColor = NULL ) ;
       
   114                                        
       
   115    private: 
       
   116 	
       
   117 	    void MapFromBitmapIdToAknsItemId( TInt aBitmapId, 
       
   118 	                                      TAknsItemID& aItemId, 
       
   119 	                                      TInt& aColorGroupId );
       
   120 	                                      
       
   121 	private:
       
   122 
       
   123 		/**
       
   124 		* C++ default constructor.
       
   125 		*/
       
   126 		CIMCVUiAppSkinVariant();
       
   127 
       
   128 		/**
       
   129 		* By default Symbian 2nd phase constructor is private.
       
   130 		*/
       
   131 		void ConstructL();
       
   132 
       
   133 	private:    // Data
       
   134 
       
   135 		// skin background control context
       
   136 		CAknsBasicBackgroundControlContext* iBgContext;
       
   137 		
       
   138 			
       
   139 	
       
   140     };
       
   141 
       
   142 #endif      // CIMCVUIAPPSKINVARIANT_H
       
   143 
       
   144 // End of File