phoneuis/dialer/inc/mnumberentry.h
changeset 0 5f000ab63145
child 9 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:  MNumberEntry class provides an bubble manager like
       
    15 *                API to Dialer for Phone.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MNUMBERENTRY_H
       
    22 #define MNUMBERENTRY_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32def.h>
       
    26 #include <e32cmn.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CCoeControl;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  MNumberEntryObserver class
       
    37 *
       
    38 *  @lib dialer.lib
       
    39 *  @since Series60 5.0
       
    40 */
       
    41 class MNumberEntryObserver
       
    42     {
       
    43     public:
       
    44       
       
    45     /**
       
    46      * Indication that numberentry state changed
       
    47      *
       
    48      * @since S60 v5.0
       
    49      */
       
    50     virtual void NumberEntryStateChanged( TBool aHidePromptText ) = 0;         
       
    51 
       
    52     };
       
    53     
       
    54 /**
       
    55 *  MNumberEntry container class
       
    56 *
       
    57 *  @lib dialer.lib
       
    58 *  @since Series60 5.0
       
    59 */
       
    60 class MNumberEntry
       
    61     {
       
    62     public: // New functions
       
    63 
       
    64         /**
       
    65         * Sets number entry active.
       
    66         */
       
    67         virtual void CreateNumberEntry() = 0;
       
    68         
       
    69         /**
       
    70         * Return pointer to number entry
       
    71         * @return The NE.
       
    72         */
       
    73         virtual CCoeControl* GetNumberEntry( ) const = 0;
       
    74         
       
    75         /**
       
    76         * Query, is number entry used.
       
    77         * @return ETrue is NE is used.
       
    78         */
       
    79         virtual TBool IsNumberEntryUsed( ) const = 0;
       
    80         
       
    81         /**
       
    82         * This disables NE drawing but doesn't empty the component.
       
    83         * @param aVisibility NE visible or not.
       
    84         */
       
    85         virtual void SetNumberEntryVisible( 
       
    86             const TBool& aVisibility = ETrue ) = 0;
       
    87         
       
    88         /**
       
    89         * Set Number Entry text.
       
    90         * @param aDesC The text.
       
    91         */
       
    92         virtual void SetTextToNumberEntry( const TDesC& aDesC ) = 0;
       
    93         
       
    94         /**
       
    95         * Get Number Entry Text.
       
    96         * @param aDesC The text.
       
    97         */
       
    98         virtual void GetTextFromNumberEntry( TDes& aDesC ) = 0;
       
    99         
       
   100         /**
       
   101         * Removes NE and empties the buffer.
       
   102         */
       
   103         virtual void RemoveNumberEntry( ) = 0;
       
   104         
       
   105         /**
       
   106         * Set number entry's editor mode.
       
   107         * @param aMode for number editor input mode.
       
   108         * @return Input mode of the editor.
       
   109         */
       
   110         virtual TInt ChangeEditorMode( TBool aDefaultMode = EFalse ) = 0;
       
   111         
       
   112         /**
       
   113         * Open VKB
       
   114         */
       
   115         virtual void OpenVkbL() = 0;
       
   116         
       
   117         /**
       
   118         * Get number entry's editor mode.
       
   119         * @return Input mode of the editor.
       
   120         */
       
   121         virtual TInt GetEditorMode() const = 0;
       
   122 
       
   123         /**
       
   124         * Resets number entry editor to default values.
       
   125         */
       
   126         virtual void ResetEditorToDefaultValues() = 0;
       
   127         
       
   128          /**
       
   129          * Sets number editor observer. 
       
   130          * 
       
   131          * @param aObserver Observer.
       
   132          */    
       
   133         virtual void SetNumberEntryObserver( 
       
   134             MNumberEntryObserver& aObserver ) = 0;    
       
   135             
       
   136          /**
       
   137          * Sets prompt text to numberentry. 
       
   138          * 
       
   139          * @param aPromptText.
       
   140          */    
       
   141         virtual void SetNumberEntryPromptText( const TDesC& aPromptText ) = 0;       
       
   142         
       
   143         /**
       
   144         * Enable or disable tactile feedback. 
       
   145         * 
       
   146         * @param aEnable.
       
   147         */          
       
   148         virtual void EnableTactileFeedback( const TBool aEnable ) = 0;
       
   149     };
       
   150 
       
   151 #endif      // MNUMBERENTRY_H
       
   152 
       
   153 // End of File