svgtopt/SVG/SVGImpl/inc/SVGMpathElementImpl.h
changeset 0 d46562c3d99d
equal deleted inserted replaced
-1:000000000000 0:d46562c3d99d
       
     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:  SVG Implementation header file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __INC_CSVGMPATHELEMENTIMPL__
       
    20 #define __INC_CSVGMPATHELEMENTIMPL__
       
    21 
       
    22 #include "SVGElementImpl.h"
       
    23 
       
    24 
       
    25 
       
    26 class   CGfxGeneralMpath;
       
    27 class   CSvgDocumentImpl;
       
    28 
       
    29 
       
    30 /**
       
    31  * Class description goes here.
       
    32  *
       
    33  *  @lib SVGEngine.lib
       
    34  *  @since 1.0
       
    35  */
       
    36 class CSvgMpathElementImpl : public CSvgElementImpl
       
    37     {
       
    38     public:
       
    39 
       
    40         // Constructor/deconstructor
       
    41 
       
    42 		/**
       
    43          * Need method description
       
    44          *
       
    45          * @since 1.0
       
    46          * @param
       
    47          * @return
       
    48          */
       
    49         static CSvgMpathElementImpl*NewL(  const TUint8 aElemID,
       
    50                                       CSvgDocumentImpl* aDoc );
       
    51 
       
    52 		/**
       
    53          * Need method description
       
    54          *
       
    55          * @since 1.0
       
    56          * @param
       
    57          * @return
       
    58          */
       
    59         static CSvgMpathElementImpl*NewLC(  const TUint8 aElemID,
       
    60                                        CSvgDocumentImpl* aDoc );
       
    61 
       
    62 	private:
       
    63 		/**
       
    64          * Need method description
       
    65          *
       
    66          * @since 1.0
       
    67          * @param
       
    68          * @return
       
    69          */
       
    70         void                            ConstructL(  const TUint8 aElemID  );
       
    71 
       
    72 
       
    73 
       
    74 	public:
       
    75 
       
    76         /**
       
    77          * Need method description
       
    78          *
       
    79          * @since 1.0
       
    80          * @param
       
    81          * @return
       
    82          */
       
    83                                     ~CSvgMpathElementImpl();
       
    84 
       
    85         // From MXmlElement API
       
    86 
       
    87 
       
    88         /**
       
    89          * Need method description
       
    90          *
       
    91          * @since 1.0
       
    92          * @param
       
    93          * @return
       
    94          */
       
    95         TInt                        SetAttributeL( const TDesC& aName,
       
    96                                                    const TDesC& aValue );
       
    97 
       
    98         /**
       
    99          * Need method description
       
   100          *
       
   101          * @since 1.0
       
   102          * @param
       
   103          * @return
       
   104          */
       
   105         TBool                       DrawL( CGfx2dGc* aGc,
       
   106                                            CSvgElementImpl* aElement );
       
   107         // From MXmlElementOpt API
       
   108 
       
   109 
       
   110         /**
       
   111          * Need method description
       
   112          *
       
   113          * @since 1.0
       
   114          * @param
       
   115          * @return
       
   116          */
       
   117         TInt                        GetAttributePath( const TInt aNameId,
       
   118                                                       CGfxGeneralPath*& aValue );
       
   119 
       
   120         /**
       
   121          * Need method description
       
   122          *
       
   123          * @since 1.0
       
   124          * @param
       
   125          * @return
       
   126          */
       
   127         TInt                        SetAttributePathL( const TInt aNameId,
       
   128                                                        CGfxGeneralPath* aValue );
       
   129 
       
   130 		void                        SetAttributePathByIdL(const TDesC& aId);
       
   131 
       
   132         /**
       
   133          * Return wether an svg element is displayable, such as <rect>, <circle>, or
       
   134          * an abstract element, such as <g>, <animate>.
       
   135          *
       
   136          * @since 1.0
       
   137          * @param None
       
   138          * @return ETrue if element is viewable.
       
   139          */
       
   140         TBool               IsViewable() { return ETrue; }
       
   141 
       
   142     private:
       
   143 
       
   144         CGfxGeneralPath*            iShape;
       
   145 		HBufC*						iParsedHref;
       
   146 		TBool						iNeedTarget;
       
   147 
       
   148 
       
   149 
       
   150         /**
       
   151          * Need method description
       
   152          *
       
   153          * @since 1.0
       
   154          * @param
       
   155          * @return
       
   156          */
       
   157                                     CSvgMpathElementImpl( CSvgDocumentImpl* aDoc );
       
   158 
       
   159     public:
       
   160 
       
   161         /**
       
   162          * Need method description
       
   163          *
       
   164          * @since 1.0
       
   165          * @param
       
   166          * @return
       
   167          */
       
   168         MXmlElement*                    CloneL(MXmlElement* aParentElement);
       
   169 
       
   170 		void							Print( TBool aIsEncodeOn );
       
   171 		
       
   172     protected:
       
   173 
       
   174         /**
       
   175          * Need method description
       
   176          *
       
   177          * @since 1.0
       
   178          * @param
       
   179          * @return
       
   180          */
       
   181         void                            CopyL( CSvgMpathElementImpl* aDestElement );
       
   182 
       
   183     };
       
   184 
       
   185 #endif /* _INC_CSVGMPATHELEMENT_ */