|
1 /* |
|
2 * Copyright (c) 2002 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: Navi pane handling utilities |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMSGMAILNAVIPANEUTILS_H |
|
20 #define CMSGMAILNAVIPANEUTILS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <msvstd.h> |
|
25 #include <AknsItemID.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CAknNavigationDecorator; |
|
29 class CAknNavigationControlContainer; |
|
30 class CAknNavigationDecorator; |
|
31 class CAknIndicatorContainer; |
|
32 class CFbsBitmap; |
|
33 |
|
34 /** |
|
35 * Navi pane handling utilities. |
|
36 */ |
|
37 class CMsgMailNaviPaneUtils : public CBase |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Creates a new instance of this class. |
|
43 * @return newly created instance |
|
44 */ |
|
45 static CMsgMailNaviPaneUtils* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CMsgMailNaviPaneUtils(); |
|
51 |
|
52 public: //New functions |
|
53 |
|
54 /** |
|
55 * Set priority indicator (high/low or no indicator). |
|
56 * @param aPriority message priority |
|
57 */ |
|
58 void SetPriorityIndicator( TMsvPriority aPriority ); |
|
59 |
|
60 /** |
|
61 * Method for setting size indicator with size data. |
|
62 * @param aSize size of message |
|
63 */ |
|
64 void SetMessageSizeIndicatorL( TInt aSize ); |
|
65 |
|
66 /** |
|
67 * Method for setting attachment indicator on/off. |
|
68 * @param aHasAttachments |
|
69 */ |
|
70 void SetAttachmentIndicator( TBool aHasAttachments ); |
|
71 |
|
72 /** |
|
73 * Edwin/FEP/??? removes navi pane indicators if |
|
74 * input field is not editable (like attachment field). |
|
75 * To correct this, we must use our own navi pane content |
|
76 * to do the job. Own navi pane is also required to keep |
|
77 * priority indicator in correct place horizontally. |
|
78 * @param aDoEnable ETrue if own navi pane should be shown |
|
79 */ |
|
80 void EnableOwnNaviPaneL( TBool aDoEnable ); |
|
81 |
|
82 private: // implementation |
|
83 |
|
84 void SetIndicatorState( TInt aIndicatorId, TBool aDoEnable ); |
|
85 |
|
86 void SetIndicatorValueL( TInt aIndicatorId, const TDesC& aString ); |
|
87 |
|
88 void CreateInvisibleIndicatorL( TInt aIndicatorId ); |
|
89 |
|
90 void CreateIconLC( TInt aIndicatorId, CFbsBitmap*& aBitmap ) const; |
|
91 |
|
92 void GetIconIds( TInt aIndicatorId, |
|
93 TAknsItemID& aSkinId, |
|
94 TInt& aFileBitmapId, |
|
95 TInt& aFileMaskId ) const; |
|
96 |
|
97 private: // Constructor |
|
98 /** |
|
99 * Default constructor |
|
100 */ |
|
101 CMsgMailNaviPaneUtils(); |
|
102 |
|
103 /** |
|
104 * Symbian OS default constructor. |
|
105 */ |
|
106 void ConstructL(); |
|
107 |
|
108 private: // Data |
|
109 |
|
110 /** |
|
111 * Navi pane container that holds navi pane |
|
112 * decorator. Not owned. |
|
113 */ |
|
114 CAknNavigationControlContainer* iNaviPane; |
|
115 |
|
116 /** |
|
117 * Our own navi pane decorator to hold message size. Own. |
|
118 */ |
|
119 CAknNavigationDecorator* iNaviDecorator; |
|
120 |
|
121 /** |
|
122 * Indicator container. Not owned. |
|
123 */ |
|
124 CAknIndicatorContainer* iNaviIndi; |
|
125 |
|
126 }; |
|
127 |
|
128 #endif // CMSGMAILNAVIPANEUTILS_H |
|
129 |
|
130 // End of File |