uiacceltk/hitchcock/Client/inc/alfskinnableimage.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Skinned image
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_ALFSKINNABLEIMAGE_H
       
    21 #define C_ALFSKINNABLEIMAGE_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <alf/alfimage.h>
       
    26 #include <alf/alfimageloaderutil.h>
       
    27 
       
    28 class CAlfEnv;
       
    29 
       
    30 
       
    31 /**
       
    32  *  Internal class that provides texturization for a skinned TAlfImage.
       
    33  *
       
    34  *  @lib alfclient.lib
       
    35  *  @since S60 v3.2
       
    36  */
       
    37 NONSHARABLE_CLASS( CAlfSkinnableImage ): public CBase
       
    38 	{
       
    39 public:
       
    40     
       
    41     /* Constructors and destructors. */
       
    42     
       
    43     /**
       
    44      * Constructor.
       
    45      *
       
    46      * @param aEnv Environment. Ownership not transferred.
       
    47      */
       
    48     CAlfSkinnableImage(CAlfEnv* aEnv);
       
    49     
       
    50     /**
       
    51      * Destructor. 
       
    52      */
       
    53     ~CAlfSkinnableImage();
       
    54     
       
    55     
       
    56     /* Methods. */
       
    57     
       
    58     /**
       
    59      * Sets the image specification and texturizes the image if it does 
       
    60      * not yet have a texture.
       
    61      *
       
    62      * @param aImage The image.
       
    63      */
       
    64     void SetImage(const TAlfImage& aImage);
       
    65     
       
    66     /**
       
    67      * Gets the image specification.
       
    68      *
       
    69      * @return The image.
       
    70      */
       
    71     TAlfImage& Image();
       
    72 
       
    73 private:
       
    74 
       
    75     void CreateTextureL();    
       
    76     void DeleteTexture();
       
    77     CAlfTextureManager& ImageTextureManager(const TAlfImage& aImage);
       
    78     CAlfTextureManager& ImageTextureManager(TUid aManagerUid);
       
    79 
       
    80 private:
       
    81 
       
    82     TAlfImage iImage;
       
    83     CAlfEnv* iEnv;
       
    84     TInt iSkinnedImageTextureId;
       
    85     TUid iSkinnedImageTextureManagerId;
       
    86     CAlfAutoSizeImageLoaderUtil* iSkinnedImageUtil;        
       
    87     // Skin Logical Name
       
    88     const TDesC* iSkinIdName;
       
    89 	TInt iId;
       
    90 	};
       
    91 	
       
    92 #endif // C_ALFSKINNABLEIMAGE_H