webengine/wmlengine/src/css/include/CSSPropVal.h
changeset 74 91031d3aab7d
parent 68 92a765b5b3e7
child 85 e358f2276d3f
equal deleted inserted replaced
68:92a765b5b3e7 74:91031d3aab7d
     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 the License "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:  Applies CSS property values
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TCSSPROPVAL_H
       
    20 #define TCSSPROPVAL_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include "CSSPropertyTable.h"
       
    25 #include "nw_css_processor.h"
       
    26 #include "nw_lmgr_box.h"
       
    27 #include "CSSParser.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  This class applies the CSS property values
       
    43 *
       
    44 *  @lib css.lib
       
    45 *  @since 2.1
       
    46 */
       
    47 class TCSSPropVal
       
    48   {
       
    49    public:
       
    50 
       
    51     static TBool SetColorL(TCSSParser* aParser,
       
    52                                 NW_LMgr_Property_t *aBoxVal,
       
    53                                 TCSSPropertyVal* aPropertyVal,
       
    54                                 TText16* aValStorage);
       
    55 
       
    56     static TBool SetNumberPropVal(NW_LMgr_PropertyName_t aPropName,
       
    57                                   NW_LMgr_Property_t *aProp,
       
    58                                   TUint8 aValueType,
       
    59                                   NW_Float32 aValue);
       
    60 
       
    61     static TBool SetImageValL(NW_LMgr_PropertyName_t aPropName,
       
    62                               NW_LMgr_Property_t *aVal,
       
    63                               TText16* aValStorage,
       
    64                               NW_CSS_Processor_t* aProcessor,
       
    65                               NW_LMgr_Box_t *box,
       
    66                               TInt aBufferIndex);
       
    67 
       
    68     static TBool SetTokenVal(NW_LMgr_PropertyName_t aPropName,
       
    69                                    NW_LMgr_Property_t *aProp,
       
    70                                    TUint32 aToken,
       
    71                                    NW_LMgr_Box_t* aBox);
       
    72 
       
    73    private:
       
    74 
       
    75      static TBool GetRGBValL(TCSSParser* aParser,
       
    76                              TCSSReaderUnit* aPropertyVal,
       
    77                              TInt8 aType,
       
    78                              TUint8* aVal);
       
    79 
       
    80      static TBool SetRGBColorL(TCSSParser* aParser,
       
    81                                NW_LMgr_Property_t *aProp,
       
    82                                TCSSPropertyVal* aPropertyVal);
       
    83 
       
    84      static TBool SetHexColor(NW_LMgr_Property_t *aProp, const TText16* aStorage);
       
    85 
       
    86 };
       
    87 
       
    88 #endif
       
    89