uiacceltk/hitchcock/Client/src/alfmetric.cpp
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "alf/alfmetric.h"  // Class definition
       
    21 
       
    22 EXPORT_C TAlfMetric::TAlfMetric(TReal32 aMagnitude, TInt aUnit, TInt aReferenceTextStyleId) __SOFTFP
       
    23     :
       
    24     iMagnitude(aMagnitude),
       
    25     iUnit(aUnit),
       
    26     iReferenceTextStyleId(aReferenceTextStyleId)
       
    27     {
       
    28     }
       
    29 
       
    30 EXPORT_C TAlfMetric::TAlfMetric(TInt aPixels)
       
    31     : 
       
    32     iMagnitude(aPixels),
       
    33     iUnit(EAlfUnitPixel),
       
    34     iReferenceTextStyleId(EAlfTextStyleNormal)
       
    35     {    
       
    36     }
       
    37 
       
    38 EXPORT_C TAlfXYMetric::TAlfXYMetric()
       
    39     {
       
    40     }
       
    41     
       
    42 EXPORT_C TAlfXYMetric::TAlfXYMetric(const TAlfMetric& aMetric)
       
    43     : iX(aMetric),
       
    44       iY(aMetric)
       
    45     {
       
    46     }
       
    47         
       
    48 EXPORT_C TAlfXYMetric::TAlfXYMetric(const TAlfMetric& aX,  const TAlfMetric& aY)
       
    49     :
       
    50     iX(aX),
       
    51     iY(aY)
       
    52     {
       
    53     
       
    54     }
       
    55 
       
    56 EXPORT_C TAlfBoxMetric::TAlfBoxMetric()
       
    57     {
       
    58     }
       
    59 
       
    60 EXPORT_C TAlfBoxMetric::TAlfBoxMetric(const TAlfMetric& aMetric)
       
    61         : iLeft(aMetric), 
       
    62           iRight(aMetric),
       
    63           iTop(aMetric),
       
    64           iBottom(aMetric)
       
    65     {
       
    66     }
       
    67 
       
    68 EXPORT_C TAlfBoxMetric::TAlfBoxMetric(const TAlfXYMetric& aMetric)
       
    69         : iLeft(aMetric.iX),
       
    70           iRight(aMetric.iX),
       
    71           iTop(aMetric.iY),
       
    72           iBottom(aMetric.iY)
       
    73     {
       
    74     }
       
    75 
       
    76 EXPORT_C TAlfBoxMetric::TAlfBoxMetric(const TAlfXYMetric& aTopLeft, 
       
    77         const TAlfXYMetric& aBottomRight)
       
    78         : iLeft(aTopLeft.iX),
       
    79           iRight(aBottomRight.iX),
       
    80           iTop(aTopLeft.iY),
       
    81           iBottom(aBottomRight.iY)
       
    82     {        
       
    83     }
       
    84 
       
    85 
       
    86 EXPORT_C TAlfBoxMetric::TAlfBoxMetric(
       
    87     const TAlfMetric& aLeft, 
       
    88     const TAlfMetric& aRight,
       
    89     const TAlfMetric& aTop, 
       
    90     const TAlfMetric& aBottom)
       
    91     : 
       
    92     iLeft(aLeft), 
       
    93     iRight(aRight), 
       
    94     iTop(aTop), 
       
    95     iBottom(aBottom)
       
    96     {
       
    97     }
       
    98