|
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 popup state of IME Split-Qwerty |
|
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 "peninputsplitqwerty.hrh" |
|
30 #include "peninputsplitqwertyuistatepopup.h" |
|
31 #include "peninputsplitqwertyenum.h" |
|
32 |
|
33 |
|
34 // ======== MEMBER FUNCTIONS ======== |
|
35 |
|
36 // --------------------------------------------------------------------------- |
|
37 // Symbian constructor |
|
38 // --------------------------------------------------------------------------- |
|
39 // |
|
40 CPeninputSplitQwertyUiStatePopup* CPeninputSplitQwertyUiStatePopup::NewL( |
|
41 MPeninputUiStateMgr* aUiStateMgr, |
|
42 MPeninputLayoutContext* aContext ) |
|
43 { |
|
44 CPeninputSplitQwertyUiStatePopup* self = NULL; |
|
45 self = new ( ELeave ) CPeninputSplitQwertyUiStatePopup( aUiStateMgr, |
|
46 aContext ); |
|
47 CleanupStack::PushL( self ); |
|
48 self->Construct(); |
|
49 CleanupStack::Pop( self ); |
|
50 |
|
51 return self; |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------------------------- |
|
55 // C++ destructor |
|
56 // --------------------------------------------------------------------------- |
|
57 // |
|
58 CPeninputSplitQwertyUiStatePopup::~CPeninputSplitQwertyUiStatePopup() |
|
59 { |
|
60 } |
|
61 |
|
62 // --------------------------------------------------------------------------- |
|
63 // Process key event |
|
64 // --------------------------------------------------------------------------- |
|
65 // |
|
66 TBool CPeninputSplitQwertyUiStatePopup::HandleKeyEventL( const TRawEvent& aData ) |
|
67 { |
|
68 TInt scanCode = aData.ScanCode(); |
|
69 iContext->SendEventToWindow( EPenInputLayoutEventClosePopup, NULL ); |
|
70 |
|
71 if(scanCode == EStdKeyYes) // send key |
|
72 { |
|
73 return EFalse; |
|
74 } |
|
75 |
|
76 return ETrue; |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // process internal event |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 TBool CPeninputSplitQwertyUiStatePopup::HandleControlEvent( TInt /*aEventType*/, |
|
84 const TDesC& /*aEventData*/ ) |
|
85 { |
|
86 return EFalse; |
|
87 } |
|
88 |
|
89 // --------------------------------------------------------------------------- |
|
90 // C++ constructor |
|
91 // --------------------------------------------------------------------------- |
|
92 // |
|
93 CPeninputSplitQwertyUiStatePopup::CPeninputSplitQwertyUiStatePopup( |
|
94 MPeninputUiStateMgr* aUiStateMgr, |
|
95 MPeninputLayoutContext* aContext ) |
|
96 : CPeninputUiStateBase( aUiStateMgr, aContext ) |
|
97 { |
|
98 } |
|
99 |