textinput/peninputgenericvkb/src/peninputgenericvkbuistatepopup.cpp
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     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:  Implementation of vkb ui popup state
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // System includes
       
    20 #include <peninputcmd.h>
       
    21 #include <aknfeppeninputenums.h>
       
    22 #include <peninputdataprovider.h>
       
    23 #include <peninputlayoutcontext.h>
       
    24 #include <peninputdataconverter.h>
       
    25 #include <peninputlayoutbasecontrol.h>
       
    26 #include <peninputcommonlayoutglobalenum.h>
       
    27 
       
    28 // User includes
       
    29 #include "peninputgenericvkb.hrh"
       
    30 #include "peninputgenericvkbuistatepopup.h"
       
    31 #include "peninputgenericvkbenum.h"
       
    32 
       
    33 
       
    34 // ======== MEMBER FUNCTIONS ========
       
    35 
       
    36 // --------------------------------------------------------------------------
       
    37 // CPeninputUiStateVkbPopup::CPeninputUiStateVkbPopup
       
    38 // (other items were commented in a header)
       
    39 // --------------------------------------------------------------------------
       
    40 //
       
    41 CPeninputUiStateVkbPopup::CPeninputUiStateVkbPopup( 
       
    42     MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext )
       
    43     : CPeninputUiStateBase( aUiStateMgr, aContext )
       
    44     {
       
    45     }
       
    46        
       
    47 // --------------------------------------------------------------------------
       
    48 // CPeninputUiStateVkbPopup::NewL
       
    49 // (other items were commented in a header)
       
    50 // --------------------------------------------------------------------------
       
    51 //
       
    52 CPeninputUiStateVkbPopup* CPeninputUiStateVkbPopup::NewL( 
       
    53     MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext )
       
    54     {
       
    55     CPeninputUiStateVkbPopup* self = 
       
    56         new ( ELeave ) CPeninputUiStateVkbPopup( aUiStateMgr, aContext );
       
    57     CleanupStack::PushL( self );
       
    58     self->Construct(); 
       
    59     CleanupStack::Pop( self );
       
    60 
       
    61     return self;
       
    62     }  
       
    63       
       
    64 // --------------------------------------------------------------------------
       
    65 // CPeninputUiStateVkbPopup::~CPeninputUiStateVkbPopup
       
    66 // (other items were commented in a header)
       
    67 // --------------------------------------------------------------------------
       
    68 //
       
    69 CPeninputUiStateVkbPopup::~CPeninputUiStateVkbPopup()
       
    70     {
       
    71     }
       
    72 
       
    73 // --------------------------------------------------------------------------
       
    74 // CPeninputUiStateVkbPopup::HandleKeyEventL
       
    75 // (other items were commented in a header)
       
    76 // --------------------------------------------------------------------------
       
    77 //
       
    78 TBool CPeninputUiStateVkbPopup::HandleKeyEventL( 
       
    79     const TRawEvent& aData )
       
    80     {
       
    81     TInt scanCode = aData.ScanCode();
       
    82     iContext->SendEventToWindow( EPenInputLayoutEventClosePopup, 
       
    83                                  NULL );
       
    84     if(scanCode == EStdKeyYes) // send key
       
    85         {
       
    86         return EFalse;        
       
    87         }
       
    88     else
       
    89         {                                 
       
    90         return ETrue;
       
    91         }
       
    92     }    
       
    93 
       
    94 // --------------------------------------------------------------------------
       
    95 // CPeninputUiStateVkbPopup::HandleControlEvent
       
    96 // (other items were commented in a header)
       
    97 // --------------------------------------------------------------------------
       
    98 //
       
    99 TBool CPeninputUiStateVkbPopup::HandleControlEvent( TInt /*aEventType*/, 
       
   100     const TDesC& /*aEventData*/ )
       
   101     {
       
   102     return EFalse;   
       
   103     }