meetingrequest/mrguicommon/inc/nmrlayoutmanager.h
branchRCL_3
changeset 12 4ce476e64c59
child 16 b5fbb9b25d57
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     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         // TODO: 24h time editor
       
    67 
       
    68         // Option 7
       
    69         EMRLayoutSingleRowAColumnGraphic,
       
    70         EMRLayoutSingleRowDColumnGraphic,
       
    71 
       
    72         // Table 1.67
       
    73         // Option 0
       
    74         // Option 1
       
    75         // Option 2
       
    76         EMRLayoutCtrlBarGraphics,
       
    77         
       
    78 	    // Attacment type selection 
       
    79         EMRLayoutAttachmentSelectionGrid,
       
    80         EMRLayoutAttachmentSelectionGridCell,
       
    81         EMRLayoutAttachmentSelectionGridCellGraphic
       
    82 
       
    83     };
       
    84     
       
    85     /**
       
    86      * Enumeration for getting text component sizes, fonts, etc.
       
    87      */
       
    88     enum TMRTextLayout {
       
    89         // Table 1.53
       
    90         // Option 0
       
    91         EMRTextLayoutText,
       
    92         // Option 1
       
    93         EMRTextLayoutTextEditor,
       
    94         // Option 2
       
    95         EMRTextLayoutTimeEditorStart,
       
    96         EMRTextLayoutTimeEditorSeparator,
       
    97         EMRTextLayoutTimeEditorEnd,
       
    98         // Option 3
       
    99         EMRTextLayoutDateEditor,
       
   100         // Option 4
       
   101         EMRTextLayoutMultiRowTextEditor,
       
   102         // Option 5
       
   103         EMRTextLayoutCheckboxEditor,
       
   104 
       
   105         // Option 7
       
   106         EMRTextLayoutSingleRowEditorText,
       
   107 
       
   108         // Table 1.67
       
   109         // Option 0
       
   110         // Option 1
       
   111         // Option 2
       
   112         EMRLayoutCtrlBarTitle,
       
   113         
       
   114         // Attacment type selection 
       
   115         EMRTextLayoutAttachmentSelectionGridCellText
       
   116     };
       
   117     
       
   118     
       
   119     /**
       
   120      * Returns TAknWindowComponentLayout for logical TMRLayout from xml laf.
       
   121      * 
       
   122      * @param aLayout logical mr component id
       
   123      * @return layout struct from laf
       
   124      */
       
   125     IMPORT_C TAknWindowComponentLayout GetWindowComponentLayout( TMRLayout aLayout );
       
   126     
       
   127     /**
       
   128      * Returns TAknTextComponentLayout for logical TMRTextLayout from xml laf.
       
   129      * 
       
   130      * @param aLayout logical mr component id
       
   131      * @return layout struct from laf
       
   132      */
       
   133     IMPORT_C TAknTextComponentLayout GetTextComponentLayout( TMRTextLayout aLayout );
       
   134     
       
   135     /**
       
   136      * Returns window component's rect from layout data.
       
   137      * 
       
   138      * @param aParentRect parent component's rect.
       
   139      * @param aLayout component enumeration.
       
   140      * @return layout rect of the component.
       
   141      */
       
   142     IMPORT_C TAknLayoutRect GetLayoutRect( const TRect& aParentRect, TMRLayout aLayout );
       
   143     
       
   144     /**
       
   145      * Returns field's size from layout data.
       
   146      * 
       
   147      * @param aParentRect parent component's rect.
       
   148      * @param aRows field row count.
       
   149      * @return layout rect of the field.
       
   150      */
       
   151     IMPORT_C TAknLayoutRect GetFieldLayoutRect( const TRect& aParentRect, TInt aRows );
       
   152     
       
   153     /**
       
   154      * Returns rect for one field's row.
       
   155      * 
       
   156      * @param aParentRect field's rect.
       
   157      * @param aRow row which's rect to return.
       
   158      * @return layout rect of field's row.
       
   159      */
       
   160     IMPORT_C TAknLayoutRect GetFieldRowLayoutRect( const TRect& aParentRect, TInt aRow );
       
   161     
       
   162     /**
       
   163      * Returns text component's rect from layout data.
       
   164      * 
       
   165      * @param aParentRect parent component's rect.
       
   166      * @param aLayout text component enumeration.
       
   167      * @return text layout rect of text component.
       
   168      */
       
   169     IMPORT_C TAknLayoutText GetLayoutText( const TRect& aParentRect, TMRTextLayout aLayout );
       
   170     
       
   171     }
       
   172 
       
   173 #endif // NMRLAYOUTMANAGER_H
       
   174 
       
   175 // EOF