|
1 /* |
|
2 * Copyright (c) 2007 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: Active Palette generic plugin* |
|
15 */ |
|
16 |
|
17 |
|
18 /** |
|
19 * @file ActivePalette2GenericPlugin.h |
|
20 * Active Palette generic plugin |
|
21 */ |
|
22 |
|
23 #ifndef _ACTIVE_PALETTE_2_GENERIC_PLUGIN_H |
|
24 #define _ACTIVE_PALETTE_2_GENERIC_PLUGIN_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <activepalette2genericpluginint.h> |
|
28 #include <gdi.h> |
|
29 |
|
30 #include "CActivePalettePluginBase.h" |
|
31 |
|
32 |
|
33 /** |
|
34 * General-purpose, generic plugin |
|
35 */ |
|
36 class CAP2GenericPlugin : public CActivePalettePluginBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Constructor |
|
42 * @param aCreationParams Creation parameters |
|
43 */ |
|
44 CAP2GenericPlugin(const NActivePalettePluginFactory::TPluginCreationParams & aCreationParams); |
|
45 |
|
46 private: |
|
47 |
|
48 /** |
|
49 * Destructor |
|
50 */ |
|
51 virtual ~CAP2GenericPlugin(); |
|
52 |
|
53 /// @name From CActivePalettePluginBase |
|
54 //@{ |
|
55 void ConstructL(const NActivePalettePluginFactory::TPluginCreationParams& aCreationParams, |
|
56 const TDesC8& aCustomDataDes, |
|
57 const TInt aCustomDataInt); |
|
58 void HandleItemSelectedL(void); |
|
59 void HandleMessageL(const TInt aMessageID, const TDesC8& aDataDes, const TInt aDataInt); |
|
60 //@} |
|
61 |
|
62 /** |
|
63 * Sets the icon and tooltip text for this item |
|
64 * @param aParams Reference to the parameters structure |
|
65 */ |
|
66 void SetIconAndTooltipL(TAP2GenericPluginParams& aParams); |
|
67 |
|
68 /** |
|
69 * Creates an icon from bitmap IDs for the icon and mask |
|
70 * @param aIconId Bitmap ID for the icon |
|
71 * @param aMaskId Bitmap ID for the mask |
|
72 * @return A pointer to the created icon |
|
73 */ |
|
74 CGulIcon* CreateIconL(TInt aIconId, TInt aMaskId); |
|
75 |
|
76 private: // Member variables |
|
77 /// Current message ID being serviced |
|
78 TInt iMessageId; |
|
79 /// The current message data |
|
80 TInt iMsgCustomParam; |
|
81 /// The size of icons to provide |
|
82 TSize iDimensions; |
|
83 /// The file containing the icon graphics |
|
84 TFileName iGraphicsFileName; |
|
85 }; |
|
86 |
|
87 /** |
|
88 * Instantiaites the plugin |
|
89 * @param aPluginUid The UID |
|
90 * @param aCreationParams Reference to the parameters structure |
|
91 * @return A pointer to the plugin |
|
92 */ |
|
93 extern CActivePalettePluginBase* InstantiateGenericPluginL(const TUid& aPluginUid, |
|
94 const NActivePalettePluginFactory::TPluginCreationParams& aCreationParams); |
|
95 |
|
96 #endif // _ACTIVE_PALETTE_2_GENERIC_PLUGIN_H |
|
97 |
|
98 // End of File |