phoneuis/dialer/inc/cdialerkeypadcontainer.h
changeset 0 5f000ab63145
child 3 8871b09be73b
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2007 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:  CDialerKeyPadContainer class provides number keypad fuctionality 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CDIALERKEYPADCONTAINER_H
       
    21 #define CDIALERKEYPADCONTAINER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <coecntrl.h>
       
    25 #include    <coecobs.h>    // MCoeControlObserver
       
    26 #include    <coemain.h>
       
    27 
       
    28 #include    "cdialercontainerbase.h"
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CDialerKeyPadButton;
       
    34 
       
    35 // CLASS DECLARATION
       
    36  
       
    37 /**
       
    38 *  CDialerKeyPadContainer container class
       
    39 *
       
    40 *  @lib dialer.lib
       
    41 *  @since S60 v5.0
       
    42 */
       
    43 NONSHARABLE_CLASS(CDialerKeyPadContainer) : public CDialerContainerBase, 
       
    44                                             public MCoeForegroundObserver
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47         
       
    48         /**
       
    49         * Two phase constructor
       
    50         * @param aContainer Parent container
       
    51         * @param aOperatingMode 
       
    52         * @return New instance
       
    53         */
       
    54         static CDialerKeyPadContainer* NewL( 
       
    55             const CCoeControl& aContainer,
       
    56             TDialerOperationMode aOperatingMode
       
    57              );
       
    58         
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         virtual ~CDialerKeyPadContainer();      
       
    63         
       
    64     public:
       
    65         
       
    66         /**
       
    67         * Enables or disables tactile feedback audio for keypad buttons.
       
    68         */
       
    69         
       
    70         void EnableTactileFeedback( const TBool aEnable );
       
    71         
       
    72     private:  // Functions from base classes
       
    73         
       
    74         /**
       
    75         * From CCoeControl
       
    76         */
       
    77         TInt CountComponentControls() const;
       
    78         
       
    79         /**
       
    80         * From CCoeControl
       
    81         */
       
    82         CCoeControl* ComponentControl( TInt aIndex ) const;
       
    83         
       
    84         /**
       
    85          * From CoeControl.
       
    86          */
       
    87         void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
    88         
       
    89         /**
       
    90         * @see CCoeControl
       
    91         */
       
    92         void HandleResourceChange( TInt aType );   
       
    93         
       
    94         /**
       
    95         * @see CCoeControl
       
    96         */        
       
    97         void MakeVisible( TBool aVisible );     
       
    98         
       
    99         /**
       
   100         * @see MCoeControlObserver
       
   101         */        
       
   102         void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );      
       
   103         
       
   104         /**
       
   105         * @see MCoeForegroundObserver
       
   106         */ 
       
   107         void HandleGainingForeground();
       
   108         
       
   109         /**
       
   110         * @see MCoeForegroundObserver
       
   111         */         
       
   112         void HandleLosingForeground();      
       
   113         
       
   114         
       
   115     private: // From CDialerContainerBase
       
   116     
       
   117         /**
       
   118         * @see CDialerContainerBase
       
   119         */
       
   120         void SetVariety();
       
   121         
       
   122         /**
       
   123         * @see CDialerContainerBase
       
   124         */
       
   125         void SetLayout();
       
   126 
       
   127     private:
       
   128     
       
   129 		CDialerKeyPadContainer( const CCoeControl& aContainer, 
       
   130             TDialerOperationMode aOperatingMode );
       
   131             	
       
   132         /**
       
   133         * 2nd phase constructor.
       
   134         */
       
   135         void ConstructL( );
       
   136 
       
   137         /**
       
   138         * Set layout in Phone Dialer mode
       
   139         */
       
   140         void SetPhoneLayout();
       
   141 
       
   142         /**
       
   143         * Set layout in Video DTMF mode
       
   144         */
       
   145         void SetVideoLayout();
       
   146         
       
   147         /**
       
   148         * Create keypad buttons.
       
   149         */
       
   150         void CreateButtonsL();
       
   151         
       
   152         
       
   153     private:    // Data
       
   154     
       
   155         TDialerOperationMode iOperatingMode;
       
   156         
       
   157         /**
       
   158          * Keypad buttons.
       
   159          * Owned.
       
   160          */
       
   161         RPointerArray<CDialerKeyPadButton> iButtons;  
       
   162         
       
   163         /**
       
   164          * Number of buttons.
       
   165          */
       
   166         TInt iButtonCount;
       
   167          
       
   168         /**
       
   169          * True, when EEventStateChanged event reported. 
       
   170          */        
       
   171         TBool iButtonPressedDown;
       
   172         
       
   173         /**
       
   174          * Stores last pointer event. 
       
   175          */        
       
   176         TPointerEvent iPointerEvent;
       
   177     };
       
   178 
       
   179 #endif      // CDIALERKEYPADCONTAINER_H
       
   180 
       
   181 // End of File