emailuis/emailui/inc/FreestyleEmailUiLauncherGridVisualiser.h
branchRCL_3
changeset 17 67369d1b217f
parent 16 b5fbb9b25d57
child 20 efd4f1afd43e
equal deleted inserted replaced
16:b5fbb9b25d57 17:67369d1b217f
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    19 
    19 
    20 #ifndef __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__
    20 #ifndef __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__
    21 #define __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__
    21 #define __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__
    22 
    22 
    23 // SYSTEM INCLUDE FILES
    23 // SYSTEM INCLUDE FILES
    24 //<cmail> SF
       
    25 #include <alf/alfcontrol.h>
    24 #include <alf/alfcontrol.h>
    26 //</cmail>
       
    27 // for AIW handling
       
    28 #include <AiwServiceHandler.h>
    25 #include <AiwServiceHandler.h>
    29 //<cmail>
       
    30 #include <alf/alfdecklayout.h>
    26 #include <alf/alfdecklayout.h>
    31 #include <alf/alfgridlayout.h>
    27 #include <alf/alfgridlayout.h>
    32 #include <alf/alfmappingfunctions.h>
    28 #include <alf/alfmappingfunctions.h>
    33 #include <alf/alfbitmapprovider.h>
    29 #include <alf/alfbitmapprovider.h>
    34 //</cmail>
    30 #include <aknphysicsobserveriface.h>
    35 
    31 
    36 // INTERNAL INCLUDE FILES
    32 // INTERNAL INCLUDE FILES
    37 #include "FreestyleEmailUiViewBase.h"
    33 #include "FreestyleEmailUiViewBase.h"
    38 #include "FreestyleEmailUiLauncherGridModel.h"
    34 #include "FreestyleEmailUiLauncherGridModel.h"
    39 #include "FreestyleEmailUiAppui.h"
    35 #include "FreestyleEmailUiAppui.h"
    45 // FORWARD DECLARATIONS 
    41 // FORWARD DECLARATIONS 
    46 class CBrushAnimation;
    42 class CBrushAnimation;
    47 class CFsAlfScrollbarLayout;
    43 class CFsAlfScrollbarLayout;
    48 class CAknStylusPopUpMenu;
    44 class CAknStylusPopUpMenu;
    49 class CCoeControl;
    45 class CCoeControl;
    50 
    46 class CAknPhysics;
    51 
    47 
    52 class TFSLauncherGridMailboxStatus
    48 class TFSLauncherGridMailboxStatus
    53     {
    49     {
    54     public:
    50     public:
    55         TInt iMailboxCount;
    51         TInt iMailboxCount;
    63 class CFSEmailUiLauncherGridVisualiser : public CFsEmailUiViewBase,
    59 class CFSEmailUiLauncherGridVisualiser : public CFsEmailUiViewBase,
    64                      				   	 public MAlfBitmapProvider,
    60                      				   	 public MAlfBitmapProvider,
    65                      				   	 public MFSEmailLauncherItemObserver,
    61                      				   	 public MFSEmailLauncherItemObserver,
    66                      				   	 public MEikScrollBarObserver,
    62                      				   	 public MEikScrollBarObserver,
    67                      				   	 public MFSEmailUiMailboxDeleteObserver,
    63                      				   	 public MFSEmailUiMailboxDeleteObserver,
    68   									     public MFSEmailUiGenericTimerCallback
    64   									     public MFSEmailUiGenericTimerCallback,
       
    65   		                                 public MAknPhysicsObserver
    69     {
    66     {
    70 public:
    67 public:
    71     enum TDirection
    68     enum TDirection
    72         {
    69         {
    73         EDirectionRight=0,
    70         EDirectionRight=0,
   160 
   157 
   161     // Set refresh needed flag
   158     // Set refresh needed flag
   162 	void SetRefreshNeeded();
   159 	void SetRefreshNeeded();
   163 	// <cmail> 
   160 	// <cmail> 
   164     // Handling of foreground events
   161     // Handling of foreground events
   165 	void HandleForegroundEventL();
   162 	void HandleForegroundEventL( TBool aForeground );
   166 	
   163 	
   167     /**
   164     /**
   168      * From MEikScrollBarObserver
   165      * From MEikScrollBarObserver
   169      * 
   166      * 
   170      * Callback method for scroll bar events
   167      * Callback method for scroll bar events
   212 
   209 
   213 private: // from MFSEmailUiMailboxDeleteObserver
   210 private: // from MFSEmailUiMailboxDeleteObserver
   214     
   211     
   215     void MailboxDeletionComplete();
   212     void MailboxDeletionComplete();
   216     
   213     
       
   214 private: // from MAknPhysicsObserver
       
   215 
       
   216    /**
       
   217     * @see MAknPhysicsObserver::ViewPositionChanged
       
   218     */
       
   219    virtual void ViewPositionChanged( const TPoint& aNewPosition, 
       
   220            TBool aDrawNow, TUint aFlags );
       
   221 
       
   222    /**
       
   223     * @see MAknPhysicsObserver::PhysicEmulationEnded
       
   224     */
       
   225    virtual void PhysicEmulationEnded();
       
   226 
       
   227    /**
       
   228     * @see MAknPhysicsObserver::ViewPosition
       
   229     */
       
   230    virtual TPoint ViewPosition() const;
   217     
   231     
   218 private: // New methods.
   232 private: // New methods.
   219 
   233 
   220     CFSEmailUiLauncherGridVisualiser(CAlfEnv& aEnv, 
   234     CFSEmailUiLauncherGridVisualiser(CAlfEnv& aEnv, 
   221     					 CFSEmailUiLauncherGrid* aControl,
   235     					 CFSEmailUiLauncherGrid* aControl,
   322 	void UpdateLauncherItemListL();
   336 	void UpdateLauncherItemListL();
   323 	void SetDefaultStatusPaneTextL();
   337 	void SetDefaultStatusPaneTextL();
   324 
   338 
   325     void DetachSelectorMappingFunctions();
   339     void DetachSelectorMappingFunctions();
   326     void UpdateFocusVisibility();
   340     void UpdateFocusVisibility();
       
   341     void UpdatePhysicsL();
   327 
   342 
   328 private: // data
   343 private: // data
   329 	CAlfEnv& iEnv;
   344 	CAlfEnv& iEnv;
   330 	CAlfControl* iControl;
   345 	CAlfControl* iControl;
   331 	TLevel iCurrentLevel;
   346 	TLevel iCurrentLevel;
   420     
   435     
   421     CCoeControl* iCoeControl;
   436     CCoeControl* iCoeControl;
   422 
   437 
   423     // Timer to postpone the Drawing 
   438     // Timer to postpone the Drawing 
   424     CFSEmailUiGenericTimer* iStartupCallbackTimer;
   439     CFSEmailUiGenericTimer* iStartupCallbackTimer;
   425     };
   440     
       
   441     CAknPhysics* iPhysics;   
       
   442     TBool iPointerAction;
       
   443     TBool iIsDragging;
       
   444     TPoint iPreviousPosition;
       
   445     TPoint iOriginalPosition;
       
   446     TTime iStartTime;
       
   447     TBool iScrolled;
       
   448     TInt iTotalDragging;
       
   449     TBool iLaunchWizardExecuted; // prevents reentrant Wizard calling
       
   450     }; // class  CFSEmailUiLauncherGridVisualiser
   426 
   451 
   427 #endif // __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__
   452 #endif // __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__