phoneuis/BubbleManager/bmcustomization/src/telbubblecustomelement.cpp
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Capsulates animation, image, label or control information.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "telbubblecustomelement.h"
       
    20 #include "telbubbleanim.h"
       
    21 #include "telbubbleimage.h"
       
    22 #include "telbubblelabel.h"
       
    23 #include "telbubblecallimage.h"
       
    24 
       
    25 // ======== LOCAL FUNCTIONS ========
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // CBubbleCustomElement::NewL
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C CTelBubbleCustomElement* CTelBubbleCustomElement::NewL( 
       
    32     CCoeControl* aControl, TElementType aElement )
       
    33     {
       
    34     CTelBubbleCustomElement* self = new( ELeave )CTelBubbleCustomElement( 
       
    35         aControl, aElement );
       
    36     
       
    37     return self;
       
    38     }
       
    39     
       
    40 // ---------------------------------------------------------------------------
       
    41 // CTelBubbleCustomElement::NewL
       
    42 // ---------------------------------------------------------------------------
       
    43 //
       
    44 EXPORT_C CTelBubbleCustomElement* CTelBubbleCustomElement::NewL( 
       
    45     CTelBubbleAnim* aControl, TElementType aElement )
       
    46     {
       
    47     CTelBubbleCustomElement* self = new( ELeave )CTelBubbleCustomElement( 
       
    48         aControl, aElement );
       
    49     
       
    50     return self;
       
    51     }
       
    52 
       
    53 // ---------------------------------------------------------------------------
       
    54 // CTelBubbleCustomElement::NewL
       
    55 // ---------------------------------------------------------------------------
       
    56 //
       
    57 EXPORT_C CTelBubbleCustomElement* CTelBubbleCustomElement::NewL( 
       
    58     CTelBubbleLabel* aControl, TElementType aElement )
       
    59     {
       
    60     CTelBubbleCustomElement* self = new( ELeave )CTelBubbleCustomElement( 
       
    61         aControl, aElement );
       
    62     
       
    63     return self;
       
    64     }
       
    65     
       
    66 // ---------------------------------------------------------------------------
       
    67 // CTelBubbleCustomElement::NewL
       
    68 // ---------------------------------------------------------------------------
       
    69 //
       
    70 EXPORT_C CTelBubbleCustomElement* CTelBubbleCustomElement::NewL(
       
    71     CTelBubbleImage* aControl, TElementType aElement )
       
    72     {
       
    73     CTelBubbleCustomElement* self = new( ELeave )CTelBubbleCustomElement( 
       
    74         aControl, aElement );
       
    75     
       
    76     return self;
       
    77     }
       
    78 
       
    79 // ---------------------------------------------------------------------------
       
    80 // CTelBubbleCustomElement::NewL
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 EXPORT_C CTelBubbleCustomElement* CTelBubbleCustomElement::NewL(
       
    84     CTelBubbleCallImage* aControl, TElementType aElement )
       
    85     {
       
    86     CTelBubbleCustomElement* self = new( ELeave )CTelBubbleCustomElement( 
       
    87         aControl, aElement );
       
    88     
       
    89     return self;
       
    90     }
       
    91     
       
    92 // ---------------------------------------------------------------------------
       
    93 // CTelBubbleCustomElement::Control
       
    94 // ---------------------------------------------------------------------------
       
    95 //
       
    96 EXPORT_C CCoeControl* CTelBubbleCustomElement::Control() const
       
    97     {
       
    98     return iControl;
       
    99     }
       
   100 
       
   101 // ---------------------------------------------------------------------------
       
   102 // CTelBubbleCustomElement::Element
       
   103 // ---------------------------------------------------------------------------
       
   104 //
       
   105 EXPORT_C CTelBubbleCustomElement::TElementType 
       
   106     CTelBubbleCustomElement::ElementType() const
       
   107     {
       
   108     return iElementType;
       
   109     }
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // CTelBubbleCustomElement::Type
       
   113 // ---------------------------------------------------------------------------
       
   114 //
       
   115 EXPORT_C CTelBubbleCustomElement::TControlType 
       
   116     CTelBubbleCustomElement::ControlType() const
       
   117     {
       
   118     return iControlType;
       
   119     }
       
   120 
       
   121 // ---------------------------------------------------------------------------
       
   122 // CTelBubbleCustomElement::~CTelBubbleCustomElement
       
   123 // ---------------------------------------------------------------------------
       
   124 //
       
   125 EXPORT_C CTelBubbleCustomElement::~CTelBubbleCustomElement()
       
   126     {
       
   127     delete iControl;
       
   128     }
       
   129 
       
   130 // ---------------------------------------------------------------------------
       
   131 // CTelBubbleCustomElement::CTelBubbleCustomElement
       
   132 // ---------------------------------------------------------------------------
       
   133 //
       
   134 CTelBubbleCustomElement::CTelBubbleCustomElement(
       
   135     CCoeControl* aControl, TElementType aElement ) :
       
   136     iControl( aControl ),
       
   137     iElementType( aElement )
       
   138     {
       
   139     iControlType = EBubbleControl;
       
   140     }
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // CTelBubbleCustomElement::CTelBubbleCustomElement
       
   144 // ---------------------------------------------------------------------------
       
   145 //
       
   146 CTelBubbleCustomElement::CTelBubbleCustomElement( 
       
   147     CTelBubbleAnim* aControl, TElementType aElement ) :
       
   148     iControl( aControl ),
       
   149     iElementType( aElement )
       
   150     {
       
   151     iControlType = EBubbleAnimation;
       
   152     }
       
   153 
       
   154 // ---------------------------------------------------------------------------
       
   155 // CTelBubbleCustomElement::CTelBubbleCustomElement
       
   156 // ---------------------------------------------------------------------------
       
   157 //
       
   158 CTelBubbleCustomElement::CTelBubbleCustomElement( 
       
   159     CTelBubbleLabel* aControl, TElementType aElement ) :
       
   160     iControl( aControl ),
       
   161     iElementType( aElement )
       
   162     {
       
   163     iControlType = EBubbleLabel;
       
   164     }
       
   165 
       
   166 // ---------------------------------------------------------------------------
       
   167 // CTelBubbleCustomElement::CTelBubbleCustomElement
       
   168 // ---------------------------------------------------------------------------
       
   169 //
       
   170 CTelBubbleCustomElement::CTelBubbleCustomElement( 
       
   171     CTelBubbleImage* aControl, TElementType aElement ) :
       
   172     iControl( aControl ),
       
   173     iElementType( aElement )
       
   174     {
       
   175     iControlType = EBubbleImage;
       
   176     }
       
   177 
       
   178 // ---------------------------------------------------------------------------
       
   179 // CTelBubbleCustomElement::CTelBubbleCustomElement
       
   180 // ---------------------------------------------------------------------------
       
   181 //
       
   182 CTelBubbleCustomElement::CTelBubbleCustomElement( 
       
   183     CTelBubbleCallImage* aControl, TElementType aElement ) :
       
   184     iControl( aControl ),
       
   185     iElementType( aElement )
       
   186     {
       
   187     iControlType = EBubbleCallImage;
       
   188     }    
       
   189 
       
   190 // end of file