textinput/peninputhwrboxjp/src/peninputhwrboxuistate.cpp
branchRCL_3
changeset 44 ecbabf52600f
parent 0 eb1f2e154e89
equal deleted inserted replaced
43:ebd48d2de13c 44:ecbabf52600f
       
     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:  Implementation of the hwr ui state
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // System includes
       
    20 #include <peninputlayoutbasecontrol.h>  // EEventVirtualKeyUp, ...
       
    21 #include <peninputcommonlayoutglobalenum.h>  // EPeninputLayoutEventBack, ...
       
    22 
       
    23 // user includes
       
    24 #include "peninputhwrboxuistate.h"
       
    25 
       
    26 // constant definition
       
    27 
       
    28 // ======== MEMBER FUNCTIONS ========
       
    29 
       
    30 // Implementation of Class CPeninputHwrBoxUiState
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CPeninputHwrBoxUiState::NewL
       
    34 // (other items were commented in a header).
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 CPeninputHwrBoxUiState* CPeninputHwrBoxUiState::NewL(MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext)
       
    38     {
       
    39     CPeninputHwrBoxUiState* self = new ( ELeave ) CPeninputHwrBoxUiState(aUiStateMgr,aContext);
       
    40     CleanupStack::PushL(self);
       
    41     self->Construct();
       
    42     CleanupStack::Pop(self);
       
    43     return self;
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CPeninputHwrBoxUiState::~CPeninputHwrBoxUiState
       
    48 // (other items were commented in a header).
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 CPeninputHwrBoxUiState::~CPeninputHwrBoxUiState()
       
    52     {
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CPeninputHwrBoxUiState::HandleControlEvent
       
    57 // (other items were commented in a header).
       
    58 // return False --->iHiraganaKanji->HandleControlEventJpL() by UiLayout
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 TBool CPeninputHwrBoxUiState::HandleControlEvent(TInt aEventType, const TDesC& aEventData)
       
    62     {
       
    63     if (aEventType == EEventVirtualKeyUp)   // pseudo virual key (hwr 1 char)
       
    64         {
       
    65         return HandleVkbEvent(aEventType, aEventData);
       
    66         }
       
    67     else if (aEventType == EPeninputLayoutEventBack)
       
    68         {
       
    69         return HandleBackEvent(aEventType, aEventData);
       
    70         }
       
    71     else if ((aEventType == EPeninputLayoutEventTab) ||
       
    72              (aEventType == EPeninputLayoutEventEnter) ||
       
    73              (aEventType == EPeninputLayoutEventSpace))
       
    74         {
       
    75         return HandleEnterSpaceTabEvent(aEventType, aEventData);
       
    76         }
       
    77     else
       
    78         {
       
    79         return EFalse;
       
    80         }
       
    81     }
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // CPeninputHwrBoxUiState::HandleControlEventPenL
       
    85 // (other items were commented in a header).
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 void CPeninputHwrBoxUiState::HandleControlEventPenL(TInt /*aEventType*/
       
    89                                                     , const TDesC& /*aEventData*/
       
    90                                                     , CPeninputHwrBoxLayout& /*aUiLayout*/
       
    91                                                                    , TDes& /*aCharCode*/
       
    92                                                                    , TBool& aHandled)
       
    93     {
       
    94     aHandled = EFalse;
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // CPeninputHwrBoxUiState::CPeninputHwrBoxUiState
       
    99 // (other items were commented in a header).
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 CPeninputHwrBoxUiState::CPeninputHwrBoxUiState(MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext)
       
   103     : CPeninputUiStateBase( aUiStateMgr, aContext )
       
   104     {
       
   105     }
       
   106 
       
   107 // -----------------------------------------------------------------------------
       
   108 // CPeninputHwrBoxUiState::HandleVkbEvent
       
   109 // pseudo virual key (hwr 1 char)
       
   110 // (other items were commented in a header).
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 TBool CPeninputHwrBoxUiState::HandleVkbEvent(TInt /*aEventType*/,
       
   114                                         const TDesC& /*aEventData*/)
       
   115     {
       
   116     return ETrue;
       
   117     }
       
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // CPeninputHwrBoxUiState::HandleBackEvent
       
   121 // (other items were commented in a header).
       
   122 // -----------------------------------------------------------------------------
       
   123 //
       
   124 TBool CPeninputHwrBoxUiState::HandleBackEvent(TInt /*aEventType*/,
       
   125                                          const TDesC& /*aEventData*/)
       
   126     {
       
   127     return ETrue;
       
   128     }
       
   129 
       
   130 // -----------------------------------------------------------------------------
       
   131 // CPeninputHwrBoxUiState::HandleEnterSpaceTabEvent
       
   132 // (other items were commented in a header).
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 TBool CPeninputHwrBoxUiState::HandleEnterSpaceTabEvent(TInt /*aEventType*/,
       
   136                                                   const TDesC& /*aEventData*/)
       
   137     {
       
   138     return ETrue;
       
   139     }
       
   140 
       
   141 // End Of File