|
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: |
|
15 * Messaging Centre application "Delivery Reports" view class |
|
16 * implementation. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef __Mce_CMceDeliveryReportView_H__ |
|
23 #define __Mce_CMceDeliveryReportView_H__ |
|
24 |
|
25 // INCLUDES |
|
26 #include <coemain.h> |
|
27 #include <eikfrlb.h> |
|
28 #include <eikmenub.h> |
|
29 #include <aknview.h> |
|
30 #include <e32std.h> |
|
31 |
|
32 #include <msvapi.h> |
|
33 |
|
34 // CONSTANTS |
|
35 |
|
36 _LIT( KHelpContext, "MCE_HLP_DELIVERY_REPORTS" ); |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 class CMceUi; |
|
40 class CEikMenuBar; |
|
41 class CMceSessionHolder; |
|
42 |
|
43 |
|
44 class CMceDeliveryReportControlContainer; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * Mce application "Delivery Report" view class implementation. |
|
50 */ |
|
51 class CMceDeliveryReportView : |
|
52 public CAknView, |
|
53 public MEikListBoxObserver, |
|
54 public MCoeForegroundObserver |
|
55 |
|
56 { |
|
57 public: // interface |
|
58 /** |
|
59 * Standard creation function. Creates and returns a new object of this |
|
60 * class. |
|
61 * |
|
62 * @return pointer to CMceDeliveryReportView instance. |
|
63 */ |
|
64 static CMceDeliveryReportView* NewL( CMceSessionHolder& aSessionHolder ); |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 ~CMceDeliveryReportView(); |
|
69 |
|
70 /** |
|
71 * Returns the Mce Application UI object. |
|
72 * |
|
73 * @return Pointer to Application UI |
|
74 */ |
|
75 CMceUi* MceAppUi(); |
|
76 |
|
77 /** |
|
78 * HandleClientRectChange. Called by the framework the view rectangle |
|
79 * changes |
|
80 */ |
|
81 void HandleClientRectChange(); |
|
82 |
|
83 public: // from CAknView |
|
84 /** |
|
85 * Framework calls to init menu items. |
|
86 * |
|
87 * @param aResourceId resource id |
|
88 * @param aMenuPane menu pane |
|
89 */ |
|
90 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
91 |
|
92 protected: // from MEikListBoxObserver |
|
93 /** |
|
94 * Handles list boxes key events. |
|
95 * |
|
96 * @param aListBox listbox. Not used. |
|
97 * @param aEventType event type |
|
98 * This event type is specified by |
|
99 * MEikListBoxObserver class. |
|
100 */ |
|
101 void HandleListBoxEventL(CEikListBox* aListBox, |
|
102 TListBoxEvent aEventType); |
|
103 |
|
104 private: // from CAknView |
|
105 /** |
|
106 * Returns the ID of the view. |
|
107 * |
|
108 * @return id of this view. |
|
109 */ |
|
110 TUid Id() const; |
|
111 |
|
112 /** |
|
113 * Called by the framework when this view is activated. |
|
114 * |
|
115 * @param aPrevViewId This is ID for previous view. |
|
116 * @param aCustomMessageId ID of the custom message. Not used. |
|
117 * @param aCustomMessage custom message. Not used. |
|
118 */ |
|
119 void DoActivateL(const TVwsViewId& aPrevViewId, |
|
120 TUid aCustomMessageId, |
|
121 const TDesC8& aCustomMessage); |
|
122 /** |
|
123 * Called by the framework when this view is deactivated. |
|
124 */ |
|
125 void DoDeactivate(); |
|
126 |
|
127 |
|
128 public: // from MEikCommandObserver |
|
129 /** |
|
130 * HandleCommandL. Handles the view specific commands. |
|
131 * |
|
132 * @param aCommandId Command's id |
|
133 */ |
|
134 void HandleCommandL(TInt aCommand); |
|
135 |
|
136 public: // MCoeForegroundObserver |
|
137 |
|
138 /** |
|
139 * It is called whenever observer has gained foreground |
|
140 */ |
|
141 void HandleGainingForeground(); |
|
142 |
|
143 /** |
|
144 * It is called whenever observer has lost foreground |
|
145 */ |
|
146 void HandleLosingForeground(); |
|
147 |
|
148 private: // operations |
|
149 /** |
|
150 * C++ constructor |
|
151 * |
|
152 */ |
|
153 CMceDeliveryReportView::CMceDeliveryReportView( CMceSessionHolder& aSessionHolder ); |
|
154 /** |
|
155 * Constructor, second phase. |
|
156 */ |
|
157 void ConstructL(); |
|
158 |
|
159 public: |
|
160 /** |
|
161 * Creates a pop up menubar of aResourceId. Runs DoLaunchPopupL |
|
162 * inside a TRAP. |
|
163 * |
|
164 * @param aResourceId Resource ID. |
|
165 */ |
|
166 void LaunchPopupMenuL( TInt aResourceId ); |
|
167 |
|
168 /** |
|
169 * Removes the popup from the view stack and deletes it. |
|
170 */ |
|
171 void ClosePopup(); |
|
172 |
|
173 /** |
|
174 * From MEikCommandObserver |
|
175 */ |
|
176 virtual void ProcessCommandL( TInt aCommand ); |
|
177 |
|
178 /** |
|
179 * Set the middle soft key. |
|
180 * |
|
181 */ |
|
182 void SetMSKButtonL(); |
|
183 |
|
184 private: // functions |
|
185 /** |
|
186 * Launch the popup. |
|
187 * |
|
188 * @param aResourceId Resource ID. |
|
189 */ |
|
190 void DoLaunchPopupL( TInt aResourceId ); |
|
191 |
|
192 private: // data |
|
193 /// Own: This view's control container. |
|
194 CMceDeliveryReportControlContainer* iContainer; |
|
195 |
|
196 /// Own: popup menu |
|
197 CEikMenuBar* iPopup; |
|
198 |
|
199 |
|
200 CMceSessionHolder& iSessionHolder; |
|
201 }; |
|
202 |
|
203 |
|
204 #endif // __Mce_CMceDeliveryReportView_H__ |
|
205 |
|
206 |
|
207 // End of File |