menufw/menufwui/mmwidgets/inc/mmlctutils.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007 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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MMLCTUTILS_H
       
    21 #define MMLCTUTILS_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 #include <aknlayoutscalable_uiaccel.cdl.h>
       
    27 #include <aknlayoutscalable_avkon.cdl.h>
       
    28 #include <AknDef.hrh>
       
    29 #include "mmtemplatelibrary.h"
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  Utilities for LCT scalable layout support in Multimedia Menu.
       
    35  * 
       
    36  *  @code
       
    37  *  @endcode
       
    38  *  @lib mmwidgets
       
    39  *  @since S60 v3.0
       
    40  *  @ingroup group_mmwidgets
       
    41  */
       
    42 class MmLCTUtils
       
    43 	{
       
    44 	
       
    45 public:
       
    46 
       
    47 	/**
       
    48 	 * Gets the window component layout for the given layout name and variety.
       
    49 	 * 
       
    50 	 * @since S60 v3.0
       
    51 	 * @param aLayout Name of the layout.
       
    52 	 * @param aVariety Variety for the layout.
       
    53 	 * @return Window component layout.
       
    54 	 */
       
    55 	static TAknWindowComponentLayout ItemLayout (const TDesC8& aLayout,
       
    56 			TInt aVariety);
       
    57 	
       
    58     /**
       
    59      * Gets the text component layout for the given layout name and variety.
       
    60      * 
       
    61      * @since S60 v3.0
       
    62      * @param aLayout Name of the layout.
       
    63      * @param aVariety Variety for the layout.
       
    64      * @return Text component layout.
       
    65      */
       
    66 	static TAknTextComponentLayout
       
    67 			TextLayout (const TDesC8& aLayout, TInt aVariety);
       
    68 	
       
    69     /**
       
    70      * Gets the Window component layout for the given layout name and variety. Used for setting up graphical subcells.
       
    71      * 
       
    72      * @since S60 v3.0
       
    73      * @param aLayout Name of the layout.
       
    74      * @param aVariety Variety for the layout.
       
    75      * @return Window component layout.
       
    76      */
       
    77 	static TAknWindowComponentLayout GraphicLayout (const TDesC8& aLayout,
       
    78 			TInt aVariety);
       
    79 	
       
    80     /**
       
    81      * Sets up template data for text subcell.
       
    82      * 
       
    83      * @since S60 v3.0
       
    84      * @param aItemSize Size of the parent item.
       
    85      * @param aSubCellTemplate Template data to be set.
       
    86      */
       
    87 	static void SetupTextSubCellTemplate (TSize aItemSize,
       
    88 			TTemplateChild& aSubCellTemplate);
       
    89 	
       
    90     /**
       
    91      * Sets up template data for graphic subcell.
       
    92      * 
       
    93      * @since S60 v3.0
       
    94      * @param aItemSize Size of the parent item.
       
    95      * @param aSubCellTemplate Template data to be set.
       
    96      */
       
    97 	static void SetupGraphicSubCellTemplate (TSize aItemSize,
       
    98 			TTemplateChild& aSubCellTemplate);
       
    99 	
       
   100     /**
       
   101      * Calculates the item size using LCT.
       
   102      * 
       
   103      * @since S60 v3.0
       
   104      * @param aLCTTemplate Name of the layout.
       
   105      * @param aVariety Variety for the layout.
       
   106      * @param aParentRect Parent rectangle.
       
   107      * @param aWindowLayout Window component layout to be set.
       
   108      * @return Size of the item calculated by LCT.
       
   109      */
       
   110 	static TSize GetLCTSize (const TDesC8& aLCTTemplate, TInt aVariety,
       
   111 			const TRect aParentRect, TAknWindowLineLayout& aWindowLayout );
       
   112 
       
   113     /**
       
   114      * Calculates the layout size using LCT.
       
   115      * 
       
   116      * @since S60 v3.0
       
   117      * @param aLCTTemplate Name of the layout template.
       
   118      * @param aVariety Variation of the layout.
       
   119      * @return Size of the layout (e.g 3x4) calculated by LCT.
       
   120      */
       
   121 	static TSize GetLayoutSize( const TDesC8& aLCTTemplate, TInt aVariety );
       
   122     
       
   123 	/**
       
   124      * Gets the structure of parameters for a given layout.
       
   125      * 
       
   126      * @since S60 v3.0
       
   127      * @param aLayout Name of the layout template.
       
   128      * @param aVariety Variation of the layout.
       
   129      * @return 
       
   130      */
       
   131 	static TAknLayoutScalableParameterLimits LCTParameterLimits( const TDesC8& aLayout, TInt aVariety );
       
   132 	};
       
   133 
       
   134 #endif // MMLCTUTILS_H
       
   135