vtuis/videotelui/inc/CVtUiNumberEntryActivationControl.h
branchRCL_3
changeset 35 779871d1e4f4
parent 0 ed9695c8bcbe
equal deleted inserted replaced
34:f15ac8e65a02 35:779871d1e4f4
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Number entry activation control for 
       
    15 *                Video Telephone application.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CVTUINUMBERENTRYACTIVATIONCONTROL_H
       
    22 #define CVTUINUMBERENTRYACTIVATIONCONTROL_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include    <coecntrl.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CVtUiAppUi;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Number entry activation control for Video Telephone application.
       
    34 *
       
    35 *  @since Series 60 2.6
       
    36 */
       
    37 class CVtUiNumberEntryActivationControl
       
    38     : public CCoeControl
       
    39     {
       
    40     public: // Constructors and destructor
       
    41         
       
    42         /**
       
    43         * C++ constructor.
       
    44         * @param aAppUi application ui.
       
    45         */
       
    46         CVtUiNumberEntryActivationControl( CVtUiAppUi& aAppUi );
       
    47 
       
    48         /**
       
    49         * Symbian constructor.
       
    50         * @param aRect initial area.
       
    51         */
       
    52         void ConstructL( const TRect& aRect );
       
    53 
       
    54         /**
       
    55         * C++ destructor.
       
    56         */
       
    57         ~CVtUiNumberEntryActivationControl();
       
    58 
       
    59     public: // Functions from base classes
       
    60         
       
    61         /**
       
    62         * @see CCoeControl::SizeChanged.
       
    63         */
       
    64         virtual void SizeChanged();
       
    65 
       
    66         /**
       
    67         * @see CCoeControl::PositionChanged.
       
    68         */
       
    69         virtual void PositionChanged();
       
    70 
       
    71         /**
       
    72         * @see CCoeControl::Draw.
       
    73         */
       
    74         virtual void Draw( const TRect& aRect ) const;
       
    75     
       
    76         /**
       
    77         * @see CCoeControl::OfferKeyEventL.
       
    78         */
       
    79         virtual TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    80             TEventCode aType );
       
    81 
       
    82     public: // New functions
       
    83         
       
    84         /**
       
    85         * Set control's activation status.
       
    86         * @param aIsActive ETrue if key events should 
       
    87         * be handled oterherwise EFalse.
       
    88         */
       
    89         void SetActive( TBool aIsActive );
       
    90   
       
    91     private:
       
    92 
       
    93         /**
       
    94         * Checks if event should open number entry.
       
    95         * @param aKeyEvent event.
       
    96         * @param aDtmfTone event as character tone.
       
    97         * @return ETrue if number entry should be opened.
       
    98         */
       
    99         static TBool IsNumericEvent( 
       
   100             const TKeyEvent& aKeyEvent,
       
   101             TChar& aDtmfTone );
       
   102 
       
   103     private:
       
   104 
       
   105         // Reference to application ui.
       
   106         CVtUiAppUi& iAppUi;
       
   107 
       
   108         // ETrue if this control has been added to stack.
       
   109         TBool iAddedToStack;
       
   110         
       
   111         // ETrue if key events should be handled oterherwise EFalse.
       
   112         TBool iIsActive;
       
   113 
       
   114     };
       
   115 
       
   116 #endif      // CVTUINUMBERENTRYACTIVATIONCONTROL_H
       
   117             
       
   118 // End of File