fep/aknfep/peninputplugins/peninputimepluginjp/src/pluginfepmanagerhwr.cpp
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     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:            HWR layout UI class implementation file.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #include "pluginfepmanagerhwr.h"
       
    30 #include "peninputimepluginjp.h"
       
    31 #include <aknfeppeninputenums.h>
       
    32 #include <aknedsts.h>               //CAknEdwinState
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // CPluginFepManagerHwr::NewL
       
    36 // factory function
       
    37 // (other items were commented in a header).
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 CPluginFepManagerHwr* CPluginFepManagerHwr::NewL(CPenInputImePluginJp& aOwner,
       
    41                                                  RPeninputServer* aPenInputServer)
       
    42     {
       
    43     CPluginFepManagerHwr* self = new(ELeave)CPluginFepManagerHwr(aOwner, aPenInputServer);
       
    44     CleanupStack::PushL(self);
       
    45     self->BaseConstructL();
       
    46     CleanupStack::Pop(self);
       
    47     return self;
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CPluginFepManagerHwr::SetNumberModeKeyMappingL
       
    52 // Set layout UI current number mode key mapping.
       
    53 // (other items were commented in a header).
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 void CPluginFepManagerHwr::SetNumberModeKeyMappingL(
       
    57     TAknEditorNumericKeymap aAknEditorNumericKeymap )
       
    58     {
       
    59     iNumberKeyMapping = aAknEditorNumericKeymap;
       
    60     }
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // CPluginFepManagerHwr::HandleCommandL
       
    64 // Handle command come from FEP.
       
    65 // (other items were commented in a header).
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 void CPluginFepManagerHwr::HandleCommandL(TInt aCommandId,TInt aParam)
       
    69     {
       
    70     if( aCommandId == ECmdPenInputSetWindowPos)
       
    71         {
       
    72         return;
       
    73         }
       
    74     CPluginFepManagerBase::HandleCommandL(aCommandId, aParam);
       
    75     }
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // CPluginFepManagerHwr::CPluginFepManagerHwr
       
    79 // C++ default constructor.
       
    80 // (other items were commented in a header).
       
    81 // -----------------------------------------------------------------------------
       
    82 //
       
    83 CPluginFepManagerHwr::CPluginFepManagerHwr(CPenInputImePluginJp& aOwner,
       
    84                                            RPeninputServer* aPenInputServer)
       
    85     :CPluginFepManagerBase(aOwner, aPenInputServer)
       
    86     {
       
    87     }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CPluginFepManagerHwr::SetLayoutRange
       
    91 // Set layout primary range.
       
    92 // (other items were commented in a header).
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 void CPluginFepManagerHwr::SetLayoutRange(const CAknEdwinState* aEditorState)
       
    96     {
       
    97     CPluginFepManagerBase::SetLayoutRange(aEditorState);
       
    98 
       
    99     //set number key mapping
       
   100     if ( iPermittedRange == ERangeNumber)
       
   101         {
       
   102         SendCommandToServer( ECmdPenInputEditorNumericKeyMap,
       
   103                              iNumberKeyMapping );
       
   104         }
       
   105     else
       
   106         {
       
   107         //for alphanumeric editor, always use EAknEditorAlphanumericNumberModeKeymap
       
   108         SendCommandToServer( ECmdPenInputEditorNumericKeyMap,
       
   109                              EAknEditorAlphanumericNumberModeKeymap );
       
   110         }
       
   111     }
       
   112 
       
   113  // End Of File