uifw/EikStd/coctlinc/smileyimagedata.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  smiley utility class
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_SMILEYIMAGEDATA_H
       
    19 #define C_SMILEYIMAGEDATA_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 class CSmileyBmpObserver;
       
    24 class CSmileyIcon;
       
    25 class CFbsBitmap;
       
    26 class TImageInfo;
       
    27 class CFbsBitmapDevice;
       
    28 class CFbsBitGc;
       
    29 
       
    30 NONSHARABLE_CLASS( CSmileyImageData ): public CBase
       
    31 	{	
       
    32 public:
       
    33 	CSmileyImageData( CSmileyBmpObserver* aObserver );
       
    34 	~CSmileyImageData();
       
    35 	
       
    36 public:
       
    37 // new functions
       
    38     void CreateImageL( const TDesC& aIconFileName, TImageInfo& aInfo );    
       
    39     void DeleteImage();
       
    40     
       
    41     TInt RefArrayCount();
       
    42     void AddToRefArray( CSmileyIcon* aNode );
       
    43     void RemoveFromRefArray( CSmileyIcon* aNode );
       
    44     CSmileyIcon* RefIcon( TInt aIndex );
       
    45     
       
    46     TText Code();
       
    47     void SetCode( TText aCode );
       
    48     
       
    49     CFbsBitmap* Bitmap();
       
    50     CFbsBitmap* Mask();    
       
    51     CFbsBitmap* StaticBmp();
       
    52     CFbsBitmap* StaticMask();
       
    53     TSize BitmapSize();
       
    54     void SetBitmapSize( TSize aBmpSize, TBool aForceSet = EFalse );
       
    55     TBool IsAnimation();
       
    56     TBool IsAnimationFinished();
       
    57     
       
    58     
       
    59 private:
       
    60     void CreateBmpAndMaskL( const TDesC& aIconFileName, TImageInfo& aInfo );
       
    61     void CreateStaticBmpAndMaskForAnimationL( const TDesC& aIconFileName, 
       
    62         TImageInfo& aInfo );
       
    63 	
       
    64 private: //data
       
    65     TText iCode;
       
    66 	// own
       
    67 	CFbsBitmap* iBmp;
       
    68 	// own
       
    69 	CFbsBitmap* iMask;
       
    70 	// own
       
    71 	CFbsBitmap* iStaticBmp;
       
    72 	// own
       
    73 	CFbsBitmap* iStaticMask;
       
    74 	TSize iBmpSize;	
       
    75 	TBool iIsAnimation;
       
    76 	// own
       
    77 	CSmileyBmpObserver* iObserver;
       
    78 	RArray<CSmileyIcon*> iRefArray;	
       
    79 	};
       
    80 
       
    81 #endif C_SMILEYIMAGEDATA_H