meetingrequest/mrguicommon/inc/nmrlayoutmanager.h
branchRCL_3
changeset 64 3533d4323edc
equal deleted inserted replaced
63:d189ee25cf9d 64:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Layout manager for MRGUI usage.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMRLAYOUTMANAGER_H
       
    19 #define NMRLAYOUTMANAGER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <AknUtils.h>
       
    23 #include <AknLayout2ScalableDef.h>
       
    24 
       
    25 
       
    26 namespace NMRLayoutManager
       
    27     {
       
    28 
       
    29     /**
       
    30      * Enumeration for getting window component sizes.
       
    31      */
       
    32     enum TMRLayout {
       
    33         // Table 1.1
       
    34         EMRLayoutDialog,
       
    35         // Table 1.48 (Mrui)
       
    36         EMRLayoutCtrlBar,
       
    37         EMRLayoutContentArea,
       
    38         EMRLayoutDialogBg,
       
    39         // Table 1.49
       
    40         EMRLayoutDialogBgGraphics,
       
    41         // Table 1.50
       
    42         EMRLayoutListArea,
       
    43         EMRLayoutScrollBar,
       
    44 
       
    45         EMRLayoutStripe,
       
    46         EMRLayoutMRNaviArrowLeft,
       
    47         EMRLayoutMRNaviArrowRight,
       
    48         
       
    49         // Table 1.53
       
    50         // Option 0
       
    51         // Option 1
       
    52         EMRLayoutTextEditorIcon,
       
    53         EMRLayoutTextEditorBg,
       
    54         // Option 2
       
    55         EMRLayoutTimeEditorIcon,
       
    56         EMRLayoutTimeEditorStartBg,
       
    57         EMRLayoutTimeEditorEndBg,
       
    58         // Option 3
       
    59         EMRLayoutDateEditorIcon,
       
    60         EMRLayoutDateEditorBg,
       
    61         // Option 4
       
    62         // Option 5
       
    63         EMRLayoutCheckboxIcon,
       
    64         
       
    65         // Option 6
       
    66         // Option 7
       
    67         EMRLayoutSingleRowAColumnGraphic,
       
    68         EMRLayoutSingleRowDColumnGraphic,
       
    69 
       
    70         // Table 1.67
       
    71         // Option 0
       
    72         // Option 1
       
    73         // Option 2
       
    74         EMRLayoutCtrlBarGraphics,
       
    75         
       
    76 	    // Attacment type selection 
       
    77         EMRLayoutAttachmentSelectionGrid,
       
    78         EMRLayoutAttachmentSelectionGridCell,
       
    79         EMRLayoutAttachmentSelectionGridCellGraphic
       
    80 
       
    81     };
       
    82     
       
    83     /**
       
    84      * Enumeration for getting text component sizes, fonts, etc.
       
    85      */
       
    86     enum TMRTextLayout {
       
    87         // Table 1.53
       
    88         // Option 0
       
    89         EMRTextLayoutText,
       
    90         // Option 1
       
    91         EMRTextLayoutTextEditor,
       
    92         // Option 2
       
    93         EMRTextLayoutTimeEditorStart,
       
    94         EMRTextLayoutTimeEditorSeparator,
       
    95         EMRTextLayoutTimeEditorEnd,
       
    96         // Option 3
       
    97         EMRTextLayoutDateEditor,
       
    98         // Option 4
       
    99         EMRTextLayoutMultiRowTextEditor,
       
   100         // Option 5
       
   101         EMRTextLayoutCheckboxEditor,
       
   102 
       
   103         // Option 7
       
   104         EMRTextLayoutSingleRowEditorText,
       
   105 
       
   106         // Table 1.67
       
   107         // Option 0
       
   108         // Option 1
       
   109         // Option 2
       
   110         EMRLayoutCtrlBarTitle,
       
   111         
       
   112         // Attacment type selection 
       
   113         EMRTextLayoutAttachmentSelectionGridCellText
       
   114     };
       
   115     
       
   116     
       
   117     /**
       
   118      * Returns TAknWindowComponentLayout for logical TMRLayout from xml laf.
       
   119      * 
       
   120      * @param aLayout logical mr component id
       
   121      * @return layout struct from laf
       
   122      */
       
   123     IMPORT_C TAknWindowComponentLayout GetWindowComponentLayout( TMRLayout aLayout );
       
   124     
       
   125     /**
       
   126      * Returns TAknTextComponentLayout for logical TMRTextLayout from xml laf.
       
   127      * 
       
   128      * @param aLayout logical mr component id
       
   129      * @return layout struct from laf
       
   130      */
       
   131     IMPORT_C TAknTextComponentLayout GetTextComponentLayout( TMRTextLayout aLayout );
       
   132     
       
   133     /**
       
   134      * Returns window component's rect from layout data.
       
   135      * 
       
   136      * @param aParentRect parent component's rect.
       
   137      * @param aLayout component enumeration.
       
   138      * @return layout rect of the component.
       
   139      */
       
   140     IMPORT_C TAknLayoutRect GetLayoutRect( const TRect& aParentRect, TMRLayout aLayout );
       
   141     
       
   142     /**
       
   143      * Returns field's size from layout data.
       
   144      * 
       
   145      * @param aParentRect parent component's rect.
       
   146      * @param aRows field row count.
       
   147      * @return layout rect of the field.
       
   148      */
       
   149     IMPORT_C TAknLayoutRect GetFieldLayoutRect( const TRect& aParentRect, TInt aRows );
       
   150     
       
   151     /**
       
   152      * Returns rect for one field's row.
       
   153      * 
       
   154      * @param aParentRect field's rect.
       
   155      * @param aRow row which's rect to return.
       
   156      * @return layout rect of field's row.
       
   157      */
       
   158     IMPORT_C TAknLayoutRect GetFieldRowLayoutRect( const TRect& aParentRect, TInt aRow );
       
   159     
       
   160     /**
       
   161      * Returns text component's rect from layout data.
       
   162      * 
       
   163      * @param aParentRect parent component's rect.
       
   164      * @param aLayout text component enumeration.
       
   165      * @return text layout rect of text component.
       
   166      */
       
   167     IMPORT_C TAknLayoutText GetLayoutText( const TRect& aParentRect, TMRTextLayout aLayout );
       
   168     
       
   169     }
       
   170 
       
   171 #endif // NMRLAYOUTMANAGER_H
       
   172 
       
   173 // EOF