svgtopt/SVG/SVGImpl/src/SVGEventAttributes.cpp
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 source file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include "SVGEventAttributes.h"
       
    20 
       
    21 
       
    22 // ---------------------------------------------------------------------------
       
    23 // Constructor
       
    24 // ---------------------------------------------------------------------------
       
    25 CSvgEventAttributes::CSvgEventAttributes() : iOnClick( NULL ),
       
    26                                              iOnLoad( NULL ),
       
    27                                              iOnMouseMove( NULL )
       
    28     {
       
    29     }
       
    30 
       
    31 CSvgEventAttributes::~CSvgEventAttributes()
       
    32     {
       
    33     delete iOnClick;
       
    34     delete iOnLoad;
       
    35     delete iOnMouseMove;
       
    36     }
       
    37 
       
    38 void CSvgEventAttributes::SetOnClickL( const TDesC& aString )
       
    39     {
       
    40     if ( iOnClick != NULL )
       
    41         {
       
    42         delete iOnClick;
       
    43         iOnClick = NULL;
       
    44         }
       
    45     iOnClick = aString.AllocL();
       
    46     }
       
    47 
       
    48 const HBufC* CSvgEventAttributes::OnClick()
       
    49     {
       
    50     return iOnClick;
       
    51     }
       
    52 
       
    53 void CSvgEventAttributes::SetOnLoadL( const TDesC& aString )
       
    54     {
       
    55     if ( iOnLoad != NULL )
       
    56         {
       
    57         delete iOnLoad;
       
    58         iOnLoad = NULL;
       
    59         }
       
    60     iOnLoad = aString.AllocL();
       
    61     }
       
    62 
       
    63 const HBufC* CSvgEventAttributes::OnLoad()
       
    64     {
       
    65     return iOnLoad;
       
    66     }
       
    67 
       
    68 void CSvgEventAttributes::SetOnMouseMoveL( const TDesC& aString )
       
    69     {
       
    70     if ( iOnMouseMove != NULL )
       
    71         {
       
    72         delete iOnMouseMove;
       
    73         iOnMouseMove = NULL;
       
    74         }
       
    75     iOnMouseMove = aString.AllocL();
       
    76     }
       
    77 
       
    78 const HBufC* CSvgEventAttributes::OnMouseMove()
       
    79     {
       
    80     return iOnMouseMove;
       
    81     }