emailuis/emailui/inc/FreestyleEmailUiMailListVisualiser.h
changeset 2 5253a20d2a1e
parent 1 12c456ceeff2
child 3 a4d6f1ea0416
equal deleted inserted replaced
1:12c456ceeff2 2:5253a20d2a1e
   120 class CFSEmailUiMailListVisualiser : public CFsEmailUiViewBase,
   120 class CFSEmailUiMailListVisualiser : public CFsEmailUiViewBase,
   121 									 public MFsControlBarObserver,
   121 									 public MFsControlBarObserver,
   122 									 public MFSEmailUiFolderListCallback,
   122 									 public MFSEmailUiFolderListCallback,
   123 									 public MFSEmailUiSortListCallback,
   123 									 public MFSEmailUiSortListCallback,
   124 									 public MFsTreeListObserver,
   124 									 public MFsTreeListObserver,
   125 									 public MFSEmailUiContactHandlerObserver,
   125 									 public MFSEmailUiContactHandlerObserver
   126 									 public MFsActionMenuPositionGiver
       
   127 // </cmail>
   126 // </cmail>
   128 	{
   127 	{
   129 friend class CMailListUpdater;
   128 friend class CMailListUpdater;
   130 public:
   129 public:
   131 	static CFSEmailUiMailListVisualiser* NewL(CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, CAlfControlGroup& aMailListControlGroup);
   130 	static CFSEmailUiMailListVisualiser* NewL(CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, CAlfControlGroup& aMailListControlGroup);
   179 
   178 
   180     /**
   179     /**
   181      * Open action menu.
   180      * Open action menu.
   182      * (Touchwork: Called from touch manager)
   181      * (Touchwork: Called from touch manager)
   183      */
   182      */
   184 	void DoHandleListItemLongTapL();
   183 	void DoHandleListItemLongTapL( const TPoint& aPoint );
   185 
   184 
   186     /**
   185     /**
   187      * Get control which is currently focused.
   186      * Get control which is currently focused.
   188      * (Touchwork: Called from touch manager)
   187      * (Touchwork: Called from touch manager)
   189      *
   188      *
   243 	TBool IsNextMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId, TFSMailMsgId& aFoundNextMsgFolder ) const;
   242 	TBool IsNextMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId, TFSMailMsgId& aFoundNextMsgFolder ) const;
   244 	TBool IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId, TFSMailMsgId& aFoundPrevMsgFolder ) const;
   243 	TBool IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId, TFSMailMsgId& aFoundPrevMsgFolder ) const;
   245 	TInt MoveToNextMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId );
   244 	TInt MoveToNextMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId );
   246 	TInt MoveToPreviousMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId );
   245 	TInt MoveToPreviousMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId );
   247 	TInt MoveToPreviousMsgAfterDeleteL( TFSMailMsgId aFoundPreviousMsgId );
   246 	TInt MoveToPreviousMsgAfterDeleteL( TFSMailMsgId aFoundPreviousMsgId );
   248 	
   247 
   249 	/**
   248 	/**
   250      * Sets the manual mailbox syncronisation flag if the user chose
   249      * Sets the manual mailbox syncronisation flag if the user chose
   251      * to synchorise mail box from the menu
   250      * to synchorise mail box from the menu
   252      */
   251      */
   253     void ManualMailBoxSync( TBool aManualMailBoxSync );
   252     void ManualMailBoxSync( TBool aManualMailBoxSync );
   265 
   264 
   266 // from base class MFsTreeListObserver
   265 // from base class MFsTreeListObserver
   267 
   266 
   268     /** Handles tree list events. */
   267     /** Handles tree list events. */
   269     // <cmail> Touch
   268     // <cmail> Touch
   270     void TreeListEventL( const TFsTreeListEvent aEvent, const TFsTreeItemId aId );
   269     void TreeListEventL( const TFsTreeListEvent aEvent,
       
   270                          const TFsTreeItemId aId,
       
   271                          const TPoint& aPoint );
   271     // </cmail>
   272     // </cmail>
   272 
   273 
   273 // from base class MFSEmailUiContactHandlerObserver
   274 // from base class MFSEmailUiContactHandlerObserver
   274 
   275 
   275     /** Handles completed contact handler event. */
   276     /** Handles completed contact handler event. */
   281     * Called when CDateChangeTimer completes. This happens when either when date
   282     * Called when CDateChangeTimer completes. This happens when either when date
   282     * changes or when user alters the system time. Redraws the list to ensure that
   283     * changes or when user alters the system time. Redraws the list to ensure that
   283     * time stamp texts in emails and nodes are up-to-date.
   284     * time stamp texts in emails and nodes are up-to-date.
   284     */
   285     */
   285     void NotifyDateChangedL();
   286     void NotifyDateChangedL();
   286 // <cmail>
       
   287     TPoint ActionMenuPosition();
       
   288 // </cmail>
       
   289 
   287 
   290 private: // from
   288 private: // from
   291 
   289 
   292     /**
   290     /**
   293      * @see CFsEmailUiViewBase::ChildDoActivateL
   291      * @see CFsEmailUiViewBase::ChildDoActivateL
   410 
   408 
   411 	// Utility function to get list of entries which will be targeted by the Actions menu commands.
   409 	// Utility function to get list of entries which will be targeted by the Actions menu commands.
   412 	// The list contains either marked entries or the focused message entry or is empty.
   410 	// The list contains either marked entries or the focused message entry or is empty.
   413 	void GetActionsTargetEntriesL( RFsTreeItemIdList& aListItems ) const;
   411 	void GetActionsTargetEntriesL( RFsTreeItemIdList& aListItems ) const;
   414 
   412 
   415 	// Action menu specific functions
   413 	// Stylus menu specific functions
   416 	void LaunchActionMenuL();
   414 	void LaunchStylusPopupMenuL( const TPoint& aPoint );
   417 	void HandleActionMenuCommandL( TActionMenuCustomItemId itemId );
       
   418 	void LaunchStylusPopupMenuL();
       
   419 
   415 
   420 	// Compose, reply, reply all and forward
   416 	// Compose, reply, reply all and forward
   421 	void CreateNewMsgL();
   417 	void CreateNewMsgL();
   422 	void ReplyL( CFSMailMessage* aMsgPtr );
   418 	void ReplyL( CFSMailMessage* aMsgPtr );
   423 	void ReplyAllL( CFSMailMessage* aMsgPtr );
   419 	void ReplyAllL( CFSMailMessage* aMsgPtr );
   511      *
   507      *
   512      * @return  <code>ETrue</code>, if the point is inside one of the
   508      * @return  <code>ETrue</code>, if the point is inside one of the
   513      *          control's visuals. Otherwise <code>EFalse</code>.
   509      *          control's visuals. Otherwise <code>EFalse</code>.
   514      */
   510      */
   515     TBool HitTest( const CAlfControl& aControl, const TPoint& aPoint ) const;
   511     TBool HitTest( const CAlfControl& aControl, const TPoint& aPoint ) const;
       
   512 
       
   513     /**
       
   514      * Handles arrow events in portrait mode.
       
   515      *
       
   516      * @param aScancode Standard scan code.
       
   517      * @param aEvent Event.
       
   518      * @param aShiftState Shift state.
       
   519      *
       
   520      * @return <code>ETrue</code>, if consumed, <code>EFalse</code> otherwise.
       
   521      */
       
   522     TBool HandleArrowEventInPortraitL( const TInt aScancode,
       
   523             const TAlfEvent& aEvent, const TBool aShiftState );
       
   524     /**
       
   525      * Handles arrow events in landscape mode.
       
   526      *
       
   527      * @param aScancode Standard scan code.
       
   528      * @param aEvent Event.
       
   529      * @param aShiftState Shift state.
       
   530      *
       
   531      * @return <code>ETrue</code>, if consumed, <code>EFalse</code> otherwise.
       
   532      */
       
   533     TBool HandleArrowEventInLandscapeL( const TInt aScancode,
       
   534             const TAlfEvent& aEvent, const TBool aShiftState );
   516 
   535 
   517 private: // data types
   536 private: // data types
   518 
   537 
   519 
   538 
   520 private: // Private objects
   539 private: // Private objects
   589 	TFSMailMsgId iMsgToFocusAfterRedraw;
   608 	TFSMailMsgId iMsgToFocusAfterRedraw;
   590 	HBufC* iNewEmailText;
   609 	HBufC* iNewEmailText;
   591 
   610 
   592     CEUiEmailListTouchManager* iTouchManager;
   611     CEUiEmailListTouchManager* iTouchManager;
   593     CAknStylusPopUpMenu* iStylusPopUpMenu;
   612     CAknStylusPopUpMenu* iStylusPopUpMenu;
   594     TBool iStylusPopUpMenuLaunched;
   613     TBool iStylusPopUpMenuVisible;
   595 
   614 
   596     TBool iShowReplyAll;
   615     TBool iShowReplyAll;
       
   616     // Was focus visible in the ListView.
       
   617     TBool iLastFocus;
       
   618     //used to prevent Call application execution (on keyup of call button) when call to contact required
       
   619     TBool iConsumeStdKeyYes_KeyUp; 
   597   	};
   620   	};
   598 
   621 
   599 
   622 
   600 // Definition of the mail updater timer. This timer is used for
   623 // Definition of the mail updater timer. This timer is used for
   601 // delayed drawing of the mail list to avoid viewsrv:11 panics.
   624 // delayed drawing of the mail list to avoid viewsrv:11 panics.