meetingrequest/mrgui/inc/nmrbitmapmanager.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
       
     2 * Copyright (c) 2007-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: Bitmap manager for MRGUI usage.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMRBITMAPMANAGER_H
       
    19 #define NMRBITMAPMANAGER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <AknsItemID.h>
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CFbsBitmap;
       
    26 
       
    27 namespace NMRBitmapManager
       
    28     {    
       
    29     enum TMRBitmapId 
       
    30         {
       
    31         EMRBitmapNotSet = 0,
       
    32         EMRBitmapRightClickArrow = 1,
       
    33         EMRBitmapTrackingAccept,
       
    34         EMRBitmapTrackingReject,
       
    35         EMRBitmapTrackingTentative,
       
    36         EMRBitmapTrackingNone,
       
    37         EMRBitmapPriorityHigh,
       
    38         EMRBitmapPriorityLow,
       
    39         EMRBitmapPriorityNormal,
       
    40         EMRBitmapSynchronization,
       
    41         EMRBitmapSubject,
       
    42         EMRBitmapOccasion,
       
    43         EMRBitmapRecurrence,
       
    44         EMRBitmapBrowser,
       
    45         EMRBitmapIntranet,
       
    46         EMRBitmapBookmark,
       
    47         EMRBitmapAlarm,
       
    48         EMRBitmapAlarmDate,
       
    49         EMRBitmapAlarmTime,
       
    50         EMRBitmapAlarmClock,
       
    51         EMRBitmapCheckBoxOn,
       
    52         EMRBitmapCheckBoxOff,
       
    53         EMRBitmapClock,
       
    54         EMRBitmapLocation,
       
    55         EMRBitmapDateStart,
       
    56         EMRBitmapDateEnd,
       
    57         EMRBitmapAttachment,
       
    58         EMRBitmapCtrlBar,
       
    59         
       
    60         // Attachment handling icons
       
    61         EMRBitmapMailAttachment,
       
    62         EMRBitmapOpenAttachmentView,
       
    63         EMRBitmapOpenAttachment,
       
    64         EMRBitmapDownloadAttachment,
       
    65         EMRBitmapDownloadAllAttachments,
       
    66         EMRBitmapSaveAttachment,
       
    67         EMRBitmapSaveAllAttachments,
       
    68                     
       
    69         EMRBitmapListCenter,
       
    70         EMRBitmapListTop,
       
    71         EMRBitmapListBottom,
       
    72         EMRBitmapListLeft,
       
    73         EMRBitmapListRight,
       
    74         EMRBitmapListTopLeft,
       
    75         EMRBitmapListTopRight,
       
    76         EMRBitmapListBottomLeft,
       
    77         EMRBitmapListBottomRight,
       
    78         
       
    79         EMRBitmapInputCenter,
       
    80         EMRBitmapInputTop,
       
    81         EMRBitmapInputBottom,
       
    82         EMRBitmapInputLeft,
       
    83         EMRBitmapInputRight,
       
    84         EMRBitmapInputTopLeft,
       
    85         EMRBitmapInputTopRight,
       
    86         EMRBitmapInputBottomLeft,
       
    87         EMRBitmapInputBottomRight,
       
    88 
       
    89         EMRBitmapSetOptCenter,
       
    90         EMRBitmapSetOptTop,
       
    91         EMRBitmapSetOptBottom,
       
    92         EMRBitmapSetOptLeft,
       
    93         EMRBitmapSetOptRight,
       
    94         EMRBitmapSetOptTopLeft,
       
    95         EMRBitmapSetOptTopRight,
       
    96         EMRBitmapSetOptBottomLeft,
       
    97         EMRBitmapSetOptBottomRight            
       
    98         };
       
    99     
       
   100     class TMRBitmapStruct 
       
   101         {
       
   102         public:
       
   103             TMRBitmapStruct() : 
       
   104                 iFallbackIndex( 0 ), iFallbackMaskIndex( 0 ) 
       
   105                     { iItemId.iMajor = 0; iItemId.iMinor = 0; }
       
   106             
       
   107         public: // Data
       
   108             TAknsItemID iItemId;
       
   109             TInt iFallbackIndex;
       
   110             TInt iFallbackMaskIndex;
       
   111         };
       
   112     
       
   113     /**
       
   114      * Converts logical TMRBitmapId to internal TMRBitmapStruct
       
   115      * which contains skin id for bitmap and fallback ids.
       
   116      * 
       
   117      * @param aBitmapId Logical bitmap id.
       
   118      * @return TAknsItemID Skin graphics id.
       
   119      */
       
   120     IMPORT_C TMRBitmapStruct GetBitmapStruct( TMRBitmapId aBitmapId );
       
   121     
       
   122     /**
       
   123      * Creates bitmap and bitmap mask. Bitmap is skin/theme based
       
   124      * and it's retrived by the given ID.Bitmap is also resized to
       
   125      * the given size.
       
   126      * Ownership of these created bitmaps is transferred to the caller.
       
   127      *
       
   128      * @param aIconID - id of the wanted bitmap
       
   129      * @param aBitmap - reference to the pointer where new bitmap is stored
       
   130      * @param aMask - reference to the pointer where new bitmap mask is stored
       
   131      * @param aSize - Desired size for the bitmap
       
   132      * @return TInt - KErrNone if bitmap was constructed succesfully
       
   133      *                KErrNotFound if any problems occured
       
   134      */
       
   135     IMPORT_C TInt GetSkinBasedBitmap( TMRBitmapId aBitmapId,
       
   136                                       CFbsBitmap*& aBitmap,
       
   137                                       CFbsBitmap*& aMask,
       
   138                                       TSize aSize );
       
   139     
       
   140     }
       
   141 
       
   142 #endif