fep/aknfep/peninputplugins/peninputimeplugincn/inc/peninputimeplugincn.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2002-2005 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:            input mode plugin header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 #ifndef C_PENINPUTIMEPLUGINCHN_H
       
    29 #define C_PENINPUTIMEPLUGINCHN_H   
       
    30 
       
    31 // System includes
       
    32 #include <e32base.h>
       
    33 #include <peninputclient.h>
       
    34 #include <aknfeppeninputimeplugin.h>
       
    35 #include <eikon.hrh>
       
    36 #include <AknFepManagerInterface.h>
       
    37 //#include <AknFepManagerUIInterface.h>
       
    38 #include <aknfeppeninputenums.h>
       
    39 #include <AknFepGlobalEnums.h>
       
    40 
       
    41 // Forward declaration
       
    42 class MAknFepManagerInterface;
       
    43 class CAknEdwinState;
       
    44 class CRepository;
       
    45 class CPluginFepManagerBase;
       
    46 
       
    47 /**
       
    48  *  Pen input mode plugin chinese implementation
       
    49  *
       
    50  *  @lib peninputimeplugincn.lib
       
    51  *  @since S60 v3.2
       
    52  */
       
    53 class CPenInputImePluginCn : public CAknFepPenInputImePlugin
       
    54     {
       
    55 public:
       
    56 
       
    57     /**
       
    58      * Symbian constructor.
       
    59      *
       
    60      * @since S60 v3.2
       
    61      * @param aInitParams Init data plugin, actually it is 
       
    62      *        a pointer of RPeninputServer.
       
    63      * @return Pointer to created CPenInputImePluginCn object
       
    64      */
       
    65     static CPenInputImePluginCn* NewL(TAny* aInitParams);
       
    66 
       
    67     static CPenInputImePluginCn* NewLC(TAny* aInitParams);
       
    68 
       
    69     /**
       
    70      * Destructor.
       
    71      */
       
    72     ~CPenInputImePluginCn();
       
    73 
       
    74 public: // From CAknFepPenInputImePlugin
       
    75 
       
    76     /**
       
    77      * Get layout UI interface
       
    78      * 
       
    79      * @since S60 v3.2
       
    80      * @param aFepManager Fep manager interface pointer
       
    81      * @param aLanguage Language that layout UI need to support
       
    82      * @param aMode Speicifed layout UI mode to create
       
    83      * @param aData Initialization data.
       
    84      *
       
    85      * @return The layout UI interface..
       
    86      */
       
    87     MAknFepManagerInterface* GetInputMethodUiL(
       
    88                             MAknFepManagerUIInterface* aFepManager,
       
    89                             TLanguage aLanguage,
       
    90                             TInt      aMode,
       
    91                             const TDesC8& aData,
       
    92                             const TBool aIsSplitView = EFalse);
       
    93 
       
    94     /**
       
    95      * Get layout UI interface
       
    96      * 
       
    97      * @since S60 v3.2
       
    98      * @param aFepManager Fep manager interface pointer
       
    99      * @param aLayoutId Speicifed layout UI id to create
       
   100      * @param aData Initialization data.
       
   101      *
       
   102      * @return The layout UI interface..
       
   103      */
       
   104     MAknFepManagerInterface* GetInputMethodUiL(
       
   105                             MAknFepManagerUIInterface* aFepManager,
       
   106                             TInt aLayoutId,
       
   107                             const TDesC8& aData);
       
   108 
       
   109     /**
       
   110      * Activate current IME plugin.
       
   111      * 
       
   112      * @since S60 v3.2
       
   113      *
       
   114      * @return None.
       
   115      */
       
   116     void Activate();
       
   117 
       
   118     /**
       
   119      * Deactivate current IME plugin.
       
   120      * 
       
   121      * @since S60 v3.2
       
   122      *
       
   123      * @return None.
       
   124      */
       
   125     void DeActivate();
       
   126 
       
   127     /**
       
   128      * Get current IME plugin implementation ID.
       
   129      * 
       
   130      * @since S60 v3.2
       
   131      *
       
   132      * @return IME plugin implementation id.
       
   133      */
       
   134     TInt ImeImplId();
       
   135 
       
   136     /**
       
   137      * Get current layout UI implementation id.
       
   138      * 
       
   139      * @since S60 v3.2
       
   140      *
       
   141      * @return None.
       
   142      */
       
   143      TInt LayoutUiImplId();
       
   144 
       
   145     /**
       
   146      * Handle pen input server event.
       
   147      * 
       
   148      * @param aEventId The event id, defined in <peninputcmd.h>
       
   149      * @param aData The event related data.
       
   150      * @since S60 v3.2
       
   151      *
       
   152      * @return None.
       
   153      */
       
   154      TBool HandleServerEventL(TInt aEventId, const TDesC& aData);
       
   155 
       
   156     /**
       
   157      * Get suppored layout UI modes(VKB/HWR).
       
   158      * 
       
   159      * @since S60 v3.2
       
   160      *
       
   161      * @param aPtiEngine  A pointer to ptiengine
       
   162      * @param aSupportList A reference to result ime plugin list
       
   163      * @return Meaningless.
       
   164      */
       
   165      TInt SupportModes(CPtiEngine* aPtiEngine, 
       
   166                        RArray<TImePlguinImplDetail>& aSupportList) const;
       
   167 
       
   168     /**
       
   169      * Get current layout UI mode.
       
   170      * 
       
   171      * @since S60 v3.2
       
   172      *
       
   173      * @return Current layout UI mode.
       
   174      */
       
   175      TInt CurrentMode() const;
       
   176 
       
   177     /**
       
   178      * Handle the menu command.The menu is launched by FEP
       
   179      * The menu command is first passed to IME plugin, if 
       
   180      * this function return EFalse, FEP handles it defaultly.
       
   181      * 
       
   182      * @param aCommandId The menu command id
       
   183      * @return ETrue if IME plugin handled the command; 
       
   184      *         EFalse otherwise.
       
   185      */
       
   186     TBool HandleMenuCommandL(TInt aCommandId);
       
   187 
       
   188     /**
       
   189      * Dynamiclly update menu items during it displays. 
       
   190      * 
       
   191      * aMenuPane The menu pane pointer.
       
   192      * @return None.
       
   193      */
       
   194     void DynInitMenuPaneL(CAknFepUiInterfaceMenuPane* aMenuPane);
       
   195 
       
   196 private:
       
   197     
       
   198     /**
       
   199      * C++ default constructor.
       
   200      *
       
   201      * @param aServer Pen input server pointer
       
   202      */
       
   203     CPenInputImePluginCn(RPeninputServer* aServer);
       
   204     
       
   205     /**
       
   206      * By default Symbian 2nd phase constructor is private.
       
   207      *
       
   208      * @return None
       
   209      */
       
   210     void ConstructL();
       
   211 
       
   212     /**
       
   213      * Enumuate all layout UI ids and save them to iUiLayoutImpIdList.
       
   214      *
       
   215      * @return None
       
   216      */
       
   217     void FindUiLayoutImplementationL();
       
   218     
       
   219     /**
       
   220      * Get HWR UI interface
       
   221      *
       
   222      * @return HWR UI pointer
       
   223      */
       
   224     CPluginFepManagerBase* GetPluginUiL( TInt aMode );
       
   225     
       
   226     /**
       
   227      * Get current UI interface
       
   228      *
       
   229      * @return current UI pointer
       
   230      */
       
   231     inline CPluginFepManagerBase* GetCurrentUi();
       
   232         
       
   233     /**
       
   234      * Get suppored layout UI modes(VKB/HWR).
       
   235      * 
       
   236      * @since S60 v3.2
       
   237      *
       
   238      * @param aPtiEngine  A pointer to ptiengine
       
   239      * @param aSupportList A reference to result ime plugin list
       
   240      * @return Meaningless.
       
   241      */
       
   242     TInt SupportModesL(CPtiEngine* aPtiEngine, 
       
   243                        RArray<TImePlguinImplDetail>& aSupportList) const;
       
   244                        
       
   245 private:
       
   246 
       
   247     /**
       
   248      * Pen input server pointer. Not own.
       
   249      */
       
   250     RPeninputServer* iPenInputServer;
       
   251 
       
   252     /**
       
   253      * Pen input server pointer. Not own.
       
   254      */
       
   255     RArray<TInt> iUiLayoutImpIdList;
       
   256 
       
   257     /**
       
   258      * Current layout UI mode.
       
   259      */
       
   260     TInt iPenInputMode;
       
   261 
       
   262     /**
       
   263      * Pen input server pointer. Not own.
       
   264      */
       
   265     CPluginFepManagerBase* iPluginUiManager;
       
   266     };
       
   267 
       
   268 #include "peninputimeplugincn.inl"
       
   269 
       
   270 #endif //C_PENINPUTIMEPLUGINCHN_H
       
   271 
       
   272 //End Of File