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