fep/aknfep/peninputplugins/PeninputPluginKr/inc/PluginKrFepManagerBase.h
changeset 0 eb1f2e154e89
child 3 f5a1e66df979
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef PLUGINKRFEPMANAGERBASE_H
       
    19 #define PLUGINKRFEPMANAGERBASE_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 #include <AknFepManagerInterface.h>
       
    24 #include <PeninputClient.h>
       
    25 
       
    26 class CPeninputPluginKr;
       
    27 class RPeninputServer;
       
    28 class CRepository;
       
    29 class CAknEdwinState;
       
    30 
       
    31 class CPluginKrFepManagerBase : public CBase, public MAknFepManagerInterface
       
    32     {
       
    33 public:
       
    34     
       
    35     virtual ~CPluginKrFepManagerBase();
       
    36 
       
    37 protected:
       
    38 
       
    39     CPluginKrFepManagerBase(
       
    40         CPeninputPluginKr& aOwner, 
       
    41         RPeninputServer& aPenInputServer);
       
    42 
       
    43     void ConstructL();
       
    44     
       
    45 private:
       
    46 
       
    47     virtual void SetMode(
       
    48         TInt aMode, 
       
    49         TBool aPredictive, 
       
    50         TBool aQwertyInputMode,
       
    51         TInt aKeyboardType = EPtiKeyboardNone);
       
    52 
       
    53     virtual void SetCase(TCase aCase);
       
    54 
       
    55     virtual void SetNumberModeKeyMappingL(
       
    56         TAknEditorNumericKeymap aAknEditorNumericKeymap);
       
    57 
       
    58     virtual TBool HandleKeyL(TInt aKey, TKeyPressLength aLength, TEventCode aEventCode = EEventKey);
       
    59 
       
    60     virtual void HandleCommandL(TInt aCommandId);
       
    61     
       
    62     virtual void HandleCommandL(TInt aCommandId, TInt aParam);
       
    63 
       
    64     virtual void CloseUI();
       
    65 
       
    66     virtual void ExpireMultitapTimer();
       
    67 
       
    68     virtual TBool IsValidNumericLongKeyPress(TInt aKey) const;
       
    69 
       
    70     virtual void AddTextToUserDictionaryL(const TDesC& aText);
       
    71 
       
    72     virtual void GetFormatOfFepInlineText(
       
    73         TCharFormat& aFormat, 
       
    74         TInt& aNumberOfCharactersWithSameFormat, 
       
    75         TInt aPositionOfCharacter) const;
       
    76 
       
    77     virtual TInt SupportLanguage(TInt aMode) const;
       
    78 
       
    79     virtual void SetInputLanguageL(TLanguage aLanguage);
       
    80 
       
    81     virtual TBool IsValidShiftKeyPress() const;
       
    82 
       
    83     virtual void SetEditorContext(TInt aContext);
       
    84 
       
    85     virtual void ActivateUI();
       
    86 
       
    87     virtual void SetFepAwareEditorText(const TFepInputContextFieldData& /*aIcfData*/);
       
    88 
       
    89     virtual TInt EditorMaxLength();
       
    90     
       
    91     virtual void ResourceChanged(TInt aType);
       
    92         
       
    93     virtual void SetNextFepUI(MAknFepManagerInterface* /*aNextUi*/);
       
    94 
       
    95     virtual void SetStarKeyFlag( TBool aSet );
       
    96     
       
    97     virtual TBool IsValidFnKeyPress() const
       
    98 		{
       
    99 		return EFalse;
       
   100 		};
       
   101     virtual TBool IsValidLongChrKeyPress() const
       
   102 		{
       
   103         return EFalse;
       
   104 		};
       
   105 public:
       
   106     
       
   107     virtual void OnInit();
       
   108     
       
   109     virtual void RetrieveEditorMaxLength();
       
   110     
       
   111     virtual void UpdateRange( TInt aRange );
       
   112     
       
   113     virtual void UpdateCaseMode( TInt aCaseMode );
       
   114     
       
   115 protected:
       
   116     
       
   117     void SendCommandToServer( TInt aCommandId );
       
   118     
       
   119     void SendCommandToServer( TInt aCommandId, TInt aParam );
       
   120     
       
   121     void SendCommandToServer(TInt aCommandId, const TDesC8& aParam);
       
   122 
       
   123     void SetLayoutRange(const CAknEdwinState* aEditorState);
       
   124     
       
   125     void SetLayoutPermitedRanges( TInt aPermittedMode );
       
   126     
       
   127     TBool SupportNativeNumberRange();
       
   128     
       
   129 protected:
       
   130 
       
   131     CPeninputPluginKr& iOwner;
       
   132 
       
   133     RPeninputServer& iPenInputServer;
       
   134 
       
   135     TInt iPermittedRange;
       
   136     
       
   137     TInt iHkbMode;
       
   138 
       
   139     TInt iSuggestedRange;
       
   140     
       
   141     TLanguage iLanguage;   
       
   142     
       
   143 private:
       
   144 
       
   145     CRepository* iRepository;
       
   146 
       
   147     TInt iMaxEditorLength;
       
   148 
       
   149     TInt iLastCase;
       
   150     
       
   151     TInt iLastRange;
       
   152 
       
   153     MAknFepManagerInterface* iHkbUi;
       
   154     
       
   155     TInt iPermittedMode;
       
   156     };
       
   157 
       
   158 #endif // PLUGINKRFEPMANAGERBASE_H