classicui_plat/ganes_api/inc/ganes/HgVgItem.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 HGVGITEM_H_
       
    19 #define HGVGITEM_H_
       
    20 
       
    21 // INCLUDES
       
    22 #include <ganes/HgItem.h> // base class
       
    23 #include <VG/openvg.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CGulIcon;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class CHgVgItem : public CHgItem 
       
    30     {
       
    31 public:    
       
    32     
       
    33     /**
       
    34      * Creates new CHgVgItem.
       
    35      * 
       
    36      * @param aFlags Item flags. Default is EHgItemFlagsNone
       
    37      * @param aIcon Item Icon. Ownership transferred.
       
    38      * @param aTitle Title text.
       
    39      * @param aText Additional Text.
       
    40      * 
       
    41      * @return CHgVgItem-object
       
    42      */    
       
    43     IMPORT_C static CHgVgItem* NewL(TInt aFlags = EHgItemFlagsNone,
       
    44             CGulIcon* aIcon = 0,
       
    45             const TDesC& aTitle = KNullDesC,
       
    46             const TDesC& aText = KNullDesC );
       
    47     
       
    48     /**
       
    49      * @copydoc CHgVgItem::NewL
       
    50      */
       
    51     IMPORT_C static CHgVgItem* NewLC(TInt aFlags = EHgItemFlagsNone,
       
    52             CGulIcon* aIcon = 0,
       
    53             const TDesC& aTitle = KNullDesC,
       
    54             const TDesC& aText = KNullDesC);
       
    55     
       
    56     IMPORT_C virtual ~CHgVgItem();
       
    57     
       
    58 public: // CHgItem
       
    59     
       
    60     IMPORT_C void SetIcon( CGulIcon* aIcon, TInt aFlags = EHgItemFlagsNone );
       
    61         
       
    62 public: // METHODS
       
    63         
       
    64     /**
       
    65      * Gets OpenVG Image.
       
    66      * 
       
    67      * @return VGImage-object
       
    68      */
       
    69     VGImage VgImage() const;
       
    70     
       
    71     /**
       
    72      * Reloads openvg image resource. 
       
    73      * This is used by media wall to allocate resources on demand and should 
       
    74      * not be used externally.
       
    75      */
       
    76     void ReloadOpenVgImage();
       
    77     
       
    78     /**
       
    79      * Frees openvg image resource.
       
    80      * This is used by media wall to free resources on demand and should 
       
    81      * not be used externally.
       
    82      */
       
    83     void FreeOpenVgImage();
       
    84         
       
    85 protected:
       
    86     
       
    87     CHgVgItem(TInt aFlags, CGulIcon* aIcon);
       
    88 
       
    89     void ConstructL( const TDesC& aTitle, const TDesC& aText );
       
    90         
       
    91 private:
       
    92 
       
    93     VGImage iVgImage; // VGImage of this item, owns.
       
    94     };
       
    95 
       
    96 #endif /* HGVGHELPER */