fep/aknfep/inc/AknFepFnKeyManager.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2002-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:            Provides CAknFepManager definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #ifndef _AKNFEP_FNKEY_MANAGER_H__
       
    30 #define _AKNFEP_FNKEY_MANAGER_H__
       
    31 
       
    32 
       
    33 #include <e32base.h>
       
    34 #include <w32std.h>
       
    35 #include <coeinput.h>
       
    36 #include <PtiDefs.h>                   //TCoeInputCapabilities
       
    37 
       
    38 #include <AknIndicatorContainer.h> 
       
    39 
       
    40 #include "AknFepGlobalEnums.h"
       
    41 #include "AknFepSharedDataInterface.h"
       
    42 
       
    43 
       
    44 class CAknFepManager;
       
    45 class CAknIndicatorContainer;
       
    46    
       
    47 /**
       
    48  *  FnKey State machine
       
    49  *
       
    50  *  @since S60 v3.2
       
    51  */
       
    52 class CAknFepFnKeyManager : public CBase
       
    53     {
       
    54 
       
    55 public:
       
    56 
       
    57   /**  Fn key states */
       
    58     enum TFnKeyState
       
    59         {
       
    60         EFnKeyNone,
       
    61         EFnKeyPressed,
       
    62         EFnKeyDown,
       
    63         EFnKeyNext,
       
    64         EFnKeyPressedAgain,
       
    65         EFnKeyLock,
       
    66         EFnKeyForced,
       
    67         EFnKeyReversePressed,
       
    68         EFnKeyReverse
       
    69         };
       
    70 
       
    71 public:
       
    72     static CAknFepFnKeyManager* NewL( CAknFepManager& aFepMan,CAknFepSharedDataInterface* 
       
    73                                         aSharedDataInterface );
       
    74     ~CAknFepFnKeyManager();
       
    75 
       
    76 public:
       
    77     /*
       
    78     * Resets the Function Key State
       
    79     */
       
    80     void ClearFnKeyState();
       
    81 
       
    82     void SetQwertyInputMode(TBool aQwertyState);
       
    83     
       
    84     /* 
       
    85     * Handles the Fn key event to change the state appropriately.
       
    86     */
       
    87     TKeyResponse CAknFepFnKeyManager::HandleFnKeyEventL( const TKeyEvent& aKeyEvent, 
       
    88                                                 TEventCode aEventCode,
       
    89                                                 TCoeInputCapabilities aInputCapabilities
       
    90                                                 );
       
    91 
       
    92     void SetCase( TCase aCase );
       
    93     
       
    94     TFnKeyState FnKeyState();
       
    95     void SetFnKeyState(CAknFepFnKeyManager::TFnKeyState aState);    
       
    96 private:
       
    97 
       
    98     CAknFepFnKeyManager( CAknFepManager& aFepMan,
       
    99                         CAknFepSharedDataInterface* aSharedDataInterface);
       
   100     void ConstructL();
       
   101     
       
   102     // For Shift Key handling.
       
   103     void UpdatePreviousCase();
       
   104     
       
   105 
       
   106 private: // data
       
   107     CAknFepManager &iFepMan; //not own
       
   108     TCoeInputCapabilities iInputCapabilities;
       
   109     TFnKeyState iFnKeyState;
       
   110     TBool iIsQwertyMode;
       
   111     
       
   112     /**
       
   113      * Pointer to the Indicator Container object containing editor indicators.
       
   114      * Not own.
       
   115      */
       
   116     CAknIndicatorContainer*     iIndicatorContainer;
       
   117     CAknFepSharedDataInterface* iSharedDataInterface;
       
   118     
       
   119     // For Shift key handling.
       
   120     TInt iPreviousCase;
       
   121     TBool iShiftKeyPressed;
       
   122     
       
   123     // For QWERTY Predictive
       
   124     TBool iWasPreviousModePredictive;
       
   125     TBool iPreviousKeyWasFnKey;
       
   126     };
       
   127 
       
   128 #endif // ? _AKNFEP_FNKEY_MANAGER_H__