msg_plat/smil_engine_api/inc/smillength.h
branchRCL_3
changeset 27 7fdbb852d323
parent 0 72b543305e3a
equal deleted inserted replaced
26:ebe688cedc25 27:7fdbb852d323
       
     1 /*
       
     2 * Copyright (c) 2003 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: smillength  declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SMILLENGTH_H
       
    21 #define SMILLENGTH_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <e32std.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 /**
       
    29  * Length class. The value can be percent or absolute.
       
    30  */
       
    31 class TSmilLength
       
    32 {
       
    33 public:
       
    34 
       
    35     enum TLenType { EInvalid, EFixed, EPercent, EAuto } ;
       
    36 
       
    37     TSmilLength();
       
    38     TSmilLength(TInt value);
       
    39     TSmilLength(TLenType type, TInt value);
       
    40     TSmilLength(const TDesC& aLen );
       
    41 
       
    42     TBool IsPercent() { return iType==EPercent; }
       
    43     TBool IsFixed() { return iType==EFixed; }
       
    44     TBool IsAuto() { return iType==EAuto; }
       
    45     TBool IsValid() { return iType!=EInvalid; }
       
    46 
       
    47     TInt GetLength(TInt relation);
       
    48 
       
    49     TLenType iType;
       
    50     TInt iValue;
       
    51 
       
    52 };
       
    53 
       
    54 
       
    55 
       
    56 #endif      // ?INCLUDE_H   
       
    57             
       
    58 // End of File