vtuis/videotelui/inc/CVtUiEndCallButtonPane.h
branchRCL_3
changeset 12 f84a661cfc1d
child 32 890b5dd735f8
equal deleted inserted replaced
8:07d1685f0cd4 12:f84a661cfc1d
       
     1 /*
       
     2 * Copyright (c) 2009 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:  End call button pane definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTUIENDCALLBUTTONPANE_H
       
    20 #define C_VTUIENDCALLBUTTONPANE_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 // CLASS DECLARATION
       
    25 class CVtUiEndCallButton;
       
    26 
       
    27 /**
       
    28  *  CCVtUiEndCallButtonPane 
       
    29  */
       
    30 class CVtUiEndCallButtonPane : public CCoeControl,
       
    31                                public MCoeControlObserver
       
    32     {
       
    33     public: // Constructors and destructor
       
    34         
       
    35         /**
       
    36          * Static construction method.
       
    37          * @param aRect The intialized rectangle of container window 
       
    38          * @return Pointer to newly created instance of CVtUiEndCallButtonPane.
       
    39          */
       
    40         static CVtUiEndCallButtonPane* NewL( const TRect& aRect );
       
    41     
       
    42         /**
       
    43         * C++ destructor.
       
    44         */
       
    45         ~CVtUiEndCallButtonPane();
       
    46   
       
    47     public: //from base class CCoeControl
       
    48     
       
    49         /**
       
    50          * From CCoeControl. 
       
    51          * Gets the number of controls contained in a compound control.
       
    52          * @return The number of controls in the container
       
    53          */
       
    54         TInt CountComponentControls() const;
       
    55     
       
    56         /**
       
    57          * From CCoeControl. 
       
    58          * Gets an indexed component of a compound control.
       
    59          */
       
    60         CCoeControl* ComponentControl( TInt aIndex ) const;
       
    61     
       
    62         /**
       
    63          * From CCoeControl. 
       
    64          * Draws the control.
       
    65          */
       
    66         void Draw(const TRect& aRect) const;
       
    67     
       
    68         /**
       
    69          * From CCoeControl. 
       
    70          * Responds to changes to the size and position of the 
       
    71          * contents of this control.
       
    72          */
       
    73         void SizeChanged();
       
    74     
       
    75         /**
       
    76          * From CCoeControl. 
       
    77          * Retrieves an object of the same type as that encapsulated in aId.
       
    78          */
       
    79         TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
       
    80         
       
    81     public: //From MCoeControlObserver
       
    82     
       
    83         /**
       
    84          * Handles an event from an observed control.
       
    85          */
       
    86         void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
       
    87     
       
    88     private:
       
    89     
       
    90         /**
       
    91          * C++ constructor for the end call button container.
       
    92          */
       
    93         CVtUiEndCallButtonPane();
       
    94     
       
    95         /**
       
    96          * Symbian 2nd phase constructor.
       
    97          * 
       
    98          * @param aRect The intialized rectangle of container window
       
    99          */
       
   100         void ConstructL( const TRect& aRect );
       
   101     
       
   102     private: // New functions
       
   103         /**
       
   104          * Creating button from resource.
       
   105          */
       
   106         void CreateButtonUsingResourceL();
       
   107     
       
   108         /**
       
   109          * Getting the button layout data for the text and icon.
       
   110          */
       
   111         void GetButtonLayoutData();
       
   112 
       
   113     private:
       
   114     
       
   115         /**
       
   116          * Owned: End button
       
   117          */
       
   118         CVtUiEndCallButton* iEndButton;
       
   119         
       
   120         /**
       
   121          * Owned: background context.
       
   122          */ 
       
   123         CAknsBasicBackgroundControlContext* iBgContext;
       
   124     };
       
   125 
       
   126 #endif // C_VTUIENDCALLBUTTONCONTAINER_H