uifw/ganes/inc/HgVgSkinRenderer.h
changeset 47 2f0c06423c72
parent 46 0e1e0022bd03
child 53 3c67ea82fafc
equal deleted inserted replaced
46:0e1e0022bd03 47:2f0c06423c72
     1 /*
       
     2 * Copyright (c) 2009 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:     
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HGVGSKINRENDERER_H_
       
    19 #define HGVGSKINRENDERER_H_
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <VG/openvg.h>
       
    24 #include <AknUtils.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CHgVgDrawBuffer;
       
    28 
       
    29 
       
    30 /**
       
    31  * Helper class for rendering skin to media wall.
       
    32  */
       
    33 NONSHARABLE_CLASS(CHgVgSkinRenderer) : CBase
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Creates new CHgVgSkinRenderer.
       
    39      * 
       
    40      * @param aRect window rectangle.
       
    41      * @return HgVgSkinRenderer-object.
       
    42      */
       
    43     static CHgVgSkinRenderer* NewL (const TRect& aRect); 
       
    44         
       
    45     // Destructor.
       
    46     virtual ~CHgVgSkinRenderer();
       
    47 
       
    48     void SetRect( const TRect& aRect );
       
    49     
       
    50 public: // Methods
       
    51     /**
       
    52      * Draws skin to draw buffer. Should be called from controls Draw method.
       
    53      * 
       
    54      * @param aProvider provider
       
    55      * @param aControl control
       
    56      */
       
    57     void UpdateSkinL(const MObjectProvider* aProvider, 
       
    58             const CCoeControl* aControl);
       
    59     
       
    60     /**
       
    61      * Renders skin using vg.
       
    62      * 
       
    63      * @param aRect window rectangle.
       
    64      */
       
    65     void Draw() const;
       
    66     
       
    67     
       
    68 protected: // Constructors
       
    69     CHgVgSkinRenderer(const TRect& aRect);
       
    70 
       
    71     void ConstructL ();
       
    72     
       
    73 private: // Data
       
    74 
       
    75     CHgVgDrawBuffer* iDrawBuffer;
       
    76     
       
    77     VGImage iSkinImage;
       
    78 
       
    79     TRect iRect;
       
    80     };
       
    81 
       
    82 #endif /* HGVGSKINRENDERER */