1 /* |
|
2 * Copyright (c) 2002-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: Edit before send list pop-up query |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CESMRICONFIELD_H |
|
19 #define CESMRICONFIELD_H |
|
20 |
|
21 #include "cesmrfield.h" |
|
22 #include "esmrfieldbuilderdef.h" |
|
23 #include <AknsConstants.h> |
|
24 |
|
25 class CEikImage; |
|
26 |
|
27 /** |
|
28 * CESMRIconField is base class for all the fields that has icon. |
|
29 */ |
|
30 class CESMRIconField : public CESMRField |
|
31 { |
|
32 public: |
|
33 |
|
34 /** |
|
35 * C++ default constructor |
|
36 */ |
|
37 IMPORT_C CESMRIconField(); |
|
38 |
|
39 /** |
|
40 * C++ Destructor |
|
41 */ |
|
42 IMPORT_C virtual ~CESMRIconField(); |
|
43 |
|
44 protected: |
|
45 /** |
|
46 * Second phase constructor for the CESMRIconField. |
|
47 * |
|
48 * @param aIconID - ID for the icon that this field should show |
|
49 * @param aControl - control that needs to have the highlight or border |
|
50 * @param aFocusType - Focus type (border/highlight or none) |
|
51 */ |
|
52 IMPORT_C void ConstructL( |
|
53 TAknsItemID aIconID, |
|
54 CCoeControl* aControl, |
|
55 TESMRFieldFocusType aFocusType = EESMRBorderFocus ); |
|
56 |
|
57 /* |
|
58 * Calculates icon field border size. |
|
59 * Sub classes may override this if border size needs to be adjusted. |
|
60 * |
|
61 * @return border size |
|
62 */ |
|
63 IMPORT_C virtual TSize BorderSize() const; |
|
64 |
|
65 public: |
|
66 // This method can be called by the derived classes to update the icon |
|
67 IMPORT_C virtual void IconL( TAknsItemID aIconID ); |
|
68 |
|
69 public: // From CCoeControl |
|
70 IMPORT_C void SetContainerWindowL(const CCoeControl& aContainer); |
|
71 IMPORT_C TInt CountComponentControls() const; |
|
72 IMPORT_C CCoeControl* ComponentControl( TInt aInd ) const; |
|
73 IMPORT_C void SizeChanged(); |
|
74 |
|
75 private: |
|
76 /// Own: Pointer to the image that is drawn in the screen |
|
77 CEikImage* iIcon; |
|
78 /// Own: Pointer to the bitmap. iIcon is created by using this bitmap |
|
79 CFbsBitmap* iBitmap; |
|
80 /// Own: Pointer to the bitmap mask. iIcon is created by using this bitmap mask |
|
81 CFbsBitmap* iBitmapMask; |
|
82 /// Own: ID of the needed bitmap |
|
83 TAknsItemID iIconID; |
|
84 }; |
|
85 |
|
86 #endif //CESMRICONFIELD_H |
|
87 |
|
88 // EOF |
|