emailuis/emailui/inc/FreestyleEmailUiLayoutHandler.h
branchRCL_3
changeset 12 4ce476e64c59
parent 1 12c456ceeff2
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
    20 #define __FREESTYLEEMAILUI_LAYOUTHANDLER_H__
    20 #define __FREESTYLEEMAILUI_LAYOUTHANDLER_H__
    21 
    21 
    22 // SYSTEM INCLUDES
    22 // SYSTEM INCLUDES
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <e32hashtab.h>
    24 #include <e32hashtab.h>
    25 //<cmail> SF
       
    26 #include <alf/alfenv.h>
    25 #include <alf/alfenv.h>
    27 #include <alf/alftextstyle.h>
    26 #include <alf/alftextstyle.h>
    28 //</cmail> SF
       
    29 // <cmail> Platform layout change
       
    30 #include <AknLayout2ScalableDef.h>
    27 #include <AknLayout2ScalableDef.h>
    31 #include <AknUtils.h>
    28 #include <AknUtils.h>
    32 // </cmail> Platform layout change
       
    33 // INTERNAL INCLUDES
    29 // INTERNAL INCLUDES
    34 #include "FreestyleEmailUiLayoutData.h"
    30 #include "FreestyleEmailUiLayoutData.h"
    35 
    31 
    36 // FORWARD DECLARATIONS
    32 // FORWARD DECLARATIONS
    37 class CFsTreeList;
    33 class CFsTreeList;
    38 
    34 
    39 // CLASS DECLARATION
    35 // CLASS DECLARATION
    40 class CFSEmailUiLayoutHandler : public CBase
    36 class CFSEmailUiLayoutHandler : public CBase
    41     {
    37     {
    42     // <cmail>
       
    43 	public:
    38 	public:
    44     
    39     
    45         /*
    40         /*
    46          * Side parameter for drop down menu
    41          * Side parameter for drop down menu
    47          */
    42          */
    48         enum TDropDownMenuSide 
    43         enum TDropDownMenuSide 
    49             {
    44             {
    50             ELeft,
    45             ELeft,
    51             ERight
    46             ERight
    52             };
    47             };
    53     // </cmail>
       
    54 
    48 
    55     public: 
    49     public: 
    56     	static CFSEmailUiLayoutHandler* NewL( CAlfEnv& aEnv  );
    50     	static CFSEmailUiLayoutHandler* NewL( CAlfEnv& aEnv  );
    57     	~CFSEmailUiLayoutHandler();
    51     	~CFSEmailUiLayoutHandler();
    58 		
    52 				
    59 		// Function returns currently used screen resolution
       
    60 		TScreenResolution ScreenResolution() const;
       
    61 		
       
    62 		// Function returns orientation of the currect screen resolution
    53 		// Function returns orientation of the currect screen resolution
    63 		TScreenOrientation ScreenOrientation() const;
    54 		TScreenOrientation ScreenOrientation() const;
    64 		
       
    65 		// Function can be used to request screen resolution value update
       
    66 		void ScreenResolutionChanged();
       
    67 
    55 
    68 		// Main UI grid icon size
    56 		// Main UI grid icon size
    69 		TSize GridIconSize() const;
    57 		TSize GridIconSize() const;
    70 
    58 
    71 		// Grid rows and columns
    59 		// Grid rows and columns
   274         TRect GetControlBarRect() const;
   262         TRect GetControlBarRect() const;
   275 
   263 
   276         TRect GetListRect( TBool aControlsOnTop = EFalse ) const;
   264         TRect GetListRect( TBool aControlsOnTop = EFalse ) const;
   277 
   265 
   278 		CAlfTextStyle& FSTextStyleFromLayoutL( const TAknTextComponentLayout& aLayout  );
   266 		CAlfTextStyle& FSTextStyleFromLayoutL( const TAknTextComponentLayout& aLayout  );
   279 //<cmail>
       
   280 		TInt TitleCaptionPadding() const;
   267 		TInt TitleCaptionPadding() const;
   281 
       
   282         TRect ListCmailPaneRect() const;
   268         TRect ListCmailPaneRect() const;
   283 
   269 
   284 		TAknLayoutText GetSearchListHeaderTextLayout() const;
   270 		TAknLayoutText GetSearchListHeaderTextLayout() const;
   285 
   271 
   286 		// Separator size
   272 		// Separator size
   290         TRgb CFSEmailUiLayoutHandler::SeparatorLineColor() const;        
   276         TRgb CFSEmailUiLayoutHandler::SeparatorLineColor() const;        
   291 
   277 
   292 		// Padding value for drop down menu
   278 		// Padding value for drop down menu
   293         TInt DropDownMenuListPadding() const;
   279         TInt DropDownMenuListPadding() const;
   294 
   280 
   295 // </cmail>
       
   296 
       
   297     private:
   281     private:
   298 		CFSEmailUiLayoutHandler( CAlfEnv& aEnv );
   282 		CFSEmailUiLayoutHandler( CAlfEnv& aEnv );
   299      	void ConstructL(); 
   283      	void ConstructL(); 
   300  
   284  
   301      	TRgb GetSkinColor( const TAknsItemID& aID, TInt aIndex, const TRgb& aFallbackColor ) const;
   285      	TRgb GetSkinColor( const TAknsItemID& aID, TInt aIndex, const TRgb& aFallbackColor ) const;
   302 // <cmail> Platform layout change
       
   303         void DeleteTextStyles();
   286         void DeleteTextStyles();
   304 // </cmail> Platform layout change
       
   305 
   287 
   306 	private:
   288 	private:
   307 		CAlfEnv& iEnv;
   289 		CAlfEnv& iEnv;
   308 		TScreenResolution iScreenResolution;
       
   309 // <cmail> Platform layout change
       
   310 		RHashMap< TAknTextComponentLayout, CAlfTextStyle* > iTextStyleMap;
   290 		RHashMap< TAknTextComponentLayout, CAlfTextStyle* > iTextStyleMap;
   311 // </cmail> Platform layout change
       
   312 // <cmail> Text Styles
       
   313         TInt iNormalTextStyle;
       
   314         TInt iLargeTextStyle;
       
   315         TInt iSmallTextStyle;
       
   316 // </cmail>
       
   317 	};
   291 	};
   318 
   292 
   319 #endif //__FREESTYLEEMAILUI_LAYOUTHANDLER_H__
   293 #endif //__FREESTYLEEMAILUI_LAYOUTHANDLER_H__
   320 
   294 
   321 // End of File
   295 // End of File