meetingrequest/mrgui/inc/nmrlayoutmanager.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
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         // Table 1.53
       
    46         // Option 0
       
    47         // Option 1
       
    48         EMRLayoutTextEditorIcon,
       
    49         EMRLayoutTextEditorBg,
       
    50         // Option 2
       
    51         EMRLayoutTimeEditorIcon,
       
    52         EMRLayoutTimeEditorStartBg,
       
    53         EMRLayoutTimeEditorEndBg,
       
    54         // Option 3
       
    55         EMRLayoutDateEditorIcon,
       
    56         EMRLayoutDateEditorBg,
       
    57         // Option 4
       
    58         // Option 5
       
    59         EMRLayoutCheckboxIcon,
       
    60         
       
    61         // Table 1.67
       
    62         // Option 0
       
    63         // Option 1
       
    64         // Option 2
       
    65         EMRLayoutCtrlBarGraphics
       
    66     };
       
    67     
       
    68     /**
       
    69      * Enumeration for getting text component sizes, fonts, etc.
       
    70      */
       
    71     enum TMRTextLayout {
       
    72         // Table 1.53
       
    73         // Option 0
       
    74         EMRTextLayoutText,
       
    75         // Option 1
       
    76         EMRTextLayoutTextEditor,
       
    77         // Option 2
       
    78         EMRTextLayoutTimeEditorStart,
       
    79         EMRTextLayoutTimeEditorSeparator,
       
    80         EMRTextLayoutTimeEditorEnd,
       
    81         // Option 3
       
    82         EMRTextLayoutDateEditor,
       
    83         // Option 4
       
    84         EMRTextLayoutMultiRowTextEditor,
       
    85         // Option 5
       
    86         EMRTextLayoutCheckboxEditor,
       
    87         
       
    88         // Table 1.67
       
    89         // Option 0
       
    90         // Option 1
       
    91         // Option 2
       
    92         EMRLayoutCtrlBarTitle
       
    93     };
       
    94     
       
    95     
       
    96     /**
       
    97      * Returns TAknWindowComponentLayout for logical TMRLayout from xml laf.
       
    98      * 
       
    99      * @param aLayout logical mr component id
       
   100      * @return layout struct from laf
       
   101      */
       
   102     IMPORT_C TAknWindowComponentLayout GetWindowComponentLayout( TMRLayout aLayout );
       
   103     
       
   104     /**
       
   105      * Returns TAknTextComponentLayout for logical TMRTextLayout from xml laf.
       
   106      * 
       
   107      * @param aLayout logical mr component id
       
   108      * @return layout struct from laf
       
   109      */
       
   110     IMPORT_C TAknTextComponentLayout GetTextComponentLayout( TMRTextLayout aLayout );
       
   111     
       
   112     /**
       
   113      * Returns window component's rect from layout data.
       
   114      * 
       
   115      * @param aParentRect parent component's rect.
       
   116      * @param aLayout component enumeration.
       
   117      * @return layout rect of the component.
       
   118      */
       
   119     IMPORT_C TAknLayoutRect GetLayoutRect( const TRect& aParentRect, TMRLayout aLayout );
       
   120     
       
   121     /**
       
   122      * Returns field's size from layout data.
       
   123      * 
       
   124      * @param aParentRect parent component's rect.
       
   125      * @param aRows field row count.
       
   126      * @return layout rect of the field.
       
   127      */
       
   128     IMPORT_C TAknLayoutRect GetFieldLayoutRect( const TRect& aParentRect, TInt aRows );
       
   129     
       
   130     /**
       
   131      * Returns rect for one field's row.
       
   132      * 
       
   133      * @param aParentRect field's rect.
       
   134      * @param aRow row which's rect to return.
       
   135      * @return layout rect of field's row.
       
   136      */
       
   137     IMPORT_C TAknLayoutRect GetFieldRowLayoutRect( const TRect& aParentRect, TInt aRow );
       
   138     
       
   139     /**
       
   140      * Returns text component's rect from layout data.
       
   141      * 
       
   142      * @param aParentRect parent component's rect.
       
   143      * @param aLayout text component enumeration.
       
   144      * @return text layout rect of text component.
       
   145      */
       
   146     IMPORT_C TAknLayoutText GetLayoutText( const TRect& aParentRect, TMRTextLayout aLayout );
       
   147     
       
   148     }
       
   149 
       
   150 #endif // NMRLAYOUTMANAGER_H
       
   151 
       
   152 // EOF