vtuis/videotelui/inc/CVtUiEndCallButtonPane.h
branchRCL_3
changeset 35 779871d1e4f4
equal deleted inserted replaced
34:f15ac8e65a02 35:779871d1e4f4
       
     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     public:
       
    89         
       
    90         /**
       
    91          * Set end call button enabled or not.
       
    92          */
       
    93         void SetEnabled( TBool aEnabled );
       
    94     
       
    95     private:
       
    96     
       
    97         /**
       
    98          * C++ constructor for the end call button container.
       
    99          */
       
   100         CVtUiEndCallButtonPane();
       
   101     
       
   102         /**
       
   103          * Symbian 2nd phase constructor.
       
   104          * 
       
   105          * @param aRect The intialized rectangle of container window
       
   106          */
       
   107         void ConstructL( const TRect& aRect );
       
   108     
       
   109     private: // New functions
       
   110         /**
       
   111          * Creating button from resource.
       
   112          */
       
   113         void CreateButtonUsingResourceL();
       
   114     
       
   115         /**
       
   116          * Getting the button layout data for the text and icon.
       
   117          */
       
   118         void GetButtonLayoutData();
       
   119 
       
   120     private:
       
   121     
       
   122         /**
       
   123          * Owned: End button
       
   124          */
       
   125         CVtUiEndCallButton* iEndButton;
       
   126         
       
   127         /**
       
   128          * Owned: background context.
       
   129          */ 
       
   130         CAknsBasicBackgroundControlContext* iBgContext;
       
   131     };
       
   132 
       
   133 #endif // C_VTUIENDCALLBUTTONCONTAINER_H