|
1 /* |
|
2 * Copyright (c) 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: Implement of class CPenInputSettingAppUi |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include <avkon.hrh> |
|
21 #include <aknnotewrappers.h> |
|
22 #include <ecom.h> |
|
23 #include <AknsUtils.h> |
|
24 #include <e32property.h> |
|
25 #include <gspeninputplugin.h> |
|
26 #include <akntitle.h> |
|
27 #include <AvkonInternalCRKeys.h> // KAknQwertyInputModeActive |
|
28 |
|
29 #include "peninputsettingAppui.h" |
|
30 #include "peninputsettingApplication.h" |
|
31 |
|
32 const TUid KUidPeninputGsPlugin = { 0x1027510C }; |
|
33 |
|
34 #define KMaxCmdLen 16 |
|
35 |
|
36 // ======== MEMBER FUNCTIONS ======== |
|
37 |
|
38 // --------------------------------------------------------------------------- |
|
39 // ConstructL is called by the application framework |
|
40 // --------------------------------------------------------------------------- |
|
41 // |
|
42 void CPenInputSettingAppUi::ConstructL() |
|
43 { |
|
44 BaseConstructL(); |
|
45 |
|
46 CEikStatusPane* statusPane = StatusPane(); |
|
47 CEikStatusPaneBase::TPaneCapabilities titlePaneCapability = |
|
48 statusPane->PaneCapabilities( TUid::Uid( EEikStatusPaneUidTitle ) ); |
|
49 |
|
50 CAknTitlePane* titlePane = static_cast<CAknTitlePane*> |
|
51 ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
|
52 titlePane->SetTextL( KNullDesC ); |
|
53 |
|
54 HideApplicationFromFSW( ETrue ); |
|
55 TAny* interface = REComSession::CreateImplementationL( KUidPeninputGsPlugin, |
|
56 _FOFF(CGSPenInputPlugin,iDestrouctorIDKey)); |
|
57 iAppView = reinterpret_cast<CGSPenInputPlugin*>( interface ); |
|
58 AddViewL( iAppView ); |
|
59 SetDefaultViewL( *iAppView ); |
|
60 |
|
61 AknsUtils::SetAvkonSkinEnabledL( ETrue ); |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // Constructor |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 CPenInputSettingAppUi::CPenInputSettingAppUi() |
|
69 { |
|
70 // no implementation required |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------------------------- |
|
74 // Destructor |
|
75 // --------------------------------------------------------------------------- |
|
76 // |
|
77 CPenInputSettingAppUi::~CPenInputSettingAppUi() |
|
78 { |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // handle any menu commands |
|
83 // --------------------------------------------------------------------------- |
|
84 // |
|
85 void CPenInputSettingAppUi::HandleCommandL(TInt aCommand) |
|
86 { |
|
87 switch(aCommand) |
|
88 { |
|
89 case EEikCmdExit: |
|
90 case EAknSoftkeyExit: |
|
91 Exit(); |
|
92 break; |
|
93 } |
|
94 } |
|
95 TBool CPenInputSettingAppUi::ProcessCommandParametersL( CApaCommandLine& aCommandLine ) |
|
96 { |
|
97 iParentWgId = aCommandLine.ParentWindowGroupID(); |
|
98 return ETrue; |
|
99 } |
|
100 void CPenInputSettingAppUi::HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination) |
|
101 { |
|
102 if ( aEvent.Type() == KAknUidValueEndKeyCloseEvent ) |
|
103 { |
|
104 iEikonEnv->WsSession().SendEventToWindowGroup( iParentWgId, aEvent ); |
|
105 } |
|
106 else |
|
107 { |
|
108 CAknAppUi::HandleWsEventL( aEvent, aDestination ); |
|
109 } |
|
110 } |