phoneuis/Ussd/inc/UssdNaviPane.h
branchRCL_3
changeset 62 5266b1f337bd
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
       
     1 /*
       
     2 * Copyright (c) 2010 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:  Declares container control for application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef USSDNAVIPANE_H
       
    20 #define USSDNAVIPANE_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <coecntrl.h>
       
    25 #include <peninputclient.h>
       
    26     
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CUssdAppUi;
       
    30 class CAknNaviLabel;
       
    31 class CAknNavigationDecorator;
       
    32 class CAknNavigationControlContainer;
       
    33 class CCnvCharacterSetConverter;
       
    34 
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  CUssdNaviPane
       
    40 *  Declares navi pane control for application.
       
    41 *  @since 2.8.
       
    42 *
       
    43 */
       
    44 class CUssdNaviPane : public CCoeControl
       
    45     {
       
    46     public: // Constructors and destructor
       
    47 
       
    48         /**
       
    49         * Constructor.
       
    50         * @param aAppUi A reference to AppUI for container.
       
    51         */
       
    52         CUssdNaviPane( CUssdAppUi& aAppUi );
       
    53 
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         * @param aAppUi A reference to AppUI for container.
       
    57         */
       
    58         static CUssdNaviPane*  NewL( CUssdAppUi& aAppUi );
       
    59         
       
    60         /**
       
    61         * 2nd phase constructor
       
    62         *  
       
    63         */
       
    64         void ConstructL();
       
    65 
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         ~CUssdNaviPane();
       
    70 
       
    71     public: // New functions
       
    72 
       
    73         /**
       
    74         * Update the message length information to navipane
       
    75         * @param aInputString Reference to a string to be checked
       
    76         * @param aControl for handling backspace key event
       
    77         * @return Updated value of maximum size of string
       
    78         */
       
    79         TInt UpdateMsgLengthL( 
       
    80             const TDesC& aInputString,
       
    81             CCoeControl* aControl );
       
    82 
       
    83     public: // Functions from base classes
       
    84 
       
    85         
       
    86     private: // Functions from base classes
       
    87 
       
    88  
       
    89     private: //new functions
       
    90                 
       
    91         /**
       
    92         * Creates an extra navi label. It is needed so that the msg length
       
    93         * won't dissapear when the focus is on the picture of a picture msg.
       
    94         */
       
    95         void CreateExtraNaviLabelL();
       
    96         
       
    97         /**
       
    98         * Checks if there are any unicode characters in the message
       
    99         * @param aInputString Reference to a string to be checked
       
   100         * @return ETrue whether we have unicode chars otherwise EFalse
       
   101         */
       
   102         TBool NeedsToBeSentAsUnicodeL( const TDesC& aInputString ) const;
       
   103         
       
   104         /**
       
   105         * Counts if there are 7bit extended table characters in message 
       
   106         * (see more info from ETSI 03.38)
       
   107         * @param aInputString Reference to chars to be checked
       
   108         * @return amount of extended table chars
       
   109         */
       
   110         TInt CountExtendedTableChars( const TDesC& aInputString ) const;
       
   111 
       
   112         /**
       
   113         * Generates a backspace key press event.
       
   114         * @param aControl Reference to control class
       
   115         */
       
   116         void GenerateBackSpaceKeyL(CCoeControl* aControl);
       
   117        
       
   118          
       
   119     private: //data
       
   120 
       
   121         // Application UI.
       
   122         CUssdAppUi&                         iAppUi;
       
   123 
       
   124          // Char converter.
       
   125         CCnvCharacterSetConverter*          iCharacterSetConverter;
       
   126 
       
   127         // The navipane decorator.
       
   128         CAknNavigationDecorator*            iNaviDecorator;
       
   129 
       
   130         // The navipane label.
       
   131         CAknNaviLabel*                      iNaviLabel;
       
   132 
       
   133         // The navipane control container.
       
   134         CAknNavigationControlContainer*     iNaviPane;
       
   135         
       
   136         // Client for accessing pen editor (virtual keyboard)
       
   137         RPeninputServer iPeninputServer;
       
   138 
       
   139     };
       
   140 
       
   141 #endif // USSDNAVIPANE_H
       
   142 
       
   143 // End of File