134 void PrepareForExit(); |
134 void PrepareForExit(); |
135 |
135 |
136 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
136 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
137 // Refresh the whole list |
137 // Refresh the whole list |
138 void RefreshL( TFSMailMsgId* aFocusToMessage = NULL ); |
138 void RefreshL( TFSMailMsgId* aFocusToMessage = NULL ); |
139 // From view |
139 // From view |
140 TUid Id() const; |
140 TUid Id() const; |
141 // <cmail> Toolbar |
141 // <cmail> Toolbar |
142 /*void DoActivateL(const TVwsViewId& aPrevViewId, |
142 /*void DoActivateL(const TVwsViewId& aPrevViewId, |
143 TUid aCustomMessageId, |
143 TUid aCustomMessageId, |
144 const TDesC8& aCustomMessage);*/ |
144 const TDesC8& aCustomMessage);*/ |
145 // </cmail> Toolbar |
145 // </cmail> Toolbar |
146 TInt NewEmailsInModelL() const; |
146 TInt NewEmailsInModelL() const; |
147 TInt EmailsInModelL() const; |
147 TInt EmailsInModelL() const; |
148 CFSEmailUiMailListModel* Model(); |
148 CFSEmailUiMailListModel* Model(); |
149 // Current active folder |
149 // Current active folder |
150 TFSMailMsgId FolderId(); |
150 TFSMailMsgId FolderId(); |
151 // Dynamic variant switch, called by appui |
151 // Dynamic variant switch, called by appui |
152 void HandleDynamicVariantSwitchL( CFsEmailUiViewBase::TDynamicSwitchType aType ); |
152 void HandleDynamicVariantSwitchL( CFsEmailUiViewBase::TDynamicSwitchType aType ); |
153 void HandleDynamicVariantSwitchOnBackgroundL( CFsEmailUiViewBase::TDynamicSwitchType aType ); |
153 void HandleDynamicVariantSwitchOnBackgroundL( CFsEmailUiViewBase::TDynamicSwitchType aType ); |
154 // Handle foregroundevent |
154 // Handle foregroundevent |
155 void HandleForegroundEventL(); |
155 void HandleForegroundEventL(); |
156 // Sets softkeys |
156 // Sets softkeys |
157 void SetViewSoftkeysL( TInt aResourceId ); |
157 void SetViewSoftkeysL( TInt aResourceId ); |
158 void SetMskL(); |
158 void SetMskL(); |
159 // Highlighted index |
159 // Highlighted index |
160 TInt HighlightedIndex() const; |
160 TInt HighlightedIndex() const; |
161 void SetHighlightedIndexL( TInt aWantedIndex ); |
161 void SetHighlightedIndexL( TInt aWantedIndex ); |
162 // Event handling forwarded from control |
162 // Event handling forwarded from control |
163 TBool OfferEventL( const TAlfEvent& aEvent ); |
163 TBool OfferEventL( const TAlfEvent& aEvent ); |
164 |
164 |
165 // <cmail> |
165 // <cmail> |
166 /** |
166 /** |
167 * Open highlighted mail or node. |
167 * Open highlighted mail or node. |
168 * (Touchwork: Called from touch manager) |
168 * (Touchwork: Called from touch manager) |
169 */ |
169 */ |
170 void DoHandleListItemOpenL(); |
170 void DoHandleListItemOpenL(); |
171 |
171 |
172 /** |
172 /** |
173 * Open folderlist or shortlist. |
173 * Open folderlist or shortlist. |
174 * (Touchwork: Called from touch manager) |
174 * (Touchwork: Called from touch manager) |
175 * |
175 * |
176 * @param TInt button id. (shortlist or folderlist) |
176 * @param TInt button id. (shortlist or folderlist) |
177 */ |
177 */ |
178 void DoHandleControlBarOpenL( TInt aControlBarButtonId ); |
178 void DoHandleControlBarOpenL( TInt aControlBarButtonId ); |
179 |
179 |
180 /** |
180 /** |
181 * Open action menu. |
181 * Open action menu. |
182 * (Touchwork: Called from touch manager) |
182 * (Touchwork: Called from touch manager) |
183 */ |
183 */ |
184 void DoHandleListItemLongTapL(); |
184 void DoHandleListItemLongTapL(); |
185 |
185 |
186 /** |
186 /** |
187 * Get control which is currently focused. |
187 * Get control which is currently focused. |
188 * (Touchwork: Called from touch manager) |
188 * (Touchwork: Called from touch manager) |
189 * |
189 * |
190 * @return TInt id of control |
190 * @return TInt id of control |
191 */ |
191 */ |
192 TInt GetFocusedControl() const; |
192 TInt GetFocusedControl() const; |
193 |
193 |
194 /** |
194 /** |
195 * Set control bar as focused control. |
195 * Set control bar as focused control. |
196 * (Touchwork: Called from touch manager) |
196 * (Touchwork: Called from touch manager) |
197 */ |
197 */ |
198 void SetControlBarFocusedL(); |
198 void SetControlBarFocusedL(); |
199 |
199 |
200 /** |
200 /** |
201 * Set tree list as focused control. |
201 * Set tree list as focused control. |
202 * (Touchwork: Called from touch manager) |
202 * (Touchwork: Called from touch manager) |
203 */ |
203 */ |
204 void SetTreeListFocusedL(); |
204 void SetTreeListFocusedL(); |
205 |
205 |
206 /** |
206 /** |
207 * Helper function for disable controls to send |
207 * Helper function for disable controls to send |
208 * any events. |
208 * any events. |
209 * (Touchwork) |
209 * (Touchwork) |
210 * |
210 * |
211 * @param TBool state of controls. |
211 * @param TBool state of controls. |
212 */ |
212 */ |
213 void DisableMailList( TBool aValue ); |
213 void DisableMailList( TBool aValue ); |
214 // </cmail> |
214 // </cmail> |
215 |
215 |
216 // Command handling |
216 // Command handling |
217 void HandleCommandL(TInt aCommand); |
217 void HandleCommandL(TInt aCommand); |
218 // Read status |
218 // Read status |
219 void ChangeReadStatusOfHighlightedL( TBool aRead ); |
219 void ChangeReadStatusOfHighlightedL( TBool aRead ); |
220 void ChangeReadStatusOfMarkedL( TBool aRead ); |
220 void ChangeReadStatusOfMarkedL( TBool aRead ); |
221 void ChangeReadStatusOfIndexL( TBool aRead, TInt aIndex ); |
221 void ChangeReadStatusOfIndexL( TBool aRead, TInt aIndex ); |
222 // Delete messages |
222 // Delete messages |
223 void DeleteMessagesL(); |
223 void DeleteMessagesL(); |
224 // Move to drafts |
224 // Move to drafts |
225 void MoveMessagesToDraftsL(); |
225 void MoveMessagesToDraftsL(); |
226 |
226 |
227 // From base class MFSEmailUiFolderListCallback |
227 // From base class MFSEmailUiFolderListCallback |
228 // Handle folder list selection |
228 // Handle folder list selection |
229 void FolderSelectedL( TFSMailMsgId aSelectedFolderId, |
229 void FolderSelectedL( TFSMailMsgId aSelectedFolderId, |
230 TFSEmailUiCtrlBarResponse aResponse ); |
230 TFSEmailUiCtrlBarResponse aResponse ); |
231 void MailboxSelectedL( TFSMailMsgId aSelectedFolderId ); |
231 void MailboxSelectedL( TFSMailMsgId aSelectedFolderId ); |
232 TRect FolderButtonRect(); |
232 TRect FolderButtonRect(); |
233 |
233 |
234 // From base class MFSEmailUiSortListCallback |
234 // From base class MFSEmailUiSortListCallback |
235 void SortOrderChangedL( TFSMailSortField aSortField, |
235 void SortOrderChangedL( TFSMailSortField aSortField, |
236 TFSEmailUiCtrlBarResponse aResponse ); |
236 TFSEmailUiCtrlBarResponse aResponse ); |
237 TRect SortButtonRect(); |
237 TRect SortButtonRect(); |
238 |
238 |
|
239 // Update theme colors |
|
240 void UpdateTheme(); |
|
241 |
239 // Navigation functions, used mainly from viewer |
242 // Navigation functions, used mainly from viewer |
240 TBool IsNextMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId, TFSMailMsgId& aFoundNextMsgFolder ) const; |
243 TBool IsNextMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId, TFSMailMsgId& aFoundNextMsgFolder ) const; |
241 TBool IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId, TFSMailMsgId& aFoundPrevMsgFolder ) const; |
244 TBool IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId, TFSMailMsgId& aFoundPrevMsgFolder ) const; |
242 TInt MoveToNextMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId ); |
245 TInt MoveToNextMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId ); |
243 TInt MoveToPreviousMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId ); |
246 TInt MoveToPreviousMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId ); |
244 |
247 TInt MoveToPreviousMsgAfterDeleteL( TFSMailMsgId aFoundPreviousMsgId ); |
|
248 |
245 /** |
249 /** |
246 * Sets the manual mailbox syncronisation flag if the user chose |
250 * Sets the manual mailbox syncronisation flag if the user chose |
247 * to synchorise mail box from the menu |
251 * to synchorise mail box from the menu |
248 */ |
252 */ |
249 void ManualMailBoxSync( TBool aManualMailBoxSync ); |
253 void ManualMailBoxSync( TBool aManualMailBoxSync ); |
250 |
254 |
251 // Returns ETrue if mailbox is syncronizing and EFalse if not |
255 // Returns ETrue if mailbox is syncronizing and EFalse if not |
252 TBool GetLatestSyncState(); |
256 TBool GetLatestSyncState(); |
253 |
257 |
254 void GetMarkedMessagesL( RArray<TFSMailMsgId>& aMessageIDs ) const; |
258 void GetMarkedMessagesL( RArray<TFSMailMsgId>& aMessageIDs ) const; |
255 CFsTreeList& GetMailList(); |
259 CFsTreeList& GetMailList(); |
275 |
279 |
276 /** |
280 /** |
277 * Called when CDateChangeTimer completes. This happens when either when date |
281 * Called when CDateChangeTimer completes. This happens when either when date |
278 * changes or when user alters the system time. Redraws the list to ensure that |
282 * changes or when user alters the system time. Redraws the list to ensure that |
279 * time stamp texts in emails and nodes are up-to-date. |
283 * time stamp texts in emails and nodes are up-to-date. |
280 */ |
284 */ |
281 void NotifyDateChangedL(); |
285 void NotifyDateChangedL(); |
282 // <cmail> |
286 // <cmail> |
283 TPoint ActionMenuPosition(); |
287 TPoint ActionMenuPosition(); |
284 // </cmail> |
288 // </cmail> |
285 |
289 |
286 private: // from |
290 private: // from |
287 |
291 |
288 /** |
292 /** |
289 * @see CFsEmailUiViewBase::ChildDoActivateL |
293 * @see CFsEmailUiViewBase::ChildDoActivateL |
290 */ |
294 */ |
291 void ChildDoActivateL( const TVwsViewId& aPrevViewId, |
295 void ChildDoActivateL( const TVwsViewId& aPrevViewId, |
292 TUid aCustomMessageId, |
296 TUid aCustomMessageId, |
293 const TDesC8& aCustomMessage ); |
297 const TDesC8& aCustomMessage ); |
294 void ChildDoDeactivate(); |
298 void ChildDoDeactivate(); |
295 void GetParentLayoutsL( RPointerArray<CAlfVisual>& aLayoutArray ) const; |
299 void GetParentLayoutsL( RPointerArray<CAlfVisual>& aLayoutArray ) const; |
296 /** |
300 /** |
297 * @see CFsEmailUiViewBase::SetStatusBarLayout |
301 * @see CFsEmailUiViewBase::SetStatusBarLayout |
298 */ |
302 */ |
299 void SetStatusBarLayout(); |
303 void SetStatusBarLayout(); |
300 |
304 |
301 private: // Private functions |
305 private: // Private functions |
302 CFSEmailUiMailListVisualiser( CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, |
306 CFSEmailUiMailListVisualiser( CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, |
303 CAlfControlGroup& aMailListControlGroup ); |
307 CAlfControlGroup& aMailListControlGroup ); |
304 void ConstructL(); |
308 void ConstructL(); |
305 |
309 |
306 // Refresh funcions |
310 // Refresh funcions |
307 void InsertNewMessagesL( const RArray<TFSMailMsgId>& aMessages ); |
311 void InsertNewMessagesL( const RArray<TFSMailMsgId>& aMessages ); |
308 void InsertNewMessageL( CFSMailMessage* aNewMessage, const TBool aAllowRefresh ); // ownership is transferred |
312 void InsertNewMessageL( CFSMailMessage* aNewMessage, const TBool aAllowRefresh ); // ownership is transferred |
309 |
313 |
310 void RefreshListItemsL(); |
314 void RefreshListItemsL(); |
311 // Refresh the list order only |
315 // Refresh the list order only |
312 void RefreshOrderL(); |
316 void RefreshOrderL(); |
313 |
317 |
314 // To start refreshing asynchronously |
318 // To start refreshing asynchronously |
315 void RefreshDeferred( TFSMailMsgId* aFocusToMessage = NULL ); |
319 void RefreshDeferred( TFSMailMsgId* aFocusToMessage = NULL ); |
316 static TInt DoRefresh( TAny* aSelfPtr ); |
320 static TInt DoRefresh( TAny* aSelfPtr ); |
317 void CompletePendingRefresh(); |
321 void CompletePendingRefresh(); |
318 |
322 |
319 // Create and insert one list node item according to given model item. |
323 // Create and insert one list node item according to given model item. |
320 // Omitting the argument aChildIdx causes the new node to be appended at the end of the list. |
324 // Omitting the argument aChildIdx causes the new node to be appended at the end of the list. |
321 TFsTreeItemId InsertNodeItemL( TInt aModelIndex, TInt aChildIndex = KErrNotFound, const TBool aAllowRefresh = EFalse ); |
325 TFsTreeItemId InsertNodeItemL( TInt aModelIndex, TInt aChildIndex = KErrNotFound, const TBool aAllowRefresh = EFalse ); |
322 // Create and insert one list item according the given model item. The item is added under the given node. |
326 // Create and insert one list item according the given model item. The item is added under the given node. |
323 // Omitting the argument aChildIdx causes the new item to be appended as last child of the node. |
327 // Omitting the argument aChildIdx causes the new item to be appended as last child of the node. |
324 TFsTreeItemId InsertListItemL( TInt aModelIndex, TFsTreeItemId aParentNodeId, TInt aChildIdx = KErrNotFound, TBool aAllowRefresh = ETrue ); |
328 TFsTreeItemId InsertListItemL( TInt aModelIndex, TFsTreeItemId aParentNodeId, TInt aChildIdx = KErrNotFound, TBool aAllowRefresh = ETrue ); |
325 |
329 |
326 // Mail model update |
330 // Mail model update |
327 void UpdateMailListModelL(); |
331 void UpdateMailListModelL(); |
328 void CreateModelItemsL( RPointerArray<CFSMailMessage>& aMessages ); |
332 void CreateModelItemsL( RPointerArray<CFSMailMessage>& aMessages ); |
329 |
333 |
330 // Create title divider model item for the given message. Separator text depends on active sorting mode. |
334 // Create title divider model item for the given message. Separator text depends on active sorting mode. |
331 CFSEmailUiMailListModelItem* CreateSeparatorModelItemLC( CFSMailMessage& aMessage ) const; |
335 CFSEmailUiMailListModelItem* CreateSeparatorModelItemLC( CFSMailMessage& aMessage ) const; |
332 |
336 |
333 // Checks if the given messages belong under the same title divider. This depends on the currect sorting mode. |
337 // Checks if the given messages belong under the same title divider. This depends on the currect sorting mode. |
334 TBool MessagesBelongUnderSameSeparatorL( const CFSMailMessage& aMessage1, const CFSMailMessage& aMessage2 ) const; |
338 TBool MessagesBelongUnderSameSeparatorL( const CFSMailMessage& aMessage1, const CFSMailMessage& aMessage2 ) const; |
335 |
339 |
336 // Rescale UI |
340 // Rescale UI |
337 void SetMailListLayoutAnchors(); |
341 void SetMailListLayoutAnchors(); |
338 |
342 |
339 // Control bar functions |
343 // Control bar functions |
340 void CreateControlBarLayoutL(); |
344 void CreateControlBarLayoutL(); |
341 void ScaleControlBarL(); |
345 void ScaleControlBarL(); |
342 void SetSortButtonTextAndIconL(); |
346 void SetSortButtonTextAndIconL(); |
|
347 HBufC* GetSortButtonTextLC(); |
343 void HandleControlBarEvent( TFsControlBarEvent aEvent, TInt aData ); |
348 void HandleControlBarEvent( TFsControlBarEvent aEvent, TInt aData ); |
344 |
349 |
345 // Followup flag |
350 // Followup flag |
346 void SetMessageFollowupFlagL(); |
351 void SetMessageFollowupFlagL(); |
347 |
352 |
348 void CreatePlainNodeL( const TDesC* aItemDataBuff, |
353 void CreatePlainNodeL( const TDesC* aItemDataBuff, |
349 CFsTreePlainOneLineNodeData* &aItemData, |
354 CFsTreePlainOneLineNodeData* &aItemData, |
350 CFsTreePlainOneLineNodeVisualizer* &aNodeVisualizer ) const; |
355 CFsTreePlainOneLineNodeVisualizer* &aNodeVisualizer ) const; |
351 |
356 |
352 // Move messages to folder |
357 // Move messages to folder |
353 TInt MoveMsgsToFolderL( const TFSMailMsgId& aDestinationFolderId ); |
358 TInt MoveMsgsToFolderL( const TFSMailMsgId& aDestinationFolderId ); |
354 |
359 |
355 // Collapse/Expand nodes |
360 // Collapse/Expand nodes |
359 |
364 |
360 // Mark control functions |
365 // Mark control functions |
361 void MarkAllItemsL(); |
366 void MarkAllItemsL(); |
362 void UnmarkAllItemsL(); |
367 void UnmarkAllItemsL(); |
363 TInt CountMarkedItemsL(); |
368 TInt CountMarkedItemsL(); |
364 |
369 |
365 void MarkMessagesIfFoundL( const RArray<TFSMailMsgId>& aMessageIDs ); |
370 void MarkMessagesIfFoundL( const RArray<TFSMailMsgId>& aMessageIDs ); |
366 |
371 |
367 // Message deletion internal functions |
372 // Message deletion internal functions |
368 void DeleteFocusedMessageL(); |
373 void DeleteFocusedMessageL(); |
369 void DeleteMarkedMessagesL(); |
374 void DeleteMarkedMessagesL(); |
370 static TInt DoDeleteMarkedMessages( TAny* aSelfPtr ); |
375 static TInt DoDeleteMarkedMessages( TAny* aSelfPtr ); |
371 |
376 |
372 // Helper functions to access model data |
377 // Helper functions to access model data |
373 TFSMailMsgId MsgIdFromIndex( TInt aItemIdx ) const; |
378 TFSMailMsgId MsgIdFromIndex( TInt aItemIdx ) const; |
374 CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ); |
379 CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ); |
375 const CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ) const; |
380 const CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ) const; |
376 |
381 |
377 // Item data and visualiser helper functions |
382 // Item data and visualiser helper functions |
378 MFsTreeItemData* ItemDataFromItemId( TFsTreeItemId aItemId ); |
383 MFsTreeItemData* ItemDataFromItemId( TFsTreeItemId aItemId ); |
379 MFsTreeItemVisualizer* ItemVisualiserFromItemId( TFsTreeItemId aItemId ); |
384 MFsTreeItemVisualizer* ItemVisualiserFromItemId( TFsTreeItemId aItemId ); |
380 |
385 |
381 // Helpers to get the ordinal of a message in the iModel |
386 // Helpers to get the ordinal of a message in the iModel |
382 TInt ItemIndexFromMessageId( const TFSMailMsgId& aMessageId ) const; |
387 TInt ItemIndexFromMessageId( const TFSMailMsgId& aMessageId ) const; |
383 TInt NextMessageIndex( TInt aCurMsgIdx ) const; |
388 TInt NextMessageIndex( TInt aCurMsgIdx ) const; |
384 TInt PreviousMessageIndex( TInt aCurMsgIdx ) const; |
389 TInt PreviousMessageIndex( TInt aCurMsgIdx ) const; |
385 TInt ModelIndexFromListId( TFsTreeItemId aItemId ) const; |
390 TInt ModelIndexFromListId( TFsTreeItemId aItemId ) const; |
386 |
391 |
387 // Open highlighted mail |
392 // Open highlighted mail |
388 void OpenHighlightedMailL(); |
393 void OpenHighlightedMailL(); |
389 void OpenMailItemL( TFsTreeItemId aMailItem ); |
394 void OpenMailItemL( TFsTreeItemId aMailItem ); |
390 |
395 |
391 // Create folder name buffer, either from database or from actual folder name |
396 // Create folder name buffer, either from database or from actual folder name |
392 HBufC* CreateFolderNameLC( const CFSMailFolder* aFolder ) const; |
397 HBufC* CreateFolderNameLC( const CFSMailFolder* aFolder ) const; |
393 |
398 |
394 // Shortcut specific toggles |
399 // Shortcut specific toggles |
395 void ShortcutReadUnreadToggleL(); |
400 void ShortcutReadUnreadToggleL(); |
396 void ShortcutCollapseExpandAllToggleL(); |
401 void ShortcutCollapseExpandAllToggleL(); |
397 |
402 |
398 // Utility functions to check if all nodes are expanded or collapsed |
403 // Utility functions to check if all nodes are expanded or collapsed |
399 TBool AllNodesCollapsed() const; |
404 TBool AllNodesCollapsed() const; |
400 TBool AllNodesExpanded() const; |
405 TBool AllNodesExpanded() const; |
401 |
406 |
402 // Utility functions to check if mark as read/unread options should be available in menus |
407 // Utility functions to check if mark as read/unread options should be available in menus |
403 TBool IsMarkAsReadAvailableL() const; |
408 TBool IsMarkAsReadAvailableL() const; |
404 TBool IsMarkAsUnreadAvailableL() const; |
409 TBool IsMarkAsUnreadAvailableL() const; |
405 |
410 |
406 // Utility function to get list of entries which will be targeted by the Actions menu commands. |
411 // Utility function to get list of entries which will be targeted by the Actions menu commands. |
407 // The list contains either marked entries or the focused message entry or is empty. |
412 // The list contains either marked entries or the focused message entry or is empty. |
408 void GetActionsTargetEntriesL( RFsTreeItemIdList& aListItems ) const; |
413 void GetActionsTargetEntriesL( RFsTreeItemIdList& aListItems ) const; |
409 |
414 |
410 // Action menu specific functions |
415 // Action menu specific functions |
411 void LaunchActionMenuL(); |
416 void LaunchActionMenuL(); |
412 void HandleActionMenuCommandL( TActionMenuCustomItemId itemId ); |
417 void HandleActionMenuCommandL( TActionMenuCustomItemId itemId ); |
413 void LaunchStylusPopupMenuL(); |
418 void LaunchStylusPopupMenuL(); |
414 |
419 |
415 // Compose, reply, reply all and forward |
420 // Compose, reply, reply all and forward |
416 void CreateNewMsgL(); |
421 void CreateNewMsgL(); |
417 void ReplyL( CFSMailMessage* aMsgPtr ); |
422 void ReplyL( CFSMailMessage* aMsgPtr ); |
418 void ReplyAllL( CFSMailMessage* aMsgPtr ); |
423 void ReplyAllL( CFSMailMessage* aMsgPtr ); |
419 void ForwardL( CFSMailMessage* aMsgPtr ); |
424 void ForwardL( CFSMailMessage* aMsgPtr ); |
420 void DoReplyForwardL( TEditorLaunchMode aMode, CFSMailMessage* aMsgPtr = NULL ); |
425 void DoReplyForwardL( TEditorLaunchMode aMode, CFSMailMessage* aMsgPtr = NULL ); |
421 |
426 |
422 // Some misc housekeeping functions |
427 // Some misc housekeeping functions |
423 void RemoveUnnecessaryNodesL(); |
428 void RemoveUnnecessaryNodesL(); |
424 void UpdateMailListSettingsL(); |
429 void UpdateMailListSettingsL(); |
425 void UpdateMailListTimeDateSettings(); |
430 void UpdateMailListTimeDateSettings(); |
426 STimeDateFormats MailListTimeDateSettings(); |
431 STimeDateFormats MailListTimeDateSettings(); |
427 |
432 |
428 // Request to update list item data from given message pointer |
433 // Request to update list item data from given message pointer |
429 void UpdateItemDataL( CFsTreePlainTwoLineItemData* aData, const CFSMailMessage* aMsgPtr ); |
434 void UpdateItemDataL( CFsTreePlainTwoLineItemData* aData, const CFSMailMessage* aMsgPtr ); |
430 |
435 |
431 // Request to update preview pane data for list id with msg ptr |
436 // Request to update preview pane data for list id with msg ptr |
432 void UpdatePreviewPaneTextForItemL( TFsTreeItemId aListItemId, CFSMailMessage* aMsgPtr ); |
437 void UpdatePreviewPaneTextForItemL( TFsTreeItemId aListItemId, CFSMailMessage* aMsgPtr ); |
433 void UpdatePreviewPaneTextForItemL( CFsTreePlainTwoLineItemData* aTwoLineItemData, CFSMailMessage* aMsgPtr ); |
438 void UpdatePreviewPaneTextForItemL( CFsTreePlainTwoLineItemData* aTwoLineItemData, CFSMailMessage* aMsgPtr ); |
434 void UpdatePreviewPaneTextIfNecessaryL( TFsTreeItemId aListItemId, TBool aUpdateItem = ETrue ); |
439 void UpdatePreviewPaneTextIfNecessaryL( TFsTreeItemId aListItemId, TBool aUpdateItem = ETrue ); |
435 |
440 |
436 // Sender/Recipient text depending on the mail folder |
441 // Sender/Recipient text depending on the mail folder |
437 HBufC* GetListFirstTextLineL( const CFSMailMessage* aMsgPtr ); |
442 HBufC* GetListFirstTextLineL( const CFSMailMessage* aMsgPtr ); |
438 |
443 |
439 // Reload message pointer from mail client and update list item contents to match it. Item is |
444 // Reload message pointer from mail client and update list item contents to match it. Item is |
440 // removed if it isn't valid anymore. |
445 // removed if it isn't valid anymore. |
441 void UpdateItemAtIndexL( TInt aIndex ); |
446 void UpdateItemAtIndexL( TInt aIndex ); |
442 |
447 |
443 // Check validity of highlighted msg and remove from list if needed |
448 // Check validity of highlighted msg and remove from list if needed |
444 // EFalse indicates that mail was not valid anymore. |
449 // EFalse indicates that mail was not valid anymore. |
445 TBool CheckValidityOfHighlightedMsgL(); |
450 TBool CheckValidityOfHighlightedMsgL(); |
446 |
451 |
447 // Icon update for msg item |
452 // Icon update for msg item |
459 void SetMailboxNameToStatusPaneL(); |
464 void SetMailboxNameToStatusPaneL(); |
460 void SetBrandedListWatermarkL(); |
465 void SetBrandedListWatermarkL(); |
461 |
466 |
462 // Gives the parent node if the item has one. Returns KErrNotFound if no parent node available. |
467 // Gives the parent node if the item has one. Returns KErrNotFound if no parent node available. |
463 TFsTreeItemId ParentNode( TFsTreeItemId aItemId ) const; |
468 TFsTreeItemId ParentNode( TFsTreeItemId aItemId ) const; |
464 |
469 |
465 // Either marks or unmarks the current item depending on the current marking state |
470 // Either marks or unmarks the current item depending on the current marking state |
466 // as stored in iListMarkItemsState. Used for marking when shift is depressed while |
471 // as stored in iListMarkItemsState. Used for marking when shift is depressed while |
467 // scrolling. Returns ETrue if the highlighted item is markable. |
472 // scrolling. Returns ETrue if the highlighted item is markable. |
468 TBool DoScrollMarkUnmarkL(); |
473 TBool DoScrollMarkUnmarkL(); |
469 |
474 |
470 /** |
475 /** |
471 * Mark/unmark items under current separator. |
476 * Mark/unmark items under current separator. |
472 * |
477 * |
473 * @param aMarked If ETrue mark all items else unmark. |
478 * @param aMarked If ETrue mark all items else unmark. |
474 * @param aSeparatorId Id of the separator. |
479 * @param aSeparatorId Id of the separator. |
475 */ |
480 */ |
476 void MarkItemsUnderSeparatorL( TBool aMarked, TInt aSeparatorId ); |
481 void MarkItemsUnderSeparatorL( TBool aMarked, TInt aSeparatorId ); |
477 |
482 |
478 //When maillist is activated this method handles the connection icon change |
483 //When maillist is activated this method handles the connection icon change |
479 void ConnectionIconHandling(); |
484 void ConnectionIconHandling(); |
480 |
485 |
481 void SetListAndCtrlBarFocusL(); |
486 void SetListAndCtrlBarFocusL(); |
482 |
487 |
483 void SetMailListItemsExtendedL(); |
488 void SetMailListItemsExtendedL(); |
484 |
489 |
485 void DoFirstStartL(); |
490 void DoFirstStartL(); |
486 |
491 |
487 // Called when flip state is changed |
492 // Called when flip state is changed |
488 void FlipStateChangedL( TBool aFlipOpen ); |
493 void FlipStateChangedL( TBool aFlipOpen ); |
489 |
494 |
490 /** |
495 /** |
491 * Handles the focus state changes |
496 * Handles the focus state changes |
492 * @param aShow Indicates if focus should become visible or removed |
497 * @param aVisible Indicates if focus should become visible or removed |
493 */ |
498 */ |
494 void HandleTimerFocusStateChange( TBool aShow ); |
499 void FocusVisibilityChange( TBool aVisible ); |
|
500 |
|
501 /** |
|
502 * Update texts in command area buttons |
|
503 */ |
|
504 void UpdateButtonTextsL(); |
|
505 |
|
506 /** |
|
507 * Tests whether a point is inside the control. |
|
508 * |
|
509 * @param aControl Control that is tested. |
|
510 * @param aPoint Point in display coordinates. |
|
511 * |
|
512 * @return <code>ETrue</code>, if the point is inside one of the |
|
513 * control's visuals. Otherwise <code>EFalse</code>. |
|
514 */ |
|
515 TBool HitTest( const CAlfControl& aControl, const TPoint& aPoint ) const; |
495 |
516 |
496 private: // data types |
517 private: // data types |
497 |
518 |
498 |
519 |
499 private: // Private objects |
520 private: // Private objects |
500 // Reference to Alf environment |
521 // Reference to Alf environment |
501 CAlfEnv& iEnv; |
522 CAlfEnv& iEnv; |
502 // Mail list updater timer |
523 // Mail list updater timer |
503 // Timer delays mail update to prevent unnesessary redraw events |
524 // Timer delays mail update to prevent unnesessary redraw events |
504 CMailListUpdater* iMailListUpdater; |
525 CMailListUpdater* iMailListUpdater; |
505 // Msg moved note timer |
526 // Msg moved note timer |
506 CMsgMovedNoteTimer* iMsgNoteTimer; |
527 CMsgMovedNoteTimer* iMsgNoteTimer; |
507 // Screen layout uses iMailListControl |
528 // Screen layout uses iMailListControl |
508 CAlfAnchorLayout* iScreenAnchorLayout; |
529 CAlfAnchorLayout* iScreenAnchorLayout; |
509 // Control bar control and layout and store visual pointer |
530 // Control bar control and layout and store visual pointer |
510 CFsControlBar* iControlBarControl; |
531 CFsControlBar* iControlBarControl; |
511 CAlfVisual* iControlBarVisual; |
532 CAlfVisual* iControlBarVisual; |
512 CAlfDeckLayout* iControlBarLayout; |
533 CAlfDeckLayout* iControlBarLayout; |
513 // Mail List control and layout |
534 // Mail List control and layout |
514 CFreestyleEmailUiMailListControl* iMailListControl; |
535 CFreestyleEmailUiMailListControl* iMailListControl; |
515 CAlfDeckLayout* iListLayout; |
536 CAlfDeckLayout* iListLayout; |
516 // <cmail> this feature is waiting for title divider bg graphics |
|
517 CAlfImageVisual* iTitleDividerBgVisual; |
537 CAlfImageVisual* iTitleDividerBgVisual; |
518 // </cmail> |
538 CFSEmailUiMailListModel* iModel; |
519 CFSEmailUiMailListModel* iModel; |
|
520 CFsTreeList* iMailList; |
539 CFsTreeList* iMailList; |
521 CFsTreeVisualizerBase* iMailTreeListVisualizer; |
540 CFsTreeVisualizerBase* iMailTreeListVisualizer; |
522 TInt iNumSlots; |
541 TInt iNumSlots; |
523 CFSMailFolder* iMailFolder; |
542 CFSMailFolder* iMailFolder; |
524 TInt iNewEmailsInModel; |
543 TInt iNewEmailsInModel; |
525 RArray<SMailListItem> iTreeItemArray; |
544 RArray<SMailListItem> iTreeItemArray; |
526 RArray<TInt> iButtonsIds; |
545 RArray<TInt> iButtonsIds; |
527 TInt iFocusedControl; |
546 TInt iFocusedControl; |
528 TBool iToolbarInUse; |
547 TBool iToolbarInUse; |
529 TInt iListMode; |
548 TInt iListMode; |
530 TInt iNodesInUse; |
549 TInt iNodesInUse; |
531 TInt iNewEmailButtonId; |
550 TInt iNewEmailButtonId; |
532 TInt iFolderListButtonId; |
551 TInt iFolderListButtonId; |
533 TInt iSortButtonId; |
552 TInt iSortButtonId; |
534 TInt iImageButtonId; |
553 TInt iImageButtonId; |
535 MFsControlButtonInterface* iIconButton; |
554 MFsControlButtonInterface* iIconButton; |
536 MFsControlButtonInterface* iNewEmailButton; |
555 MFsControlButtonInterface* iNewEmailButton; |
537 MFsControlButtonInterface* iFolderListButton; |
556 MFsControlButtonInterface* iFolderListButton; |
538 MFsControlButtonInterface* iSortButton; |
557 MFsControlButtonInterface* iSortButton; |
539 TBool iThisViewActive; |
558 TBool iThisViewActive; |
540 CPbkxContactActionMenu* iActionMenu; |
559 CPbkxContactActionMenu* iActionMenu; |
541 TFSMailSortCriteria iCurrentSortCriteria; |
560 TFSMailSortCriteria iCurrentSortCriteria; |
542 // Set to indicate whether items should be marked or unmarked |
561 // Set to indicate whether items should be marked or unmarked |
543 TBool iListMarkItemsState; |
562 TBool iListMarkItemsState; |
544 // Set to indicate if Shift key is being held down in which case selection key has mark/unmark functionality |
563 // Set to indicate if Shift key is being held down in which case selection key has mark/unmark functionality |
545 TBool iShiftDepressed; |
564 TBool iShiftDepressed; |