webengine/osswebengine/WebKit/s60/webview/WebCannedImages.h
changeset 0 dd21522fd290
child 5 10e98eab6f85
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 the License "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 
       
    19 
       
    20 #ifndef WEBCANNEDIMAGES_H
       
    21 #define WEBCANNEDIMAGES_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <bitstd.h>
       
    26 
       
    27 #include <AknsConstants.h>
       
    28 #include <AknsItemID.h>
       
    29 #include <AknsConstants.h>
       
    30 
       
    31 // CONSTANTS
       
    32 
       
    33 // MACROS
       
    34 
       
    35 // DATA TYPES
       
    36 
       
    37 // FUNCTION PROTOTYPES
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 
       
    41 // CLASS DECLARATION
       
    42 class TCannedImageData
       
    43     {
       
    44     public:
       
    45         TCannedImageData(): m_img(0), m_msk(0)       {}
       
    46     public:
       
    47         CFbsBitmap* m_img;
       
    48         CFbsBitmap* m_msk;
       
    49     };
       
    50 
       
    51 /**
       
    52 *
       
    53 *  @lib browserView.lib
       
    54 *  @since 3.0
       
    55 */
       
    56 class WebCannedImages : public CBase
       
    57     {
       
    58 
       
    59     public:  // Constructors and destructor
       
    60 
       
    61         /**
       
    62         * Two-phased constructor.
       
    63         */
       
    64         static WebCannedImages* NewL();
       
    65 
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         virtual ~WebCannedImages();
       
    70 
       
    71     public: // New functions
       
    72 
       
    73         /**
       
    74         * Returns the image represented by the id
       
    75         * @since 3.0
       
    76         * @param
       
    77         * @return
       
    78         */
       
    79         TCannedImageData& getImage( TInt imgid );
       
    80 
       
    81         /**
       
    82         * Gets the folder where the canned image is located
       
    83         * @since 3.0
       
    84         * @param
       
    85         * @return
       
    86         */
       
    87         static HBufC* getImageDirL( );
       
    88 
       
    89         /**
       
    90         * Loads the canned image
       
    91         * @since 3.0
       
    92         * @param
       
    93         * @return
       
    94         */
       
    95         static void loadImageDirL( TInt imgid, const TDesC& filename, TCannedImageData& img );
       
    96 
       
    97         /**
       
    98         * Loads svg icon
       
    99         * @since 3.0
       
   100         * @param
       
   101         * @return
       
   102         */
       
   103         static void loadSvg( TInt imgid, TAknsItemID aknsid, const TDesC& filename, TCannedImageData& img );
       
   104 
       
   105     private:
       
   106 
       
   107 
       
   108         /**
       
   109         * C++ default constructor.
       
   110         */
       
   111         WebCannedImages();
       
   112 
       
   113         /**
       
   114         * By default Symbian 2nd phase constructor is private.
       
   115         */
       
   116         void ConstructL();
       
   117 
       
   118     public:
       
   119 
       
   120         enum TCannedImageNames
       
   121               {
       
   122               EImageSquare = 0,
       
   123               EImageDisc,
       
   124               EImageCircle,
       
   125               EImageMissing,
       
   126               EImageSelectArrow,
       
   127               EImageObject,
       
   128               EImageSelectFile,
       
   129               EImageMap,
       
   130               EImageRadioButtonOff,
       
   131               EImageRadioButtonOn,
       
   132               EImageRadioButtonOnSel,
       
   133               EImageRadioButtonOffSel,
       
   134               EImageCheckBoxOff,
       
   135               EImageCheckBoxOn,
       
   136               EImageCheckBoxOnSel,
       
   137               EImageCheckBoxOffSel,
       
   138               EImageFingerBitmap,
       
   139               EImageArrowBitmap,
       
   140               EImageWaitArrowBitmap,
       
   141               EImageIBeam,
       
   142               EImageSelectMulti,
       
   143               EImageSmartLinkPhone,
       
   144               EImageSmartLinkEmail,
       
   145               EImageUrlCall,
       
   146               EImageUrlEmail,
       
   147               EImageUrlMm,
       
   148               EImageUrlMms,
       
   149               EImageUrlPage,
       
   150               EImageUrlVideo,
       
   151               EImageEscFullScreen,
       
   152               KNumberOfCannedImages
       
   153               };
       
   154 
       
   155     private: // Data
       
   156         TCannedImageData m_imgarray[KNumberOfCannedImages];
       
   157         HBufC*           m_mbmfile;
       
   158         HBufC*           m_svgfile;
       
   159 
       
   160     };
       
   161 
       
   162 #endif      // WebCannedImages_H
       
   163 
       
   164 // End of File