|
1 /* |
|
2 * Copyright (c) 2004 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: Wrapper class for access to scalable item renderer. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef AKNSRENDERERWRAPPER_H |
|
20 #define AKNSRENDERERWRAPPER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknsItemID.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MAknsSkinInstance; |
|
27 class CFbsBitmap; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Utility class that allows access to default renderer for scalable skin items. |
|
33 * |
|
34 * This is a static public class with exported members. |
|
35 * |
|
36 * @lib AknSkins.lib |
|
37 * |
|
38 * @since 2.8 |
|
39 */ |
|
40 class AknsRendererWrapper |
|
41 { |
|
42 |
|
43 public: // New methods |
|
44 |
|
45 /** |
|
46 * Renders the given scalable item to a newly constructed bitmap and |
|
47 * mask. |
|
48 * |
|
49 * @param aSkin Pointer to the skin instance. |
|
50 * |
|
51 * @param aIID Item ID of the scalable item to be rendered. |
|
52 * |
|
53 * @param aOutRGB If the method completes successfully, a pointer |
|
54 * to a newly constructed bitmap containing the RGB channel of |
|
55 * the item. The ownership of the bitmap is transferred to the caller. |
|
56 * |
|
57 * @param aOutAlpha If the method completes successfully, a pointer |
|
58 * to a newly constructed bitmap containing the alpha channel of |
|
59 * the item, or @c NULL. The ownership of the bitmap is transferred |
|
60 * to the caller. |
|
61 * |
|
62 * @param aRect Position and size of the item in parent coordinate |
|
63 * system. If no parent item is given, use |
|
64 * @c TRect( TPoint(0,0), yourSize ). |
|
65 * |
|
66 * @param aInRGB Optional parent element RGB channel bitmap, or @c NULL. |
|
67 * |
|
68 * @param aInAlpha Optional parent element alpha channel bitmap, |
|
69 * or @c NULL. |
|
70 * |
|
71 * @since 2.8 |
|
72 * |
|
73 * @par Exceptions: |
|
74 * If the rendering fails or no scalable item with the given item ID |
|
75 * is found, the method leaves with an error code. |
|
76 */ |
|
77 IMPORT_C static void RenderScalableItemL( MAknsSkinInstance* aSkin, |
|
78 const TAknsItemID& aIID, CFbsBitmap*& aOutRGB, |
|
79 CFbsBitmap*& aOutAlpha, const TRect& aRect, |
|
80 const CFbsBitmap* aInRGB, const CFbsBitmap* aInAlpha ); |
|
81 |
|
82 private: // Construction and destruction |
|
83 |
|
84 AknsRendererWrapper(); |
|
85 ~AknsRendererWrapper(); |
|
86 |
|
87 }; |
|
88 |
|
89 #endif // AKNSRENDERERWRAPPER_H |
|
90 |
|
91 // End of File |
|
92 |